@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.
- package/.jsii +51855 -36874
- package/API.md +62102 -40530
- package/README.md +15 -0
- package/docs/azure-api-version-update-pipeline.md +271 -0
- package/lib/azure-actiongroup/lib/action-group.d.ts +3 -3
- package/lib/azure-actiongroup/lib/action-group.js +5 -5
- package/lib/azure-actiongroup/test/action-group.integ.d.ts +1 -1
- package/lib/azure-actiongroup/test/action-group.integ.js +5 -5
- package/lib/azure-actiongroup/test/action-group.spec.js +9 -9
- package/lib/azure-activitylogalert/lib/activity-log-alert.d.ts +3 -3
- package/lib/azure-activitylogalert/lib/activity-log-alert.js +5 -5
- package/lib/azure-activitylogalert/test/activity-log-alert.integ.d.ts +1 -1
- package/lib/azure-activitylogalert/test/activity-log-alert.integ.js +6 -6
- package/lib/azure-activitylogalert/test/activity-log-alert.spec.js +9 -9
- package/lib/azure-aks/lib/aks-cluster.d.ts +6 -6
- package/lib/azure-aks/lib/aks-cluster.js +8 -8
- package/lib/azure-aks/test/aks-cluster.integ.d.ts +1 -1
- package/lib/azure-aks/test/aks-cluster.integ.js +5 -5
- package/lib/azure-aks/test/aks-cluster.spec.js +12 -12
- package/lib/azure-applicationinsights/lib/application-insights.d.ts +6 -6
- package/lib/azure-applicationinsights/lib/application-insights.js +8 -8
- package/lib/azure-applicationinsights/test/application-insights.integ.d.ts +1 -1
- package/lib/azure-applicationinsights/test/application-insights.integ.js +6 -6
- package/lib/azure-applicationinsights/test/application-insights.spec.js +5 -5
- package/lib/azure-containerapps/lib/container-app-environment.d.ts +8 -8
- package/lib/azure-containerapps/lib/container-app-environment.js +10 -10
- package/lib/azure-containerapps/lib/container-app.d.ts +9 -9
- package/lib/azure-containerapps/lib/container-app.js +11 -11
- package/lib/azure-containerapps/lib/container-apps-job-schemas.d.ts +8 -0
- package/lib/azure-containerapps/lib/container-apps-job-schemas.js +179 -0
- package/lib/azure-containerapps/lib/container-apps-job.d.ts +128 -0
- package/lib/azure-containerapps/lib/container-apps-job.js +81 -0
- package/lib/azure-containerapps/lib/index.d.ts +2 -0
- package/lib/azure-containerapps/lib/index.js +3 -1
- package/lib/azure-containerapps/test/container-app-environment.integ.d.ts +1 -1
- package/lib/azure-containerapps/test/container-app-environment.integ.js +5 -5
- package/lib/azure-containerapps/test/container-app-environment.spec.js +19 -19
- package/lib/azure-containerapps/test/container-app.integ.d.ts +1 -1
- package/lib/azure-containerapps/test/container-app.integ.js +5 -5
- package/lib/azure-containerapps/test/container-app.spec.js +30 -30
- package/lib/azure-containerapps/test/container-apps-job.integ.d.ts +6 -0
- package/lib/azure-containerapps/test/container-apps-job.integ.js +95 -0
- package/lib/azure-containerapps/test/container-apps-job.spec.d.ts +1 -0
- package/lib/azure-containerapps/test/container-apps-job.spec.js +261 -0
- package/lib/azure-containerregistry/lib/container-registry.d.ts +6 -6
- package/lib/azure-containerregistry/lib/container-registry.js +8 -8
- package/lib/azure-containerregistry/test/container-registry.integ.d.ts +1 -1
- package/lib/azure-containerregistry/test/container-registry.integ.js +5 -5
- package/lib/azure-containerregistry/test/container-registry.spec.js +11 -11
- package/lib/azure-cosmosdb/lib/cosmos-db.d.ts +6 -6
- package/lib/azure-cosmosdb/lib/cosmos-db.js +8 -8
- package/lib/azure-cosmosdb/test/cosmos-db.integ.d.ts +1 -1
- package/lib/azure-cosmosdb/test/cosmos-db.integ.js +5 -5
- package/lib/azure-cosmosdb/test/cosmos-db.spec.js +11 -11
- package/lib/azure-dataexplorer/index.d.ts +1 -0
- package/lib/azure-dataexplorer/index.js +18 -0
- package/lib/azure-dataexplorer/lib/data-explorer-cluster-schemas.d.ts +5 -0
- package/lib/azure-dataexplorer/lib/data-explorer-cluster-schemas.js +131 -0
- package/lib/azure-dataexplorer/lib/data-explorer-cluster.d.ts +54 -0
- package/lib/azure-dataexplorer/lib/data-explorer-cluster.js +91 -0
- package/lib/azure-dataexplorer/lib/data-explorer-database-schemas.d.ts +5 -0
- package/lib/azure-dataexplorer/lib/data-explorer-database-schemas.js +78 -0
- package/lib/azure-dataexplorer/lib/data-explorer-database.d.ts +24 -0
- package/lib/azure-dataexplorer/lib/data-explorer-database.js +68 -0
- package/lib/azure-dataexplorer/lib/data-explorer-table-schemas.d.ts +5 -0
- package/lib/azure-dataexplorer/lib/data-explorer-table-schemas.js +94 -0
- package/lib/azure-dataexplorer/lib/data-explorer-table.d.ts +25 -0
- package/lib/azure-dataexplorer/lib/data-explorer-table.js +62 -0
- package/lib/azure-dataexplorer/lib/index.d.ts +6 -0
- package/lib/azure-dataexplorer/lib/index.js +23 -0
- package/lib/azure-dataexplorer/test/data-explorer.integ.d.ts +1 -0
- package/lib/azure-dataexplorer/test/data-explorer.integ.js +78 -0
- package/lib/azure-dataexplorer/test/data-explorer.spec.d.ts +1 -0
- package/lib/azure-dataexplorer/test/data-explorer.spec.js +248 -0
- package/lib/azure-diagnosticsettings/lib/diagnostic-settings.d.ts +3 -3
- package/lib/azure-diagnosticsettings/lib/diagnostic-settings.js +5 -5
- package/lib/azure-diagnosticsettings/test/diagnostic-settings.spec.js +9 -9
- package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset.d.ts +7 -7
- package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset.js +9 -9
- package/lib/azure-dnsforwardingruleset/lib/forwarding-rule.d.ts +4 -4
- package/lib/azure-dnsforwardingruleset/lib/forwarding-rule.js +6 -6
- package/lib/azure-dnsforwardingruleset/lib/virtual-network-link.d.ts +4 -4
- package/lib/azure-dnsforwardingruleset/lib/virtual-network-link.js +6 -6
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.integ.d.ts +1 -1
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.integ.js +5 -5
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.spec.js +11 -11
- package/lib/azure-dnsforwardingruleset/test/forwarding-rule.spec.js +14 -14
- package/lib/azure-dnsforwardingruleset/test/virtual-network-link.spec.js +12 -12
- package/lib/azure-dnsresolver/lib/dns-resolver.d.ts +8 -8
- package/lib/azure-dnsresolver/lib/dns-resolver.js +10 -10
- package/lib/azure-dnsresolver/lib/inbound-endpoint.d.ts +6 -6
- package/lib/azure-dnsresolver/lib/inbound-endpoint.js +8 -8
- package/lib/azure-dnsresolver/lib/outbound-endpoint.d.ts +7 -7
- package/lib/azure-dnsresolver/lib/outbound-endpoint.js +9 -9
- package/lib/azure-dnsresolver/test/dns-resolver.integ.d.ts +1 -1
- package/lib/azure-dnsresolver/test/dns-resolver.integ.js +5 -5
- package/lib/azure-dnsresolver/test/dns-resolver.spec.js +11 -11
- package/lib/azure-dnsresolver/test/inbound-endpoint.integ.d.ts +1 -1
- package/lib/azure-dnsresolver/test/inbound-endpoint.integ.js +5 -5
- package/lib/azure-dnsresolver/test/inbound-endpoint.spec.js +12 -12
- package/lib/azure-dnsresolver/test/outbound-endpoint.integ.d.ts +1 -1
- package/lib/azure-dnsresolver/test/outbound-endpoint.integ.js +5 -5
- package/lib/azure-dnsresolver/test/outbound-endpoint.spec.js +9 -9
- package/lib/azure-dnszone/lib/dns-zone.d.ts +6 -6
- package/lib/azure-dnszone/lib/dns-zone.js +8 -8
- package/lib/azure-dnszone/lib/records/dns-records.d.ts +31 -31
- package/lib/azure-dnszone/lib/records/dns-records.js +42 -42
- package/lib/azure-dnszone/test/dns-records.integ.d.ts +1 -1
- package/lib/azure-dnszone/test/dns-records.integ.js +5 -5
- package/lib/azure-dnszone/test/dns-records.spec.js +57 -57
- package/lib/azure-dnszone/test/dns-zone.integ.d.ts +1 -1
- package/lib/azure-dnszone/test/dns-zone.integ.js +5 -5
- package/lib/azure-dnszone/test/dns-zone.spec.js +11 -11
- package/lib/azure-eventgrideventsubscription/index.d.ts +1 -0
- package/lib/azure-eventgrideventsubscription/index.js +18 -0
- package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription-schemas.d.ts +5 -0
- package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription-schemas.js +151 -0
- package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription.d.ts +59 -0
- package/lib/azure-eventgrideventsubscription/lib/event-grid-event-subscription.js +67 -0
- package/lib/azure-eventgrideventsubscription/lib/index.d.ts +2 -0
- package/lib/azure-eventgrideventsubscription/lib/index.js +19 -0
- package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.integ.d.ts +1 -0
- package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.integ.js +100 -0
- package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.spec.d.ts +1 -0
- package/lib/azure-eventgrideventsubscription/test/event-grid-event-subscription.spec.js +242 -0
- package/lib/azure-eventgridsystemtopic/index.d.ts +1 -0
- package/lib/azure-eventgridsystemtopic/index.js +18 -0
- package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic-schemas.d.ts +5 -0
- package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic-schemas.js +164 -0
- package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic.d.ts +46 -0
- package/lib/azure-eventgridsystemtopic/lib/event-grid-system-topic.js +68 -0
- package/lib/azure-eventgridsystemtopic/lib/index.d.ts +2 -0
- package/lib/azure-eventgridsystemtopic/lib/index.js +19 -0
- package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.integ.d.ts +1 -0
- package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.integ.js +64 -0
- package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.spec.d.ts +1 -0
- package/lib/azure-eventgridsystemtopic/test/event-grid-system-topic.spec.js +241 -0
- package/lib/azure-eventhub/index.d.ts +7 -0
- package/lib/azure-eventhub/index.js +24 -0
- package/lib/azure-eventhub/lib/event-hub-namespace.d.ts +204 -0
- package/lib/azure-eventhub/lib/event-hub-namespace.js +178 -0
- package/lib/azure-eventhub/lib/event-hub-schemas.d.ts +63 -0
- package/lib/azure-eventhub/lib/event-hub-schemas.js +370 -0
- package/lib/azure-eventhub/lib/event-hub.d.ts +153 -0
- package/lib/azure-eventhub/lib/event-hub.js +171 -0
- package/lib/azure-eventhub/lib/index.d.ts +6 -0
- package/lib/azure-eventhub/lib/index.js +23 -0
- package/lib/azure-eventhub/test/event-hub.integ.d.ts +9 -0
- package/lib/azure-eventhub/test/event-hub.integ.js +113 -0
- package/lib/azure-eventhub/test/event-hub.spec.d.ts +8 -0
- package/lib/azure-eventhub/test/event-hub.spec.js +438 -0
- package/lib/azure-functionapp/lib/function-app.d.ts +6 -6
- package/lib/azure-functionapp/lib/function-app.js +8 -8
- package/lib/azure-functionapp/test/function-app.integ.d.ts +1 -1
- package/lib/azure-functionapp/test/function-app.integ.js +5 -5
- package/lib/azure-functionapp/test/function-app.spec.js +12 -12
- package/lib/azure-keyvault/lib/key-vault.d.ts +6 -6
- package/lib/azure-keyvault/lib/key-vault.js +8 -8
- package/lib/azure-keyvault/test/key-vault.integ.d.ts +1 -1
- package/lib/azure-keyvault/test/key-vault.integ.js +5 -5
- package/lib/azure-keyvault/test/key-vault.spec.js +11 -11
- package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace.d.ts +1 -1
- package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace.js +3 -3
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.integ.d.ts +1 -1
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.integ.js +6 -6
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.spec.js +6 -6
- package/lib/azure-metricalert/lib/metric-alert.d.ts +3 -3
- package/lib/azure-metricalert/lib/metric-alert.js +5 -5
- package/lib/azure-metricalert/test/metric-alert.integ.d.ts +1 -1
- package/lib/azure-metricalert/test/metric-alert.integ.js +5 -5
- package/lib/azure-metricalert/test/metric-alert.spec.js +9 -9
- package/lib/azure-networkinterface/lib/network-interface.d.ts +5 -5
- package/lib/azure-networkinterface/lib/network-interface.js +7 -7
- package/lib/azure-networkinterface/test/network-interface.integ.d.ts +1 -1
- package/lib/azure-networkinterface/test/network-interface.integ.js +5 -5
- package/lib/azure-networkinterface/test/network-interface.spec.js +11 -11
- package/lib/azure-networksecuritygroup/lib/network-security-group.d.ts +6 -6
- package/lib/azure-networksecuritygroup/lib/network-security-group.js +8 -8
- package/lib/azure-networksecuritygroup/test/network-security-group.integ.d.ts +1 -1
- package/lib/azure-networksecuritygroup/test/network-security-group.integ.js +5 -5
- package/lib/azure-networksecuritygroup/test/network-security-group.spec.js +12 -12
- package/lib/azure-networkwatcher/lib/network-watcher.d.ts +1 -1
- package/lib/azure-networkwatcher/lib/network-watcher.js +3 -3
- package/lib/azure-networkwatcher/test/network-watcher.integ.d.ts +1 -1
- package/lib/azure-networkwatcher/test/network-watcher.integ.js +6 -6
- package/lib/azure-networkwatcher/test/network-watcher.spec.js +6 -6
- package/lib/azure-policyassignment/lib/policy-assignment.d.ts +3 -3
- package/lib/azure-policyassignment/lib/policy-assignment.js +5 -5
- package/lib/azure-policyassignment/test/policy-assignment.integ.d.ts +1 -1
- package/lib/azure-policyassignment/test/policy-assignment.integ.js +5 -5
- package/lib/azure-policyassignment/test/policy-assignment.spec.js +12 -12
- package/lib/azure-policydefinition/lib/policy-definition.d.ts +3 -3
- package/lib/azure-policydefinition/lib/policy-definition.js +5 -5
- package/lib/azure-policydefinition/test/policy-definition.integ.d.ts +1 -1
- package/lib/azure-policydefinition/test/policy-definition.integ.js +5 -5
- package/lib/azure-policydefinition/test/policy-definition.spec.js +19 -19
- package/lib/azure-policysetdefinition/lib/policy-set-definition.d.ts +1 -1
- package/lib/azure-policysetdefinition/lib/policy-set-definition.js +3 -3
- package/lib/azure-policysetdefinition/test/policy-set-definition.integ.d.ts +1 -1
- package/lib/azure-policysetdefinition/test/policy-set-definition.integ.js +6 -6
- package/lib/azure-policysetdefinition/test/policy-set-definition.spec.js +6 -6
- package/lib/azure-privatednszone/lib/private-dns-zone.d.ts +10 -10
- package/lib/azure-privatednszone/lib/private-dns-zone.js +12 -12
- package/lib/azure-privatednszone/lib/records/private-dns-records.d.ts +25 -25
- package/lib/azure-privatednszone/lib/records/private-dns-records.js +34 -34
- package/lib/azure-privatednszone/test/private-dns-records.integ.d.ts +1 -1
- package/lib/azure-privatednszone/test/private-dns-records.integ.js +5 -5
- package/lib/azure-privatednszone/test/private-dns-records.spec.js +49 -49
- package/lib/azure-privatednszone/test/private-dns-zone.integ.d.ts +1 -1
- package/lib/azure-privatednszone/test/private-dns-zone.integ.js +5 -5
- package/lib/azure-privatednszone/test/private-dns-zone.spec.js +12 -12
- package/lib/azure-privatednszonelink/lib/private-dns-zone-link.d.ts +6 -6
- package/lib/azure-privatednszonelink/lib/private-dns-zone-link.js +8 -8
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.integ.d.ts +1 -1
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.integ.js +5 -5
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.spec.js +12 -12
- package/lib/azure-publicipaddress/lib/public-ip-address.d.ts +5 -5
- package/lib/azure-publicipaddress/lib/public-ip-address.js +7 -7
- package/lib/azure-publicipaddress/test/public-ip-address.integ.d.ts +1 -1
- package/lib/azure-publicipaddress/test/public-ip-address.integ.js +6 -6
- package/lib/azure-publicipaddress/test/public-ip-address.spec.js +11 -11
- package/lib/azure-resourcegroup/lib/resource-group.d.ts +5 -5
- package/lib/azure-resourcegroup/lib/resource-group.js +7 -7
- package/lib/azure-resourcegroup/test/resource-group.integ.d.ts +1 -1
- package/lib/azure-resourcegroup/test/resource-group.integ.js +5 -5
- package/lib/azure-resourcegroup/test/resource-group.spec.js +14 -14
- package/lib/azure-roleassignment/lib/role-assignment.d.ts +3 -3
- package/lib/azure-roleassignment/lib/role-assignment.js +5 -5
- package/lib/azure-roleassignment/test/role-assignment.integ.d.ts +1 -1
- package/lib/azure-roleassignment/test/role-assignment.integ.js +5 -5
- package/lib/azure-roleassignment/test/role-assignment.spec.js +12 -12
- package/lib/azure-roledefinition/lib/role-definition.d.ts +3 -3
- package/lib/azure-roledefinition/lib/role-definition.js +5 -5
- package/lib/azure-roledefinition/test/role-definition.integ.d.ts +1 -1
- package/lib/azure-roledefinition/test/role-definition.integ.js +5 -5
- package/lib/azure-roledefinition/test/role-definition.spec.js +12 -12
- package/lib/azure-sreagent/lib/sre-agent.d.ts +8 -8
- package/lib/azure-sreagent/lib/sre-agent.js +10 -10
- package/lib/azure-sreagent/test/sre-agent.integ.d.ts +1 -1
- package/lib/azure-sreagent/test/sre-agent.integ.js +5 -5
- package/lib/azure-sreagent/test/sre-agent.spec.js +11 -11
- package/lib/azure-staticwebapp/lib/static-web-app.d.ts +6 -6
- package/lib/azure-staticwebapp/lib/static-web-app.js +8 -8
- package/lib/azure-staticwebapp/test/static-web-app.integ.d.ts +1 -1
- package/lib/azure-staticwebapp/test/static-web-app.integ.js +6 -6
- package/lib/azure-staticwebapp/test/static-web-app.spec.js +12 -12
- package/lib/azure-storageaccount/lib/storage-account.d.ts +6 -6
- package/lib/azure-storageaccount/lib/storage-account.js +8 -8
- package/lib/azure-storageaccount/test/storage-account.integ.d.ts +1 -1
- package/lib/azure-storageaccount/test/storage-account.integ.js +5 -5
- package/lib/azure-storageaccount/test/storage-account.spec.js +11 -11
- package/lib/azure-storageblobcontainer/index.d.ts +1 -0
- package/lib/azure-storageblobcontainer/index.js +18 -0
- package/lib/azure-storageblobcontainer/lib/index.d.ts +2 -0
- package/lib/azure-storageblobcontainer/lib/index.js +19 -0
- package/lib/azure-storageblobcontainer/lib/storage-blob-container-schemas.d.ts +5 -0
- package/lib/azure-storageblobcontainer/lib/storage-blob-container-schemas.js +108 -0
- package/lib/azure-storageblobcontainer/lib/storage-blob-container.d.ts +37 -0
- package/lib/azure-storageblobcontainer/lib/storage-blob-container.js +63 -0
- package/lib/azure-storageblobcontainer/test/storage-blob-container.integ.d.ts +1 -0
- package/lib/azure-storageblobcontainer/test/storage-blob-container.integ.js +60 -0
- package/lib/azure-storageblobcontainer/test/storage-blob-container.spec.d.ts +1 -0
- package/lib/azure-storageblobcontainer/test/storage-blob-container.spec.js +172 -0
- package/lib/azure-subnet/lib/subnet.d.ts +3 -3
- package/lib/azure-subnet/lib/subnet.js +5 -5
- package/lib/azure-subnet/test/subnet.integ.d.ts +1 -1
- package/lib/azure-subnet/test/subnet.integ.js +5 -5
- package/lib/azure-subnet/test/subnet.spec.js +9 -9
- package/lib/azure-userassignedidentity/index.d.ts +1 -0
- package/lib/azure-userassignedidentity/index.js +18 -0
- package/lib/azure-userassignedidentity/lib/index.d.ts +2 -0
- package/lib/azure-userassignedidentity/lib/index.js +19 -0
- package/lib/azure-userassignedidentity/lib/user-assigned-identity-schemas.d.ts +8 -0
- package/lib/azure-userassignedidentity/lib/user-assigned-identity-schemas.js +107 -0
- package/lib/azure-userassignedidentity/lib/user-assigned-identity.d.ts +37 -0
- package/lib/azure-userassignedidentity/lib/user-assigned-identity.js +85 -0
- package/lib/azure-userassignedidentity/test/user-assigned-identity.integ.d.ts +1 -0
- package/lib/azure-userassignedidentity/test/user-assigned-identity.integ.js +64 -0
- package/lib/azure-userassignedidentity/test/user-assigned-identity.spec.d.ts +1 -0
- package/lib/azure-userassignedidentity/test/user-assigned-identity.spec.js +241 -0
- package/lib/azure-virtualmachine/lib/virtual-machine.d.ts +6 -6
- package/lib/azure-virtualmachine/lib/virtual-machine.js +8 -8
- package/lib/azure-virtualmachine/test/virtual-machine.integ.d.ts +1 -1
- package/lib/azure-virtualmachine/test/virtual-machine.integ.js +5 -5
- package/lib/azure-virtualmachine/test/virtual-machine.spec.js +17 -17
- package/lib/azure-virtualnetwork/lib/virtual-network.d.ts +6 -6
- package/lib/azure-virtualnetwork/lib/virtual-network.js +8 -8
- package/lib/azure-virtualnetwork/test/virtual-network.integ.d.ts +1 -1
- package/lib/azure-virtualnetwork/test/virtual-network.integ.js +5 -5
- package/lib/azure-virtualnetwork/test/virtual-network.spec.js +12 -12
- package/lib/azure-virtualnetworkgateway/lib/virtual-network-gateway.d.ts +5 -5
- package/lib/azure-virtualnetworkgateway/lib/virtual-network-gateway.js +7 -7
- package/lib/azure-virtualnetworkgateway/test/virtual-network-gateway.integ.d.ts +1 -1
- package/lib/azure-virtualnetworkgateway/test/virtual-network-gateway.integ.js +5 -5
- package/lib/azure-virtualnetworkgateway/test/virtual-network-gateway.spec.js +13 -13
- package/lib/azure-virtualnetworkgatewayconnection/lib/virtual-network-gateway-connection.d.ts +5 -5
- package/lib/azure-virtualnetworkgatewayconnection/lib/virtual-network-gateway-connection.js +7 -7
- package/lib/azure-virtualnetworkgatewayconnection/test/virtual-network-gateway-connection.integ.d.ts +1 -1
- package/lib/azure-virtualnetworkgatewayconnection/test/virtual-network-gateway-connection.integ.js +5 -5
- package/lib/azure-virtualnetworkgatewayconnection/test/virtual-network-gateway-connection.spec.js +20 -20
- package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/ipam-pool-static-cidr.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/ipam-pool-static-cidr.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/ipam-pool.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/ipam-pool.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/network-group-static-member.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/network-group-static-member.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/network-group.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/network-group.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule.d.ts +4 -4
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule.js +6 -6
- package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager.d.ts +7 -7
- package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager.js +9 -9
- package/lib/azure-virtualnetworkmanager/test/ipam-pool-static-cidr.spec.js +17 -17
- package/lib/azure-virtualnetworkmanager/test/ipam-pool.spec.js +15 -15
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.integ.d.ts +1 -1
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.integ.js +5 -5
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.spec.js +57 -57
- package/lib/azure-vmss/lib/virtual-machine-scale-set.d.ts +72 -7
- package/lib/azure-vmss/lib/virtual-machine-scale-set.js +147 -8
- package/lib/azure-vmss/lib/vmss-schemas.d.ts +195 -0
- package/lib/azure-vmss/lib/vmss-schemas.js +33 -1
- package/lib/azure-vmss/test/virtual-machine-scale-set.integ.d.ts +1 -1
- package/lib/azure-vmss/test/virtual-machine-scale-set.integ.js +5 -5
- package/lib/azure-vmss/test/virtual-machine-scale-set.spec.js +474 -12
- package/lib/core-azure/lib/azapi/azapi-resource-tags.spec.js +6 -6
- package/lib/core-azure/lib/azapi/azapi-resource.d.ts +7 -7
- package/lib/core-azure/lib/azapi/azapi-resource.js +6 -6
- package/lib/core-azure/lib/azapi/azapi-resource.spec.js +7 -7
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-client-config/index.d.ts +12 -12
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-client-config/index.js +15 -15
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource/index.d.ts +35 -35
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource/index.js +58 -58
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-action/index.d.ts +25 -25
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-action/index.js +49 -49
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-id/index.d.ts +13 -13
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-id/index.js +22 -22
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-list/index.d.ts +24 -24
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-list/index.js +40 -40
- package/lib/core-azure/lib/azapi/providers-azapi/data-plane-resource/index.d.ts +44 -44
- package/lib/core-azure/lib/azapi/providers-azapi/data-plane-resource/index.js +72 -72
- package/lib/core-azure/lib/azapi/providers-azapi/index.js +2 -2
- package/lib/core-azure/lib/azapi/providers-azapi/lazy-index.js +2 -2
- package/lib/core-azure/lib/azapi/providers-azapi/provider/index.d.ts +54 -54
- package/lib/core-azure/lib/azapi/providers-azapi/provider/index.js +86 -86
- package/lib/core-azure/lib/azapi/providers-azapi/resource/index.d.ts +65 -65
- package/lib/core-azure/lib/azapi/providers-azapi/resource/index.js +102 -102
- package/lib/core-azure/lib/azapi/providers-azapi/resource-action/index.d.ts +25 -25
- package/lib/core-azure/lib/azapi/providers-azapi/resource-action/index.js +62 -62
- package/lib/core-azure/lib/azapi/providers-azapi/update-resource/index.d.ts +36 -36
- package/lib/core-azure/lib/azapi/providers-azapi/update-resource/index.js +69 -69
- package/lib/core-azure/lib/azapi/schema-mapper/schema-mapper.js +1 -1
- package/lib/core-azure/lib/version-manager/api-version-manager.js +1 -1
- package/lib/core-azure/lib/version-manager/interfaces/version-interfaces.js +7 -7
- package/lib/index.d.ts +26 -0
- package/lib/index.js +28 -2
- package/lib/testing/index.d.ts +1 -1
- package/lib/testing/index.js +25 -8
- package/lib/testing/lib/cleanup.js +1 -1
- package/lib/testing/lib/metadata.js +12 -4
- package/lib/testing/lib/naming.js +57 -1
- package/package.json +10 -22
- package/scripts/azure-version-updater/create-issue.ts +189 -0
- package/scripts/azure-version-updater/discover.ts +382 -0
- package/scripts/azure-version-updater/spec-mapping.ts +164 -0
- package/scripts/azure-version-updater/tsconfig.json +11 -0
- 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 };
|
package/setup.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const cdktn = require("cdktn");
|
|
2
|
+
cdktn.Testing.setupJest();
|