@microsoft/terraform-cdk-constructs 1.10.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/.jsii +51855 -36874
  2. package/API.md +62102 -40530
  3. package/README.md +15 -0
  4. package/docs/azure-api-version-update-pipeline.md +271 -0
  5. package/lib/azure-actiongroup/lib/action-group.d.ts +3 -3
  6. package/lib/azure-actiongroup/lib/action-group.js +5 -5
  7. package/lib/azure-actiongroup/test/action-group.integ.d.ts +1 -1
  8. package/lib/azure-actiongroup/test/action-group.integ.js +5 -5
  9. package/lib/azure-actiongroup/test/action-group.spec.js +9 -9
  10. package/lib/azure-activitylogalert/lib/activity-log-alert.d.ts +3 -3
  11. package/lib/azure-activitylogalert/lib/activity-log-alert.js +5 -5
  12. package/lib/azure-activitylogalert/test/activity-log-alert.integ.d.ts +1 -1
  13. package/lib/azure-activitylogalert/test/activity-log-alert.integ.js +6 -6
  14. package/lib/azure-activitylogalert/test/activity-log-alert.spec.js +9 -9
  15. package/lib/azure-aks/lib/aks-cluster.d.ts +6 -6
  16. package/lib/azure-aks/lib/aks-cluster.js +8 -8
  17. package/lib/azure-aks/test/aks-cluster.integ.d.ts +1 -1
  18. package/lib/azure-aks/test/aks-cluster.integ.js +5 -5
  19. package/lib/azure-aks/test/aks-cluster.spec.js +12 -12
  20. package/lib/azure-applicationinsights/lib/application-insights.d.ts +6 -6
  21. package/lib/azure-applicationinsights/lib/application-insights.js +8 -8
  22. package/lib/azure-applicationinsights/test/application-insights.integ.d.ts +1 -1
  23. package/lib/azure-applicationinsights/test/application-insights.integ.js +6 -6
  24. package/lib/azure-applicationinsights/test/application-insights.spec.js +5 -5
  25. package/lib/azure-containerapps/lib/container-app-environment.d.ts +8 -8
  26. package/lib/azure-containerapps/lib/container-app-environment.js +10 -10
  27. package/lib/azure-containerapps/lib/container-app.d.ts +9 -9
  28. package/lib/azure-containerapps/lib/container-app.js +11 -11
  29. package/lib/azure-containerapps/lib/container-apps-job-schemas.d.ts +8 -0
  30. package/lib/azure-containerapps/lib/container-apps-job-schemas.js +179 -0
  31. package/lib/azure-containerapps/lib/container-apps-job.d.ts +128 -0
  32. package/lib/azure-containerapps/lib/container-apps-job.js +81 -0
  33. package/lib/azure-containerapps/lib/index.d.ts +2 -0
  34. package/lib/azure-containerapps/lib/index.js +3 -1
  35. package/lib/azure-containerapps/test/container-app-environment.integ.d.ts +1 -1
  36. package/lib/azure-containerapps/test/container-app-environment.integ.js +5 -5
  37. package/lib/azure-containerapps/test/container-app-environment.spec.js +19 -19
  38. package/lib/azure-containerapps/test/container-app.integ.d.ts +1 -1
  39. package/lib/azure-containerapps/test/container-app.integ.js +5 -5
  40. package/lib/azure-containerapps/test/container-app.spec.js +30 -30
  41. package/lib/azure-containerapps/test/container-apps-job.integ.d.ts +6 -0
  42. package/lib/azure-containerapps/test/container-apps-job.integ.js +95 -0
  43. package/lib/azure-containerapps/test/container-apps-job.spec.d.ts +1 -0
  44. package/lib/azure-containerapps/test/container-apps-job.spec.js +261 -0
  45. package/lib/azure-containerregistry/lib/container-registry.d.ts +6 -6
  46. package/lib/azure-containerregistry/lib/container-registry.js +8 -8
  47. package/lib/azure-containerregistry/test/container-registry.integ.d.ts +1 -1
  48. package/lib/azure-containerregistry/test/container-registry.integ.js +5 -5
  49. package/lib/azure-containerregistry/test/container-registry.spec.js +11 -11
  50. package/lib/azure-cosmosdb/lib/cosmos-db.d.ts +6 -6
  51. package/lib/azure-cosmosdb/lib/cosmos-db.js +8 -8
  52. package/lib/azure-cosmosdb/test/cosmos-db.integ.d.ts +1 -1
  53. package/lib/azure-cosmosdb/test/cosmos-db.integ.js +5 -5
  54. package/lib/azure-cosmosdb/test/cosmos-db.spec.js +11 -11
  55. package/lib/azure-dataexplorer/index.d.ts +1 -0
  56. package/lib/azure-dataexplorer/index.js +18 -0
  57. package/lib/azure-dataexplorer/lib/data-explorer-cluster-schemas.d.ts +5 -0
  58. package/lib/azure-dataexplorer/lib/data-explorer-cluster-schemas.js +131 -0
  59. package/lib/azure-dataexplorer/lib/data-explorer-cluster.d.ts +54 -0
  60. package/lib/azure-dataexplorer/lib/data-explorer-cluster.js +91 -0
  61. package/lib/azure-dataexplorer/lib/data-explorer-database-schemas.d.ts +5 -0
  62. package/lib/azure-dataexplorer/lib/data-explorer-database-schemas.js +78 -0
  63. package/lib/azure-dataexplorer/lib/data-explorer-database.d.ts +24 -0
  64. package/lib/azure-dataexplorer/lib/data-explorer-database.js +68 -0
  65. package/lib/azure-dataexplorer/lib/data-explorer-table-schemas.d.ts +5 -0
  66. package/lib/azure-dataexplorer/lib/data-explorer-table-schemas.js +94 -0
  67. package/lib/azure-dataexplorer/lib/data-explorer-table.d.ts +25 -0
  68. package/lib/azure-dataexplorer/lib/data-explorer-table.js +62 -0
  69. package/lib/azure-dataexplorer/lib/index.d.ts +6 -0
  70. package/lib/azure-dataexplorer/lib/index.js +23 -0
  71. package/lib/azure-dataexplorer/test/data-explorer.integ.d.ts +1 -0
  72. package/lib/azure-dataexplorer/test/data-explorer.integ.js +78 -0
  73. package/lib/azure-dataexplorer/test/data-explorer.spec.d.ts +1 -0
  74. package/lib/azure-dataexplorer/test/data-explorer.spec.js +248 -0
  75. package/lib/azure-diagnosticsettings/lib/diagnostic-settings.d.ts +3 -3
  76. package/lib/azure-diagnosticsettings/lib/diagnostic-settings.js +5 -5
  77. package/lib/azure-diagnosticsettings/test/diagnostic-settings.spec.js +9 -9
  78. package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset.d.ts +7 -7
  79. package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset.js +9 -9
  80. package/lib/azure-dnsforwardingruleset/lib/forwarding-rule.d.ts +4 -4
  81. package/lib/azure-dnsforwardingruleset/lib/forwarding-rule.js +6 -6
  82. package/lib/azure-dnsforwardingruleset/lib/virtual-network-link.d.ts +4 -4
  83. package/lib/azure-dnsforwardingruleset/lib/virtual-network-link.js +6 -6
  84. package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.integ.d.ts +1 -1
  85. package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.integ.js +5 -5
  86. package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.spec.js +11 -11
  87. package/lib/azure-dnsforwardingruleset/test/forwarding-rule.spec.js +14 -14
  88. package/lib/azure-dnsforwardingruleset/test/virtual-network-link.spec.js +12 -12
  89. package/lib/azure-dnsresolver/lib/dns-resolver.d.ts +8 -8
  90. package/lib/azure-dnsresolver/lib/dns-resolver.js +10 -10
  91. package/lib/azure-dnsresolver/lib/inbound-endpoint.d.ts +6 -6
  92. package/lib/azure-dnsresolver/lib/inbound-endpoint.js +8 -8
  93. package/lib/azure-dnsresolver/lib/outbound-endpoint.d.ts +7 -7
  94. package/lib/azure-dnsresolver/lib/outbound-endpoint.js +9 -9
  95. package/lib/azure-dnsresolver/test/dns-resolver.integ.d.ts +1 -1
  96. package/lib/azure-dnsresolver/test/dns-resolver.integ.js +5 -5
  97. package/lib/azure-dnsresolver/test/dns-resolver.spec.js +11 -11
  98. package/lib/azure-dnsresolver/test/inbound-endpoint.integ.d.ts +1 -1
  99. package/lib/azure-dnsresolver/test/inbound-endpoint.integ.js +5 -5
  100. package/lib/azure-dnsresolver/test/inbound-endpoint.spec.js +12 -12
  101. package/lib/azure-dnsresolver/test/outbound-endpoint.integ.d.ts +1 -1
  102. package/lib/azure-dnsresolver/test/outbound-endpoint.integ.js +5 -5
  103. package/lib/azure-dnsresolver/test/outbound-endpoint.spec.js +9 -9
  104. package/lib/azure-dnszone/lib/dns-zone.d.ts +6 -6
  105. package/lib/azure-dnszone/lib/dns-zone.js +8 -8
  106. package/lib/azure-dnszone/lib/records/dns-records.d.ts +31 -31
  107. package/lib/azure-dnszone/lib/records/dns-records.js +42 -42
  108. package/lib/azure-dnszone/test/dns-records.integ.d.ts +1 -1
  109. package/lib/azure-dnszone/test/dns-records.integ.js +5 -5
  110. package/lib/azure-dnszone/test/dns-records.spec.js +57 -57
  111. package/lib/azure-dnszone/test/dns-zone.integ.d.ts +1 -1
  112. package/lib/azure-dnszone/test/dns-zone.integ.js +5 -5
  113. package/lib/azure-dnszone/test/dns-zone.spec.js +11 -11
  114. package/lib/azure-eventgrideventsubscription/index.d.ts +1 -0
  115. package/lib/azure-eventgrideventsubscription/index.js +18 -0
  116. package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription-schemas.d.ts +5 -0
  117. package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription-schemas.js +151 -0
  118. package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription.d.ts +59 -0
  119. package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription.js +67 -0
  120. package/lib/azure-eventgrideventsubscription/lib/index.d.ts +2 -0
  121. package/lib/azure-eventgrideventsubscription/lib/index.js +19 -0
  122. package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.integ.d.ts +1 -0
  123. package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.integ.js +100 -0
  124. package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.spec.d.ts +1 -0
  125. package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.spec.js +242 -0
  126. package/lib/azure-eventgridsystemtopic/index.d.ts +1 -0
  127. package/lib/azure-eventgridsystemtopic/index.js +18 -0
  128. package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic-schemas.d.ts +5 -0
  129. package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic-schemas.js +164 -0
  130. package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic.d.ts +46 -0
  131. package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic.js +68 -0
  132. package/lib/azure-eventgridsystemtopic/lib/index.d.ts +2 -0
  133. package/lib/azure-eventgridsystemtopic/lib/index.js +19 -0
  134. package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.integ.d.ts +1 -0
  135. package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.integ.js +64 -0
  136. package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.spec.d.ts +1 -0
  137. package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.spec.js +241 -0
  138. package/lib/azure-eventhub/index.d.ts +7 -0
  139. package/lib/azure-eventhub/index.js +24 -0
  140. package/lib/azure-eventhub/lib/event-hub-namespace.d.ts +204 -0
  141. package/lib/azure-eventhub/lib/event-hub-namespace.js +178 -0
  142. package/lib/azure-eventhub/lib/event-hub-schemas.d.ts +63 -0
  143. package/lib/azure-eventhub/lib/event-hub-schemas.js +370 -0
  144. package/lib/azure-eventhub/lib/event-hub.d.ts +153 -0
  145. package/lib/azure-eventhub/lib/event-hub.js +171 -0
  146. package/lib/azure-eventhub/lib/index.d.ts +6 -0
  147. package/lib/azure-eventhub/lib/index.js +23 -0
  148. package/lib/azure-eventhub/test/event-hub.integ.d.ts +9 -0
  149. package/lib/azure-eventhub/test/event-hub.integ.js +113 -0
  150. package/lib/azure-eventhub/test/event-hub.spec.d.ts +8 -0
  151. package/lib/azure-eventhub/test/event-hub.spec.js +438 -0
  152. package/lib/azure-functionapp/lib/function-app.d.ts +6 -6
  153. package/lib/azure-functionapp/lib/function-app.js +8 -8
  154. package/lib/azure-functionapp/test/function-app.integ.d.ts +1 -1
  155. package/lib/azure-functionapp/test/function-app.integ.js +5 -5
  156. package/lib/azure-functionapp/test/function-app.spec.js +12 -12
  157. package/lib/azure-keyvault/lib/key-vault.d.ts +6 -6
  158. package/lib/azure-keyvault/lib/key-vault.js +8 -8
  159. package/lib/azure-keyvault/test/key-vault.integ.d.ts +1 -1
  160. package/lib/azure-keyvault/test/key-vault.integ.js +5 -5
  161. package/lib/azure-keyvault/test/key-vault.spec.js +11 -11
  162. package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace.d.ts +1 -1
  163. package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace.js +3 -3
  164. package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.integ.d.ts +1 -1
  165. package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.integ.js +6 -6
  166. package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.spec.js +6 -6
  167. package/lib/azure-metricalert/lib/metric-alert.d.ts +3 -3
  168. package/lib/azure-metricalert/lib/metric-alert.js +5 -5
  169. package/lib/azure-metricalert/test/metric-alert.integ.d.ts +1 -1
  170. package/lib/azure-metricalert/test/metric-alert.integ.js +5 -5
  171. package/lib/azure-metricalert/test/metric-alert.spec.js +9 -9
  172. package/lib/azure-networkinterface/lib/network-interface.d.ts +5 -5
  173. package/lib/azure-networkinterface/lib/network-interface.js +7 -7
  174. package/lib/azure-networkinterface/test/network-interface.integ.d.ts +1 -1
  175. package/lib/azure-networkinterface/test/network-interface.integ.js +5 -5
  176. package/lib/azure-networkinterface/test/network-interface.spec.js +11 -11
  177. package/lib/azure-networksecuritygroup/lib/network-security-group.d.ts +6 -6
  178. package/lib/azure-networksecuritygroup/lib/network-security-group.js +8 -8
  179. package/lib/azure-networksecuritygroup/test/network-security-group.integ.d.ts +1 -1
  180. package/lib/azure-networksecuritygroup/test/network-security-group.integ.js +5 -5
  181. package/lib/azure-networksecuritygroup/test/network-security-group.spec.js +12 -12
  182. package/lib/azure-networkwatcher/lib/network-watcher.d.ts +1 -1
  183. package/lib/azure-networkwatcher/lib/network-watcher.js +3 -3
  184. package/lib/azure-networkwatcher/test/network-watcher.integ.d.ts +1 -1
  185. package/lib/azure-networkwatcher/test/network-watcher.integ.js +6 -6
  186. package/lib/azure-networkwatcher/test/network-watcher.spec.js +6 -6
  187. package/lib/azure-policyassignment/lib/policy-assignment.d.ts +3 -3
  188. package/lib/azure-policyassignment/lib/policy-assignment.js +5 -5
  189. package/lib/azure-policyassignment/test/policy-assignment.integ.d.ts +1 -1
  190. package/lib/azure-policyassignment/test/policy-assignment.integ.js +5 -5
  191. package/lib/azure-policyassignment/test/policy-assignment.spec.js +12 -12
  192. package/lib/azure-policydefinition/lib/policy-definition.d.ts +3 -3
  193. package/lib/azure-policydefinition/lib/policy-definition.js +5 -5
  194. package/lib/azure-policydefinition/test/policy-definition.integ.d.ts +1 -1
  195. package/lib/azure-policydefinition/test/policy-definition.integ.js +5 -5
  196. package/lib/azure-policydefinition/test/policy-definition.spec.js +19 -19
  197. package/lib/azure-policysetdefinition/lib/policy-set-definition.d.ts +1 -1
  198. package/lib/azure-policysetdefinition/lib/policy-set-definition.js +3 -3
  199. package/lib/azure-policysetdefinition/test/policy-set-definition.integ.d.ts +1 -1
  200. package/lib/azure-policysetdefinition/test/policy-set-definition.integ.js +6 -6
  201. package/lib/azure-policysetdefinition/test/policy-set-definition.spec.js +6 -6
  202. package/lib/azure-privatednszone/lib/private-dns-zone.d.ts +10 -10
  203. package/lib/azure-privatednszone/lib/private-dns-zone.js +12 -12
  204. package/lib/azure-privatednszone/lib/records/private-dns-records.d.ts +25 -25
  205. package/lib/azure-privatednszone/lib/records/private-dns-records.js +34 -34
  206. package/lib/azure-privatednszone/test/private-dns-records.integ.d.ts +1 -1
  207. package/lib/azure-privatednszone/test/private-dns-records.integ.js +5 -5
  208. package/lib/azure-privatednszone/test/private-dns-records.spec.js +49 -49
  209. package/lib/azure-privatednszone/test/private-dns-zone.integ.d.ts +1 -1
  210. package/lib/azure-privatednszone/test/private-dns-zone.integ.js +5 -5
  211. package/lib/azure-privatednszone/test/private-dns-zone.spec.js +12 -12
  212. package/lib/azure-privatednszonelink/lib/private-dns-zone-link.d.ts +6 -6
  213. package/lib/azure-privatednszonelink/lib/private-dns-zone-link.js +8 -8
  214. package/lib/azure-privatednszonelink/test/private-dns-zone-link.integ.d.ts +1 -1
  215. package/lib/azure-privatednszonelink/test/private-dns-zone-link.integ.js +5 -5
  216. package/lib/azure-privatednszonelink/test/private-dns-zone-link.spec.js +12 -12
  217. package/lib/azure-publicipaddress/lib/public-ip-address.d.ts +5 -5
  218. package/lib/azure-publicipaddress/lib/public-ip-address.js +7 -7
  219. package/lib/azure-publicipaddress/test/public-ip-address.integ.d.ts +1 -1
  220. package/lib/azure-publicipaddress/test/public-ip-address.integ.js +6 -6
  221. package/lib/azure-publicipaddress/test/public-ip-address.spec.js +11 -11
  222. package/lib/azure-resourcegroup/lib/resource-group.d.ts +5 -5
  223. package/lib/azure-resourcegroup/lib/resource-group.js +7 -7
  224. package/lib/azure-resourcegroup/test/resource-group.integ.d.ts +1 -1
  225. package/lib/azure-resourcegroup/test/resource-group.integ.js +5 -5
  226. package/lib/azure-resourcegroup/test/resource-group.spec.js +14 -14
  227. package/lib/azure-roleassignment/lib/role-assignment.d.ts +3 -3
  228. package/lib/azure-roleassignment/lib/role-assignment.js +5 -5
  229. package/lib/azure-roleassignment/test/role-assignment.integ.d.ts +1 -1
  230. package/lib/azure-roleassignment/test/role-assignment.integ.js +5 -5
  231. package/lib/azure-roleassignment/test/role-assignment.spec.js +12 -12
  232. package/lib/azure-roledefinition/lib/role-definition.d.ts +3 -3
  233. package/lib/azure-roledefinition/lib/role-definition.js +5 -5
  234. package/lib/azure-roledefinition/test/role-definition.integ.d.ts +1 -1
  235. package/lib/azure-roledefinition/test/role-definition.integ.js +5 -5
  236. package/lib/azure-roledefinition/test/role-definition.spec.js +12 -12
  237. package/lib/azure-sreagent/lib/sre-agent.d.ts +8 -8
  238. package/lib/azure-sreagent/lib/sre-agent.js +10 -10
  239. package/lib/azure-sreagent/test/sre-agent.integ.d.ts +1 -1
  240. package/lib/azure-sreagent/test/sre-agent.integ.js +5 -5
  241. package/lib/azure-sreagent/test/sre-agent.spec.js +11 -11
  242. package/lib/azure-staticwebapp/lib/static-web-app.d.ts +6 -6
  243. package/lib/azure-staticwebapp/lib/static-web-app.js +8 -8
  244. package/lib/azure-staticwebapp/test/static-web-app.integ.d.ts +1 -1
  245. package/lib/azure-staticwebapp/test/static-web-app.integ.js +6 -6
  246. package/lib/azure-staticwebapp/test/static-web-app.spec.js +12 -12
  247. package/lib/azure-storageaccount/lib/storage-account.d.ts +6 -6
  248. package/lib/azure-storageaccount/lib/storage-account.js +8 -8
  249. package/lib/azure-storageaccount/test/storage-account.integ.d.ts +1 -1
  250. package/lib/azure-storageaccount/test/storage-account.integ.js +5 -5
  251. package/lib/azure-storageaccount/test/storage-account.spec.js +11 -11
  252. package/lib/azure-storageblobcontainer/index.d.ts +1 -0
  253. package/lib/azure-storageblobcontainer/index.js +18 -0
  254. package/lib/azure-storageblobcontainer/lib/index.d.ts +2 -0
  255. package/lib/azure-storageblobcontainer/lib/index.js +19 -0
  256. package/lib/azure-storageblobcontainer/lib/storage-blob-container-schemas.d.ts +5 -0
  257. package/lib/azure-storageblobcontainer/lib/storage-blob-container-schemas.js +108 -0
  258. package/lib/azure-storageblobcontainer/lib/storage-blob-container.d.ts +37 -0
  259. package/lib/azure-storageblobcontainer/lib/storage-blob-container.js +63 -0
  260. package/lib/azure-storageblobcontainer/test/storage-blob-container.integ.d.ts +1 -0
  261. package/lib/azure-storageblobcontainer/test/storage-blob-container.integ.js +60 -0
  262. package/lib/azure-storageblobcontainer/test/storage-blob-container.spec.d.ts +1 -0
  263. package/lib/azure-storageblobcontainer/test/storage-blob-container.spec.js +172 -0
  264. package/lib/azure-subnet/lib/subnet.d.ts +3 -3
  265. package/lib/azure-subnet/lib/subnet.js +5 -5
  266. package/lib/azure-subnet/test/subnet.integ.d.ts +1 -1
  267. package/lib/azure-subnet/test/subnet.integ.js +5 -5
  268. package/lib/azure-subnet/test/subnet.spec.js +9 -9
  269. package/lib/azure-userassignedidentity/index.d.ts +1 -0
  270. package/lib/azure-userassignedidentity/index.js +18 -0
  271. package/lib/azure-userassignedidentity/lib/index.d.ts +2 -0
  272. package/lib/azure-userassignedidentity/lib/index.js +19 -0
  273. package/lib/azure-userassignedidentity/lib/user-assigned-identity-schemas.d.ts +8 -0
  274. package/lib/azure-userassignedidentity/lib/user-assigned-identity-schemas.js +107 -0
  275. package/lib/azure-userassignedidentity/lib/user-assigned-identity.d.ts +37 -0
  276. package/lib/azure-userassignedidentity/lib/user-assigned-identity.js +85 -0
  277. package/lib/azure-userassignedidentity/test/user-assigned-identity.integ.d.ts +1 -0
  278. package/lib/azure-userassignedidentity/test/user-assigned-identity.integ.js +64 -0
  279. package/lib/azure-userassignedidentity/test/user-assigned-identity.spec.d.ts +1 -0
  280. package/lib/azure-userassignedidentity/test/user-assigned-identity.spec.js +241 -0
  281. package/lib/azure-virtualmachine/lib/virtual-machine.d.ts +6 -6
  282. package/lib/azure-virtualmachine/lib/virtual-machine.js +8 -8
  283. package/lib/azure-virtualmachine/test/virtual-machine.integ.d.ts +1 -1
  284. package/lib/azure-virtualmachine/test/virtual-machine.integ.js +5 -5
  285. package/lib/azure-virtualmachine/test/virtual-machine.spec.js +17 -17
  286. package/lib/azure-virtualnetwork/lib/virtual-network.d.ts +6 -6
  287. package/lib/azure-virtualnetwork/lib/virtual-network.js +8 -8
  288. package/lib/azure-virtualnetwork/test/virtual-network.integ.d.ts +1 -1
  289. package/lib/azure-virtualnetwork/test/virtual-network.integ.js +5 -5
  290. package/lib/azure-virtualnetwork/test/virtual-network.spec.js +12 -12
  291. package/lib/azure-virtualnetworkgateway/lib/virtual-network-gateway.d.ts +5 -5
  292. package/lib/azure-virtualnetworkgateway/lib/virtual-network-gateway.js +7 -7
  293. package/lib/azure-virtualnetworkgateway/test/virtual-network-gateway.integ.d.ts +1 -1
  294. package/lib/azure-virtualnetworkgateway/test/virtual-network-gateway.integ.js +5 -5
  295. package/lib/azure-virtualnetworkgateway/test/virtual-network-gateway.spec.js +13 -13
  296. package/lib/azure-virtualnetworkgatewayconnection/lib/virtual-network-gateway-connection.d.ts +5 -5
  297. package/lib/azure-virtualnetworkgatewayconnection/lib/virtual-network-gateway-connection.js +7 -7
  298. package/lib/azure-virtualnetworkgatewayconnection/test/virtual-network-gateway-connection.integ.d.ts +1 -1
  299. package/lib/azure-virtualnetworkgatewayconnection/test/virtual-network-gateway-connection.integ.js +5 -5
  300. package/lib/azure-virtualnetworkgatewayconnection/test/virtual-network-gateway-connection.spec.js +20 -20
  301. package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration.d.ts +4 -4
  302. package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration.js +6 -6
  303. package/lib/azure-virtualnetworkmanager/lib/ipam-pool-static-cidr.d.ts +4 -4
  304. package/lib/azure-virtualnetworkmanager/lib/ipam-pool-static-cidr.js +6 -6
  305. package/lib/azure-virtualnetworkmanager/lib/ipam-pool.d.ts +4 -4
  306. package/lib/azure-virtualnetworkmanager/lib/ipam-pool.js +6 -6
  307. package/lib/azure-virtualnetworkmanager/lib/network-group-static-member.d.ts +4 -4
  308. package/lib/azure-virtualnetworkmanager/lib/network-group-static-member.js +6 -6
  309. package/lib/azure-virtualnetworkmanager/lib/network-group.d.ts +4 -4
  310. package/lib/azure-virtualnetworkmanager/lib/network-group.js +6 -6
  311. package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration.d.ts +4 -4
  312. package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration.js +6 -6
  313. package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection.d.ts +4 -4
  314. package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection.js +6 -6
  315. package/lib/azure-virtualnetworkmanager/lib/security-admin-rule.d.ts +4 -4
  316. package/lib/azure-virtualnetworkmanager/lib/security-admin-rule.js +6 -6
  317. package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager.d.ts +7 -7
  318. package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager.js +9 -9
  319. package/lib/azure-virtualnetworkmanager/test/ipam-pool-static-cidr.spec.js +17 -17
  320. package/lib/azure-virtualnetworkmanager/test/ipam-pool.spec.js +15 -15
  321. package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.integ.d.ts +1 -1
  322. package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.integ.js +5 -5
  323. package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.spec.js +57 -57
  324. package/lib/azure-vmss/lib/virtual-machine-scale-set.d.ts +72 -7
  325. package/lib/azure-vmss/lib/virtual-machine-scale-set.js +147 -8
  326. package/lib/azure-vmss/lib/vmss-schemas.d.ts +195 -0
  327. package/lib/azure-vmss/lib/vmss-schemas.js +33 -1
  328. package/lib/azure-vmss/test/virtual-machine-scale-set.integ.d.ts +1 -1
  329. package/lib/azure-vmss/test/virtual-machine-scale-set.integ.js +5 -5
  330. package/lib/azure-vmss/test/virtual-machine-scale-set.spec.js +474 -12
  331. package/lib/core-azure/lib/azapi/azapi-resource-tags.spec.js +6 -6
  332. package/lib/core-azure/lib/azapi/azapi-resource.d.ts +7 -7
  333. package/lib/core-azure/lib/azapi/azapi-resource.js +6 -6
  334. package/lib/core-azure/lib/azapi/azapi-resource.spec.js +7 -7
  335. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-client-config/index.d.ts +12 -12
  336. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-client-config/index.js +15 -15
  337. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource/index.d.ts +35 -35
  338. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource/index.js +58 -58
  339. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-action/index.d.ts +25 -25
  340. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-action/index.js +49 -49
  341. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-id/index.d.ts +13 -13
  342. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-id/index.js +22 -22
  343. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-list/index.d.ts +24 -24
  344. package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-list/index.js +40 -40
  345. package/lib/core-azure/lib/azapi/providers-azapi/data-plane-resource/index.d.ts +44 -44
  346. package/lib/core-azure/lib/azapi/providers-azapi/data-plane-resource/index.js +72 -72
  347. package/lib/core-azure/lib/azapi/providers-azapi/index.js +2 -2
  348. package/lib/core-azure/lib/azapi/providers-azapi/lazy-index.js +2 -2
  349. package/lib/core-azure/lib/azapi/providers-azapi/provider/index.d.ts +54 -54
  350. package/lib/core-azure/lib/azapi/providers-azapi/provider/index.js +86 -86
  351. package/lib/core-azure/lib/azapi/providers-azapi/resource/index.d.ts +65 -65
  352. package/lib/core-azure/lib/azapi/providers-azapi/resource/index.js +102 -102
  353. package/lib/core-azure/lib/azapi/providers-azapi/resource-action/index.d.ts +25 -25
  354. package/lib/core-azure/lib/azapi/providers-azapi/resource-action/index.js +62 -62
  355. package/lib/core-azure/lib/azapi/providers-azapi/update-resource/index.d.ts +36 -36
  356. package/lib/core-azure/lib/azapi/providers-azapi/update-resource/index.js +69 -69
  357. package/lib/core-azure/lib/azapi/schema-mapper/schema-mapper.js +1 -1
  358. package/lib/core-azure/lib/version-manager/api-version-manager.js +1 -1
  359. package/lib/core-azure/lib/version-manager/interfaces/version-interfaces.js +7 -7
  360. package/lib/index.d.ts +26 -0
  361. package/lib/index.js +28 -2
  362. package/lib/testing/index.d.ts +1 -1
  363. package/lib/testing/index.js +25 -8
  364. package/lib/testing/lib/cleanup.js +1 -1
  365. package/lib/testing/lib/metadata.js +12 -4
  366. package/lib/testing/lib/naming.js +57 -1
  367. package/package.json +10 -22
  368. package/scripts/azure-version-updater/create-issue.ts +189 -0
  369. package/scripts/azure-version-updater/discover.ts +382 -0
  370. package/scripts/azure-version-updater/spec-mapping.ts +164 -0
  371. package/scripts/azure-version-updater/tsconfig.json +11 -0
  372. package/setup.js +2 -2
@@ -0,0 +1,382 @@
1
+ #!/usr/bin/env ts-node
2
+ /**
3
+ * Azure API Version Discovery Script
4
+ *
5
+ * Scans all AZAPI construct schema files, queries the Azure ARM providers API
6
+ * for available API versions, and outputs a JSON manifest of new versions.
7
+ *
8
+ * Usage:
9
+ * npx ts-node scripts/azure-version-updater/discover.ts > version-manifest.json
10
+ *
11
+ * Prerequisites:
12
+ * - Must be authenticated with Azure (`az login` or OIDC in CI)
13
+ */
14
+
15
+ /* eslint-disable @typescript-eslint/no-require-imports */
16
+ const fs = require("fs");
17
+ const path = require("path");
18
+ const https = require("https");
19
+ const { execSync } = require("child_process");
20
+ const specMapping = require("./spec-mapping");
21
+
22
+ interface SchemaFileInfo {
23
+ schemaFile: string;
24
+ constructFile: string;
25
+ testFile: string;
26
+ resourceType: string;
27
+ namespace: string;
28
+ resourceTypeName: string;
29
+ prefix: string;
30
+ knownVersions: string[];
31
+ }
32
+
33
+ interface UpdateEntry extends SchemaFileInfo {
34
+ newVersions: string[];
35
+ specUrls: Record<string, string>;
36
+ }
37
+
38
+ interface VersionManifest {
39
+ updates: UpdateEntry[];
40
+ noUpdates: Array<{ resourceType: string; latestKnown: string }>;
41
+ errors: Array<{ resourceType: string; error: string }>;
42
+ summary: {
43
+ totalConstructs: number;
44
+ constructsWithUpdates: number;
45
+ totalNewVersions: number;
46
+ discoveryDate: string;
47
+ };
48
+ }
49
+
50
+ /**
51
+ * Scan all schema files and extract resource type info.
52
+ */
53
+ function scanSchemaFiles(): SchemaFileInfo[] {
54
+ const srcDir = path.resolve(__dirname, "../../src");
55
+ const results: SchemaFileInfo[] = [];
56
+
57
+ const azureDirs = fs
58
+ .readdirSync(srcDir)
59
+ .filter((d: string) => d.startsWith("azure-"))
60
+ .map((d: string) => path.join(srcDir, d));
61
+
62
+ for (const dir of azureDirs) {
63
+ const libDir = path.join(dir, "lib");
64
+ if (!fs.existsSync(libDir)) continue;
65
+
66
+ // Find all *-schemas.ts files recursively
67
+ const schemaFiles = findSchemaFiles(libDir);
68
+
69
+ for (const schemaFile of schemaFiles) {
70
+ const content = fs.readFileSync(schemaFile, "utf-8");
71
+ const infos = extractSchemaInfo(schemaFile, content, dir);
72
+ results.push(...infos);
73
+ }
74
+ }
75
+
76
+ return results;
77
+ }
78
+
79
+ function findSchemaFiles(dir: string): string[] {
80
+ const files: string[] = [];
81
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
82
+ const full = path.join(dir, entry.name);
83
+ if (entry.isDirectory()) {
84
+ files.push(...findSchemaFiles(full));
85
+ } else if (entry.name.endsWith("-schemas.ts")) {
86
+ files.push(full);
87
+ }
88
+ }
89
+ return files;
90
+ }
91
+
92
+ function extractSchemaInfo(
93
+ schemaFile: string,
94
+ content: string,
95
+ constructDir: string,
96
+ ): SchemaFileInfo[] {
97
+ const results: SchemaFileInfo[] = [];
98
+ const rootDir = path.resolve(__dirname, "../..");
99
+
100
+ // Extract all TYPE constants
101
+ const typeRegex = /export\s+const\s+(\w+)_TYPE\s*=\s*"([^"]+)"/g;
102
+ let match;
103
+ while ((match = typeRegex.exec(content)) !== null) {
104
+ const prefix = match[1];
105
+ const resourceType = match[2];
106
+ const parts = resourceType.split("/");
107
+ const namespace = parts[0];
108
+ const resourceTypeName = parts.slice(1).join("/");
109
+
110
+ // Extract known versions from this file for this resource type
111
+ // Match version strings in VersionConfig blocks
112
+ const versionRegex = /version:\s*"(\d{4}-\d{2}-\d{2})"/g;
113
+ const knownVersions = new Set<string>();
114
+ let vMatch;
115
+ while ((vMatch = versionRegex.exec(content)) !== null) {
116
+ knownVersions.add(vMatch[1]);
117
+ }
118
+
119
+ // Find corresponding construct and test files
120
+ const constructFile = findConstructFile(constructDir, prefix);
121
+ const testFile = findTestFile(constructDir, prefix);
122
+
123
+ results.push({
124
+ schemaFile: path.relative(rootDir, schemaFile),
125
+ constructFile: constructFile
126
+ ? path.relative(rootDir, constructFile)
127
+ : "",
128
+ testFile: testFile ? path.relative(rootDir, testFile) : "",
129
+ resourceType,
130
+ namespace,
131
+ resourceTypeName,
132
+ prefix,
133
+ knownVersions: Array.from(knownVersions.values()).sort(),
134
+ });
135
+ }
136
+
137
+ return results;
138
+ }
139
+
140
+ function findConstructFile(
141
+ constructDir: string,
142
+ _prefix: string,
143
+ ): string | null {
144
+ const libDir = path.join(constructDir, "lib");
145
+ if (!fs.existsSync(libDir)) return null;
146
+
147
+ // Look for .ts files (not -schemas.ts) that contain defaultVersion()
148
+ const tsFiles = fs
149
+ .readdirSync(libDir)
150
+ .filter((f: string) => f.endsWith(".ts") && !f.endsWith("-schemas.ts") && f !== "index.ts");
151
+
152
+ for (const f of tsFiles) {
153
+ const content = fs.readFileSync(path.join(libDir, f), "utf-8");
154
+ if (content.includes("defaultVersion()")) {
155
+ return path.join(libDir, f);
156
+ }
157
+ }
158
+ return null;
159
+ }
160
+
161
+ function findTestFile(constructDir: string, _prefix: string): string | null {
162
+ const testDir = path.join(constructDir, "test");
163
+ if (!fs.existsSync(testDir)) return null;
164
+
165
+ const specFiles = fs
166
+ .readdirSync(testDir)
167
+ .filter((f: string) => f.endsWith(".spec.ts"));
168
+ return specFiles.length > 0 ? path.join(testDir, specFiles[0]) : null;
169
+ }
170
+
171
+ /**
172
+ * Get an Azure access token using the CLI.
173
+ */
174
+ function getAccessToken(): string {
175
+ const result = execSync(
176
+ 'az account get-access-token --query accessToken -o tsv',
177
+ { encoding: "utf-8" },
178
+ );
179
+ return result.trim();
180
+ }
181
+
182
+ /**
183
+ * Fetch available API versions from the ARM providers endpoint.
184
+ */
185
+ async function fetchProviderVersions(
186
+ namespace: string,
187
+ token: string,
188
+ ): Promise<Record<string, string[]>> {
189
+ const url = `https://management.azure.com/providers/${namespace}?api-version=2024-11-01`;
190
+ const response = await httpGet(url, {
191
+ Authorization: `Bearer ${token}`,
192
+ });
193
+
194
+ const data = JSON.parse(response);
195
+ const result: Record<string, string[]> = {};
196
+
197
+ if (data.resourceTypes) {
198
+ for (const rt of data.resourceTypes) {
199
+ result[rt.resourceType] = rt.apiVersions || [];
200
+ }
201
+ }
202
+ return result;
203
+ }
204
+
205
+ function httpGet(
206
+ url: string,
207
+ headers: Record<string, string>,
208
+ ): Promise<string> {
209
+ return new Promise((resolve, reject) => {
210
+ const parsedUrl = new URL(url);
211
+ const options = {
212
+ hostname: parsedUrl.hostname,
213
+ path: parsedUrl.pathname + parsedUrl.search,
214
+ method: "GET",
215
+ headers: { ...headers, "Content-Type": "application/json" },
216
+ };
217
+ const req = https.request(options, (res: any) => {
218
+ let body = "";
219
+ res.on("data", (chunk: Buffer) => (body += chunk.toString()));
220
+ res.on("end", () => {
221
+ if (res.statusCode && res.statusCode >= 200 && res.statusCode < 300) {
222
+ resolve(body);
223
+ } else {
224
+ reject(
225
+ new Error(
226
+ `HTTP ${res.statusCode} from ${url}: ${body.substring(0, 500)}`,
227
+ ),
228
+ );
229
+ }
230
+ });
231
+ });
232
+ req.on("error", reject);
233
+ req.end();
234
+ });
235
+ }
236
+
237
+ /**
238
+ * Case-insensitive lookup of resource type in provider data.
239
+ * ARM API may return "dnszones" when we expect "dnsZones", or
240
+ * child resources may not be listed separately -- fall back to parent.
241
+ */
242
+ function findVersionsCaseInsensitive(
243
+ providerData: Record<string, string[]>,
244
+ resourceTypeName: string,
245
+ ): string[] | undefined {
246
+ // Try exact match first
247
+ if (providerData[resourceTypeName]) {
248
+ return providerData[resourceTypeName];
249
+ }
250
+ // Case-insensitive match
251
+ const lowerTarget = resourceTypeName.toLowerCase();
252
+ for (const [key, value] of Object.entries(providerData)) {
253
+ if (key.toLowerCase() === lowerTarget) {
254
+ return value;
255
+ }
256
+ }
257
+ // For child resources like "virtualNetworks/subnets" or
258
+ // "networkManagers/connectivityConfigurations", try the top-level parent
259
+ if (resourceTypeName.includes("/")) {
260
+ const parent = resourceTypeName.split("/")[0];
261
+ return findVersionsCaseInsensitive(providerData, parent);
262
+ }
263
+ return undefined;
264
+ }
265
+
266
+ async function main(): Promise<void> {
267
+ const schemaInfos = scanSchemaFiles();
268
+ console.error(
269
+ `Found ${schemaInfos.length} resource types across schema files`,
270
+ );
271
+
272
+ // Get Azure access token
273
+ let token: string;
274
+ try {
275
+ token = getAccessToken();
276
+ } catch (e) {
277
+ console.error(
278
+ "Failed to get Azure access token. Ensure you are logged in with `az login`.",
279
+ );
280
+ process.exit(1);
281
+ }
282
+
283
+ // Dedupe namespaces and fetch provider info
284
+ const namespaces = [...new Set(schemaInfos.map((s) => s.namespace))];
285
+ console.error(`Querying ${namespaces.length} Azure namespaces...`);
286
+
287
+ const providerCache: Record<string, Record<string, string[]>> = {};
288
+ for (const ns of namespaces) {
289
+ try {
290
+ providerCache[ns] = await fetchProviderVersions(ns, token);
291
+ console.error(` ${ns}: OK (${Object.keys(providerCache[ns]).length} resource types)`);
292
+ } catch (e) {
293
+ console.error(` ${ns}: FAILED - ${(e as Error).message}`);
294
+ providerCache[ns] = {};
295
+ }
296
+ }
297
+
298
+ // Compare and find new versions
299
+ const manifest: VersionManifest = {
300
+ updates: [],
301
+ noUpdates: [],
302
+ errors: [],
303
+ summary: {
304
+ totalConstructs: schemaInfos.length,
305
+ constructsWithUpdates: 0,
306
+ totalNewVersions: 0,
307
+ discoveryDate: new Date().toISOString().split("T")[0],
308
+ },
309
+ };
310
+
311
+ for (const info of schemaInfos) {
312
+ const providerData = providerCache[info.namespace];
313
+ if (!providerData || Object.keys(providerData).length === 0) {
314
+ manifest.errors.push({
315
+ resourceType: info.resourceType,
316
+ error: `No provider data for namespace ${info.namespace}`,
317
+ });
318
+ continue;
319
+ }
320
+
321
+ // ARM API may return resource type names with different casing (e.g., "dnszones" vs "dnsZones").
322
+ // Do a case-insensitive lookup.
323
+ const rtName = info.resourceTypeName;
324
+ const armVersions = findVersionsCaseInsensitive(providerData, rtName);
325
+
326
+ if (!armVersions) {
327
+ manifest.errors.push({
328
+ resourceType: info.resourceType,
329
+ error: `Resource type "${rtName}" not found in provider ${info.namespace}. Available: ${Object.keys(providerData).slice(0, 10).join(", ")}...`,
330
+ });
331
+ continue;
332
+ }
333
+
334
+ // Filter to stable only (no -preview) and newer than our latest
335
+ const latestKnown =
336
+ info.knownVersions.length > 0
337
+ ? info.knownVersions[info.knownVersions.length - 1]
338
+ : "0000-00-00";
339
+
340
+ const newVersions = armVersions
341
+ .filter((v) => !v.includes("-preview") && v > latestKnown)
342
+ .sort();
343
+
344
+ if (newVersions.length === 0) {
345
+ manifest.noUpdates.push({
346
+ resourceType: info.resourceType,
347
+ latestKnown,
348
+ });
349
+ continue;
350
+ }
351
+
352
+ // Build spec URLs for each new version
353
+ const specUrls: Record<string, string> = {};
354
+ for (const v of newVersions) {
355
+ specUrls[v] = specMapping.getSpecTreeUrl(info.resourceType, v);
356
+ }
357
+
358
+ manifest.updates.push({
359
+ ...info,
360
+ newVersions,
361
+ specUrls,
362
+ });
363
+
364
+ manifest.summary.constructsWithUpdates++;
365
+ manifest.summary.totalNewVersions += newVersions.length;
366
+ }
367
+
368
+ // Output manifest to stdout (logs go to stderr)
369
+ console.log(JSON.stringify(manifest, null, 2));
370
+
371
+ console.error(
372
+ `\nSummary: ${manifest.summary.constructsWithUpdates}/${manifest.summary.totalConstructs} constructs have ${manifest.summary.totalNewVersions} new version(s)`,
373
+ );
374
+ if (manifest.errors.length > 0) {
375
+ console.error(`Errors: ${manifest.errors.length} resource types could not be queried`);
376
+ }
377
+ }
378
+
379
+ main().catch((e) => {
380
+ console.error("Fatal error:", e);
381
+ process.exit(1);
382
+ });
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Maps Azure resource types to their REST API spec paths on GitHub.
3
+ *
4
+ * The Azure REST API specs live at:
5
+ * https://github.com/Azure/azure-rest-api-specs/tree/main/specification/<service>/resource-manager/<Provider>/stable/<version>/
6
+ *
7
+ * This module provides the mapping from resource type strings (e.g. "Microsoft.Network/virtualNetworks")
8
+ * to the spec directory path template with a {version} placeholder.
9
+ */
10
+
11
+ /**
12
+ * Explicit mapping from Azure resource type to the spec directory path.
13
+ * The path is relative to the azure-rest-api-specs repo root.
14
+ * Use {version} as placeholder for the API version string.
15
+ */
16
+ const SPEC_PATH_MAP: Record<string, string> = {
17
+ // Resources
18
+ "Microsoft.Resources/resourceGroups":
19
+ "specification/resources/resource-manager/Microsoft.Resources/stable/{version}",
20
+
21
+ // Network
22
+ "Microsoft.Network/virtualNetworks":
23
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
24
+ "Microsoft.Network/virtualNetworks/subnets":
25
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
26
+ "Microsoft.Network/publicIPAddresses":
27
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
28
+ "Microsoft.Network/networkInterfaces":
29
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
30
+ "Microsoft.Network/networkSecurityGroups":
31
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
32
+ "Microsoft.Network/networkManagers":
33
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
34
+ "Microsoft.Network/networkManagers/ipamPools":
35
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
36
+ "Microsoft.Network/networkManagers/ipamPools/staticCidrs":
37
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
38
+ "Microsoft.Network/networkManagers/connectivityConfigurations":
39
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
40
+ "Microsoft.Network/networkManagers/securityAdminConfigurations":
41
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
42
+ "Microsoft.Network/networkManagers/networkGroups":
43
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
44
+ "Microsoft.Network/networkManagers/networkGroups/staticMembers":
45
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
46
+ "Microsoft.Network/networkWatchers":
47
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
48
+ "Microsoft.Network/dnsZones":
49
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
50
+ "Microsoft.Network/dnsZones/A":
51
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
52
+ "Microsoft.Network/dnsZones/AAAA":
53
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
54
+ "Microsoft.Network/dnsZones/CAA":
55
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
56
+ "Microsoft.Network/dnsZones/CNAME":
57
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
58
+ "Microsoft.Network/dnsZones/MX":
59
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
60
+ "Microsoft.Network/dnsZones/NS":
61
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
62
+ "Microsoft.Network/dnsZones/PTR":
63
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
64
+ "Microsoft.Network/dnsZones/SOA":
65
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
66
+ "Microsoft.Network/dnsZones/SRV":
67
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
68
+ "Microsoft.Network/dnsZones/TXT":
69
+ "specification/dns/resource-manager/Microsoft.Network/stable/{version}",
70
+ "Microsoft.Network/privateDnsZones":
71
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
72
+ "Microsoft.Network/privateDnsZones/A":
73
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
74
+ "Microsoft.Network/privateDnsZones/AAAA":
75
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
76
+ "Microsoft.Network/privateDnsZones/CNAME":
77
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
78
+ "Microsoft.Network/privateDnsZones/MX":
79
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
80
+ "Microsoft.Network/privateDnsZones/PTR":
81
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
82
+ "Microsoft.Network/privateDnsZones/SOA":
83
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
84
+ "Microsoft.Network/privateDnsZones/SRV":
85
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
86
+ "Microsoft.Network/privateDnsZones/TXT":
87
+ "specification/privatedns/resource-manager/Microsoft.Network/stable/{version}",
88
+ "Microsoft.Network/dnsResolvers":
89
+ "specification/dnsresolver/resource-manager/Microsoft.Network/stable/{version}",
90
+ "Microsoft.Network/connections":
91
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
92
+ "Microsoft.Network/virtualNetworkGateways":
93
+ "specification/network/resource-manager/Microsoft.Network/stable/{version}",
94
+
95
+ // Compute
96
+ "Microsoft.Compute/virtualMachines":
97
+ "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{version}",
98
+ "Microsoft.Compute/virtualMachineScaleSets":
99
+ "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{version}",
100
+
101
+ // Storage
102
+ "Microsoft.Storage/storageAccounts":
103
+ "specification/storage/resource-manager/Microsoft.Storage/stable/{version}",
104
+
105
+ // Containers
106
+ "Microsoft.ContainerService/managedClusters":
107
+ "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/{version}",
108
+ "Microsoft.App/containerApps":
109
+ "specification/app/resource-manager/Microsoft.App/stable/{version}",
110
+ "Microsoft.App/managedEnvironments":
111
+ "specification/app/resource-manager/Microsoft.App/stable/{version}",
112
+
113
+ // Authorization
114
+ "Microsoft.Authorization/roleAssignments":
115
+ "specification/authorization/resource-manager/Microsoft.Authorization/stable/{version}",
116
+ "Microsoft.Authorization/roleDefinitions":
117
+ "specification/authorization/resource-manager/Microsoft.Authorization/stable/{version}",
118
+ "Microsoft.Authorization/policyDefinitions":
119
+ "specification/resources/resource-manager/Microsoft.Authorization/stable/{version}",
120
+ "Microsoft.Authorization/policyAssignments":
121
+ "specification/resources/resource-manager/Microsoft.Authorization/stable/{version}",
122
+ "Microsoft.Authorization/policySetDefinitions":
123
+ "specification/resources/resource-manager/Microsoft.Authorization/stable/{version}",
124
+
125
+ // Monitoring / Insights
126
+ "Microsoft.Insights/activityLogAlerts":
127
+ "specification/monitor/resource-manager/Microsoft.Insights/stable/{version}",
128
+ "Microsoft.Insights/metricAlerts":
129
+ "specification/monitor/resource-manager/Microsoft.Insights/stable/{version}",
130
+ "Microsoft.Insights/actionGroups":
131
+ "specification/monitor/resource-manager/Microsoft.Insights/stable/{version}",
132
+ "Microsoft.Insights/diagnosticSettings":
133
+ "specification/monitor/resource-manager/Microsoft.Insights/stable/{version}",
134
+
135
+ // Log Analytics
136
+ "Microsoft.OperationalInsights/workspaces":
137
+ "specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/{version}",
138
+ };
139
+
140
+ /**
141
+ * Build the GitHub tree URL for a given resource type and version.
142
+ */
143
+ function getSpecTreeUrl(resourceType: string, version: string): string {
144
+ const basePath = SPEC_PATH_MAP[resourceType];
145
+ if (basePath) {
146
+ const path = basePath.replace("{version}", version);
147
+ return `https://github.com/Azure/azure-rest-api-specs/tree/main/${path}`;
148
+ }
149
+ // Fallback: construct from resource type convention
150
+ return buildFallbackSpecUrl(resourceType, version);
151
+ }
152
+
153
+ /**
154
+ * Convention-based fallback for unmapped resource types.
155
+ * Microsoft.Foo/bars -> specification/foo/resource-manager/Microsoft.Foo/stable/{version}
156
+ */
157
+ function buildFallbackSpecUrl(resourceType: string, version: string): string {
158
+ const namespace = resourceType.split("/")[0]; // Microsoft.Foo
159
+ const service = namespace.replace("Microsoft.", "").toLowerCase(); // foo
160
+ const path = `specification/${service}/resource-manager/${namespace}/stable/${version}`;
161
+ return `https://github.com/Azure/azure-rest-api-specs/tree/main/${path}`;
162
+ }
163
+
164
+ module.exports = { SPEC_PATH_MAP, getSpecTreeUrl };
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2020",
4
+ "module": "commonjs",
5
+ "esModuleInterop": true,
6
+ "strict": false,
7
+ "resolveJsonModule": true,
8
+ "moduleResolution": "node"
9
+ },
10
+ "include": ["**/*.ts"]
11
+ }
package/setup.js CHANGED
@@ -1,2 +1,2 @@
1
- const cdktf = require("cdktf");
2
- cdktf.Testing.setupJest();
1
+ const cdktn = require("cdktn");
2
+ cdktn.Testing.setupJest();