@microsoft/terraform-cdk-constructs 1.8.0 → 2.2.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 +48328 -33656
- package/API.md +56123 -38995
- 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-containerapps/index.d.ts +1 -0
- package/lib/azure-containerapps/index.js +18 -0
- package/lib/azure-containerapps/lib/container-app-environment-schemas.d.ts +50 -0
- package/lib/azure-containerapps/lib/container-app-environment-schemas.js +522 -0
- package/lib/azure-containerapps/lib/container-app-environment.d.ts +374 -0
- package/lib/azure-containerapps/lib/container-app-environment.js +310 -0
- package/lib/azure-containerapps/lib/container-app-schemas.d.ts +48 -0
- package/lib/azure-containerapps/lib/container-app-schemas.js +466 -0
- package/lib/azure-containerapps/lib/container-app.d.ts +925 -0
- package/lib/azure-containerapps/lib/container-app.js +320 -0
- package/lib/azure-containerapps/lib/index.d.ts +4 -0
- package/lib/azure-containerapps/lib/index.js +21 -0
- package/lib/azure-containerapps/test/container-app-environment.integ.d.ts +10 -0
- package/lib/azure-containerapps/test/container-app-environment.integ.js +82 -0
- package/lib/azure-containerapps/test/container-app-environment.spec.d.ts +9 -0
- package/lib/azure-containerapps/test/container-app-environment.spec.js +412 -0
- package/lib/azure-containerapps/test/container-app.integ.d.ts +10 -0
- package/lib/azure-containerapps/test/container-app.integ.js +119 -0
- package/lib/azure-containerapps/test/container-app.spec.d.ts +9 -0
- package/lib/azure-containerapps/test/container-app.spec.js +839 -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-loganalyticsworkspace/index.d.ts +6 -0
- package/lib/azure-loganalyticsworkspace/index.js +23 -0
- package/lib/azure-loganalyticsworkspace/lib/index.d.ts +5 -0
- package/lib/azure-loganalyticsworkspace/lib/index.js +22 -0
- package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace-schemas.d.ts +51 -0
- package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace-schemas.js +255 -0
- package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace.d.ts +301 -0
- package/lib/azure-loganalyticsworkspace/lib/log-analytics-workspace.js +213 -0
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.integ.d.ts +9 -0
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.integ.js +71 -0
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.spec.d.ts +8 -0
- package/lib/azure-loganalyticsworkspace/test/log-analytics-workspace.spec.js +504 -0
- 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/index.d.ts +14 -0
- package/lib/azure-networkwatcher/index.js +31 -0
- package/lib/azure-networkwatcher/lib/index.d.ts +5 -0
- package/lib/azure-networkwatcher/lib/index.js +22 -0
- package/lib/azure-networkwatcher/lib/network-watcher-schemas.d.ts +47 -0
- package/lib/azure-networkwatcher/lib/network-watcher-schemas.js +167 -0
- package/lib/azure-networkwatcher/lib/network-watcher.d.ts +181 -0
- package/lib/azure-networkwatcher/lib/network-watcher.js +187 -0
- package/lib/azure-networkwatcher/test/network-watcher.integ.d.ts +12 -0
- package/lib/azure-networkwatcher/test/network-watcher.integ.js +84 -0
- package/lib/azure-networkwatcher/test/network-watcher.spec.d.ts +8 -0
- package/lib/azure-networkwatcher/test/network-watcher.spec.js +312 -0
- 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/index.d.ts +10 -0
- package/lib/azure-policysetdefinition/index.js +27 -0
- package/lib/azure-policysetdefinition/lib/index.d.ts +5 -0
- package/lib/azure-policysetdefinition/lib/index.js +22 -0
- package/lib/azure-policysetdefinition/lib/policy-set-definition-schemas.d.ts +50 -0
- package/lib/azure-policysetdefinition/lib/policy-set-definition-schemas.js +255 -0
- package/lib/azure-policysetdefinition/lib/policy-set-definition.d.ts +426 -0
- package/lib/azure-policysetdefinition/lib/policy-set-definition.js +255 -0
- package/lib/azure-policysetdefinition/test/policy-set-definition.integ.d.ts +9 -0
- package/lib/azure-policysetdefinition/test/policy-set-definition.integ.js +56 -0
- package/lib/azure-policysetdefinition/test/policy-set-definition.spec.d.ts +8 -0
- package/lib/azure-policysetdefinition/test/policy-set-definition.spec.js +745 -0
- 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-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-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-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-schemas.js +2 -2
- package/lib/azure-virtualnetworkgateway/lib/virtual-network-gateway.d.ts +9 -7
- package/lib/azure-virtualnetworkgateway/lib/virtual-network-gateway.js +13 -10
- 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 +119 -11
- 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 +6 -6
- package/lib/azure-vmss/lib/virtual-machine-scale-set.js +8 -8
- 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 +12 -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 +12 -0
- package/lib/index.js +14 -2
- package/lib/testing/index.d.ts +1 -1
- package/lib/testing/index.js +8 -8
- package/lib/testing/lib/cleanup.js +1 -1
- package/lib/testing/lib/metadata.js +1 -1
- package/package.json +10 -22
- package/setup.js +2 -2
|
@@ -0,0 +1,925 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Azure Container App implementation using AzapiResource framework
|
|
3
|
+
*
|
|
4
|
+
* This class provides a single, version-aware implementation that automatically handles
|
|
5
|
+
* version management, schema validation, and property transformation across all
|
|
6
|
+
* supported API versions.
|
|
7
|
+
*
|
|
8
|
+
* Supported API Versions:
|
|
9
|
+
* - 2024-03-01 (Active)
|
|
10
|
+
* - 2025-07-01 (Active, Latest)
|
|
11
|
+
*
|
|
12
|
+
* Features:
|
|
13
|
+
* - Automatic latest version resolution when no version is specified
|
|
14
|
+
* - Explicit version pinning for stability requirements
|
|
15
|
+
* - Schema-driven validation and transformation
|
|
16
|
+
* - Full backward compatibility with existing interface
|
|
17
|
+
* - JSII compliance for multi-language support
|
|
18
|
+
* - Ingress with external/internal access, TLS, CORS, sticky sessions
|
|
19
|
+
* - Dapr sidecar integration for microservice patterns
|
|
20
|
+
* - Horizontal scaling with HTTP, TCP, custom (KEDA), and Azure Queue rules
|
|
21
|
+
* - Secrets management with Key Vault references
|
|
22
|
+
* - Managed identity (SystemAssigned and UserAssigned)
|
|
23
|
+
* - Init containers, volume mounts, and health probes
|
|
24
|
+
* - Multiple revision mode for blue-green deployments
|
|
25
|
+
*/
|
|
26
|
+
import * as cdktn from "cdktn";
|
|
27
|
+
import { Construct } from "constructs";
|
|
28
|
+
import { AzapiResource, AzapiResourceProps } from "../../core-azure/lib/azapi/azapi-resource";
|
|
29
|
+
import { ApiSchema } from "../../core-azure/lib/version-manager/interfaces/version-interfaces";
|
|
30
|
+
/**
|
|
31
|
+
* Environment variable for a container
|
|
32
|
+
*/
|
|
33
|
+
export interface ContainerAppEnvVar {
|
|
34
|
+
/**
|
|
35
|
+
* Environment variable name
|
|
36
|
+
*/
|
|
37
|
+
readonly name: string;
|
|
38
|
+
/**
|
|
39
|
+
* Non-secret environment variable value
|
|
40
|
+
*/
|
|
41
|
+
readonly value?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Name of the secret from which to pull the value
|
|
44
|
+
*/
|
|
45
|
+
readonly secretRef?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Container resource requirements
|
|
49
|
+
*/
|
|
50
|
+
export interface ContainerAppContainerResources {
|
|
51
|
+
/**
|
|
52
|
+
* Required CPU in cores (e.g., 0.25, 0.5, 1.0, 2.0)
|
|
53
|
+
*/
|
|
54
|
+
readonly cpu?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Required memory (e.g., "0.5Gi", "1Gi", "2Gi")
|
|
57
|
+
*/
|
|
58
|
+
readonly memory?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Volume mount for a container
|
|
62
|
+
*/
|
|
63
|
+
export interface ContainerAppVolumeMount {
|
|
64
|
+
/**
|
|
65
|
+
* Name of the volume to mount (must match a volume name)
|
|
66
|
+
*/
|
|
67
|
+
readonly volumeName: string;
|
|
68
|
+
/**
|
|
69
|
+
* Path within the container to mount the volume
|
|
70
|
+
*/
|
|
71
|
+
readonly mountPath: string;
|
|
72
|
+
/**
|
|
73
|
+
* Path within the volume from which the container's volume should be mounted
|
|
74
|
+
*/
|
|
75
|
+
readonly subPath?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* HTTP header for a probe
|
|
79
|
+
*/
|
|
80
|
+
export interface ContainerAppProbeHttpHeader {
|
|
81
|
+
/**
|
|
82
|
+
* The header field name
|
|
83
|
+
*/
|
|
84
|
+
readonly name: string;
|
|
85
|
+
/**
|
|
86
|
+
* The header field value
|
|
87
|
+
*/
|
|
88
|
+
readonly value: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* HTTP GET action for a probe
|
|
92
|
+
*/
|
|
93
|
+
export interface ContainerAppProbeHttpGet {
|
|
94
|
+
/**
|
|
95
|
+
* Path to access on the HTTP server
|
|
96
|
+
*/
|
|
97
|
+
readonly path?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Port number to access on the container
|
|
100
|
+
*/
|
|
101
|
+
readonly port: number;
|
|
102
|
+
/**
|
|
103
|
+
* Scheme to use for connecting to the host (HTTP or HTTPS)
|
|
104
|
+
*/
|
|
105
|
+
readonly scheme?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Custom headers to set in the request
|
|
108
|
+
*/
|
|
109
|
+
readonly httpHeaders?: ContainerAppProbeHttpHeader[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* TCP socket action for a probe
|
|
113
|
+
*/
|
|
114
|
+
export interface ContainerAppProbeTcpSocket {
|
|
115
|
+
/**
|
|
116
|
+
* TCP port to connect to
|
|
117
|
+
*/
|
|
118
|
+
readonly port: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Container probe (liveness, readiness, or startup)
|
|
122
|
+
*/
|
|
123
|
+
export interface ContainerAppProbe {
|
|
124
|
+
/**
|
|
125
|
+
* The type of probe: Liveness, Readiness, or Startup
|
|
126
|
+
*/
|
|
127
|
+
readonly type?: string;
|
|
128
|
+
/**
|
|
129
|
+
* HTTPGet specifies the HTTP request to perform
|
|
130
|
+
*/
|
|
131
|
+
readonly httpGet?: ContainerAppProbeHttpGet;
|
|
132
|
+
/**
|
|
133
|
+
* TCPSocket specifies an action involving a TCP port
|
|
134
|
+
*/
|
|
135
|
+
readonly tcpSocket?: ContainerAppProbeTcpSocket;
|
|
136
|
+
/**
|
|
137
|
+
* Number of seconds after the container has started before probes are initiated
|
|
138
|
+
*/
|
|
139
|
+
readonly initialDelaySeconds?: number;
|
|
140
|
+
/**
|
|
141
|
+
* How often (in seconds) to perform the probe
|
|
142
|
+
*/
|
|
143
|
+
readonly periodSeconds?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Number of seconds after which the probe times out
|
|
146
|
+
*/
|
|
147
|
+
readonly timeoutSeconds?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Minimum consecutive successes for the probe to be considered successful
|
|
150
|
+
*/
|
|
151
|
+
readonly successThreshold?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Minimum consecutive failures for the probe to be considered failed
|
|
154
|
+
*/
|
|
155
|
+
readonly failureThreshold?: number;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Container definition
|
|
159
|
+
*/
|
|
160
|
+
export interface ContainerAppContainer {
|
|
161
|
+
/**
|
|
162
|
+
* Container image tag
|
|
163
|
+
*/
|
|
164
|
+
readonly image: string;
|
|
165
|
+
/**
|
|
166
|
+
* Custom container name
|
|
167
|
+
*/
|
|
168
|
+
readonly name: string;
|
|
169
|
+
/**
|
|
170
|
+
* Container resource requirements
|
|
171
|
+
*/
|
|
172
|
+
readonly resources?: ContainerAppContainerResources;
|
|
173
|
+
/**
|
|
174
|
+
* Container environment variables
|
|
175
|
+
*/
|
|
176
|
+
readonly env?: ContainerAppEnvVar[];
|
|
177
|
+
/**
|
|
178
|
+
* Container start command
|
|
179
|
+
*/
|
|
180
|
+
readonly command?: string[];
|
|
181
|
+
/**
|
|
182
|
+
* Container start command arguments
|
|
183
|
+
*/
|
|
184
|
+
readonly args?: string[];
|
|
185
|
+
/**
|
|
186
|
+
* List of probes for the container
|
|
187
|
+
*/
|
|
188
|
+
readonly probes?: ContainerAppProbe[];
|
|
189
|
+
/**
|
|
190
|
+
* Container volume mounts
|
|
191
|
+
*/
|
|
192
|
+
readonly volumeMounts?: ContainerAppVolumeMount[];
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Azure Queue scale rule configuration
|
|
196
|
+
*/
|
|
197
|
+
export interface ContainerAppAzureQueueScaleRule {
|
|
198
|
+
/**
|
|
199
|
+
* Azure Storage account name
|
|
200
|
+
*/
|
|
201
|
+
readonly accountName?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Azure Storage queue name
|
|
204
|
+
*/
|
|
205
|
+
readonly queueName?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Queue length threshold to trigger scaling
|
|
208
|
+
*/
|
|
209
|
+
readonly queueLength?: number;
|
|
210
|
+
/**
|
|
211
|
+
* Managed identity to authenticate with the storage account
|
|
212
|
+
*/
|
|
213
|
+
readonly identity?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Custom (KEDA) scale rule configuration
|
|
217
|
+
*/
|
|
218
|
+
export interface ContainerAppCustomScaleRule {
|
|
219
|
+
/**
|
|
220
|
+
* KEDA trigger type
|
|
221
|
+
*/
|
|
222
|
+
readonly type: string;
|
|
223
|
+
/**
|
|
224
|
+
* Trigger metadata as key-value pairs
|
|
225
|
+
*/
|
|
226
|
+
readonly metadata?: {
|
|
227
|
+
[key: string]: string;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Managed identity for the custom scaler
|
|
231
|
+
*/
|
|
232
|
+
readonly identity?: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* HTTP scale rule configuration
|
|
236
|
+
*/
|
|
237
|
+
export interface ContainerAppHttpScaleRule {
|
|
238
|
+
/**
|
|
239
|
+
* HTTP trigger metadata as key-value pairs
|
|
240
|
+
*/
|
|
241
|
+
readonly metadata?: {
|
|
242
|
+
[key: string]: string;
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* TCP scale rule configuration
|
|
247
|
+
*/
|
|
248
|
+
export interface ContainerAppTcpScaleRule {
|
|
249
|
+
/**
|
|
250
|
+
* TCP trigger metadata as key-value pairs
|
|
251
|
+
*/
|
|
252
|
+
readonly metadata?: {
|
|
253
|
+
[key: string]: string;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Scale rule definition
|
|
258
|
+
*/
|
|
259
|
+
export interface ContainerAppScaleRule {
|
|
260
|
+
/**
|
|
261
|
+
* Scale rule name
|
|
262
|
+
*/
|
|
263
|
+
readonly name: string;
|
|
264
|
+
/**
|
|
265
|
+
* Azure Queue scale rule
|
|
266
|
+
*/
|
|
267
|
+
readonly azureQueue?: ContainerAppAzureQueueScaleRule;
|
|
268
|
+
/**
|
|
269
|
+
* Custom scale rule (KEDA)
|
|
270
|
+
*/
|
|
271
|
+
readonly custom?: ContainerAppCustomScaleRule;
|
|
272
|
+
/**
|
|
273
|
+
* HTTP scale rule
|
|
274
|
+
*/
|
|
275
|
+
readonly http?: ContainerAppHttpScaleRule;
|
|
276
|
+
/**
|
|
277
|
+
* TCP scale rule
|
|
278
|
+
*/
|
|
279
|
+
readonly tcp?: ContainerAppTcpScaleRule;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Scale configuration for the Container App
|
|
283
|
+
*/
|
|
284
|
+
export interface ContainerAppScale {
|
|
285
|
+
/**
|
|
286
|
+
* Minimum number of replicas
|
|
287
|
+
* @default 0
|
|
288
|
+
*/
|
|
289
|
+
readonly minReplicas?: number;
|
|
290
|
+
/**
|
|
291
|
+
* Maximum number of replicas
|
|
292
|
+
* @default 10
|
|
293
|
+
*/
|
|
294
|
+
readonly maxReplicas?: number;
|
|
295
|
+
/**
|
|
296
|
+
* Cooldown period in seconds before scaling down (2025-07-01+)
|
|
297
|
+
*/
|
|
298
|
+
readonly cooldownPeriod?: number;
|
|
299
|
+
/**
|
|
300
|
+
* Polling interval in seconds for checking scale rules (2025-07-01+)
|
|
301
|
+
*/
|
|
302
|
+
readonly pollingInterval?: number;
|
|
303
|
+
/**
|
|
304
|
+
* Scaling rules
|
|
305
|
+
*/
|
|
306
|
+
readonly rules?: ContainerAppScaleRule[];
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Volume definition for the Container App
|
|
310
|
+
*/
|
|
311
|
+
export interface ContainerAppVolume {
|
|
312
|
+
/**
|
|
313
|
+
* Volume name
|
|
314
|
+
*/
|
|
315
|
+
readonly name: string;
|
|
316
|
+
/**
|
|
317
|
+
* Storage type: AzureFile, EmptyDir, NfsAzureFile, or Secret
|
|
318
|
+
*/
|
|
319
|
+
readonly storageType?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Name of the storage resource (for AzureFile and NfsAzureFile)
|
|
322
|
+
*/
|
|
323
|
+
readonly storageName?: string;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Service bind configuration (2025-07-01+)
|
|
327
|
+
*/
|
|
328
|
+
export interface ContainerAppServiceBind {
|
|
329
|
+
/**
|
|
330
|
+
* Resource ID of the service to bind to
|
|
331
|
+
*/
|
|
332
|
+
readonly serviceId: string;
|
|
333
|
+
/**
|
|
334
|
+
* Name of the service binding
|
|
335
|
+
*/
|
|
336
|
+
readonly name: string;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Container App template
|
|
340
|
+
*/
|
|
341
|
+
export interface ContainerAppTemplate {
|
|
342
|
+
/**
|
|
343
|
+
* List of container definitions for the Container App
|
|
344
|
+
*/
|
|
345
|
+
readonly containers: ContainerAppContainer[];
|
|
346
|
+
/**
|
|
347
|
+
* List of specialized containers that run before app containers
|
|
348
|
+
*/
|
|
349
|
+
readonly initContainers?: ContainerAppContainer[];
|
|
350
|
+
/**
|
|
351
|
+
* Scaling properties for the Container App
|
|
352
|
+
*/
|
|
353
|
+
readonly scale?: ContainerAppScale;
|
|
354
|
+
/**
|
|
355
|
+
* List of volume definitions for the Container App
|
|
356
|
+
*/
|
|
357
|
+
readonly volumes?: ContainerAppVolume[];
|
|
358
|
+
/**
|
|
359
|
+
* User friendly suffix appended to the revision name
|
|
360
|
+
*/
|
|
361
|
+
readonly revisionSuffix?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Optional duration in seconds for graceful termination
|
|
364
|
+
*/
|
|
365
|
+
readonly terminationGracePeriodSeconds?: number;
|
|
366
|
+
/**
|
|
367
|
+
* List of container app services bound to the app (2025-07-01+)
|
|
368
|
+
*/
|
|
369
|
+
readonly serviceBinds?: ContainerAppServiceBind[];
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Traffic weight configuration for ingress
|
|
373
|
+
*/
|
|
374
|
+
export interface ContainerAppIngressTraffic {
|
|
375
|
+
/**
|
|
376
|
+
* Name of a revision
|
|
377
|
+
*/
|
|
378
|
+
readonly revisionName?: string;
|
|
379
|
+
/**
|
|
380
|
+
* Indicates if this is the latest revision
|
|
381
|
+
*/
|
|
382
|
+
readonly latestRevision?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Traffic weight assigned to the revision
|
|
385
|
+
*/
|
|
386
|
+
readonly weight?: number;
|
|
387
|
+
/**
|
|
388
|
+
* Associates a traffic label with a revision
|
|
389
|
+
*/
|
|
390
|
+
readonly label?: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* IP security restriction for ingress
|
|
394
|
+
*/
|
|
395
|
+
export interface ContainerAppIngressIpSecurityRestriction {
|
|
396
|
+
/**
|
|
397
|
+
* Name for the restriction
|
|
398
|
+
*/
|
|
399
|
+
readonly name: string;
|
|
400
|
+
/**
|
|
401
|
+
* Description of the restriction
|
|
402
|
+
*/
|
|
403
|
+
readonly description?: string;
|
|
404
|
+
/**
|
|
405
|
+
* CIDR notation to match incoming IP address
|
|
406
|
+
*/
|
|
407
|
+
readonly ipAddressRange: string;
|
|
408
|
+
/**
|
|
409
|
+
* Allow or Deny
|
|
410
|
+
*/
|
|
411
|
+
readonly action: string;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* CORS policy for ingress
|
|
415
|
+
*/
|
|
416
|
+
export interface ContainerAppIngressCorsPolicy {
|
|
417
|
+
/**
|
|
418
|
+
* Allowed origins
|
|
419
|
+
*/
|
|
420
|
+
readonly allowedOrigins?: string[];
|
|
421
|
+
/**
|
|
422
|
+
* Allowed methods
|
|
423
|
+
*/
|
|
424
|
+
readonly allowedMethods?: string[];
|
|
425
|
+
/**
|
|
426
|
+
* Allowed headers
|
|
427
|
+
*/
|
|
428
|
+
readonly allowedHeaders?: string[];
|
|
429
|
+
/**
|
|
430
|
+
* Expose headers
|
|
431
|
+
*/
|
|
432
|
+
readonly exposeHeaders?: string[];
|
|
433
|
+
/**
|
|
434
|
+
* Max age in seconds
|
|
435
|
+
*/
|
|
436
|
+
readonly maxAge?: number;
|
|
437
|
+
/**
|
|
438
|
+
* Allow credentials
|
|
439
|
+
*/
|
|
440
|
+
readonly allowCredentials?: boolean;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Sticky session configuration
|
|
444
|
+
*/
|
|
445
|
+
export interface ContainerAppIngressStickySessions {
|
|
446
|
+
/**
|
|
447
|
+
* Sticky session affinity: 'none' or 'sticky'
|
|
448
|
+
*/
|
|
449
|
+
readonly affinity?: string;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Additional port mapping for ingress (2025-07-01+)
|
|
453
|
+
*/
|
|
454
|
+
export interface ContainerAppIngressAdditionalPortMapping {
|
|
455
|
+
/**
|
|
456
|
+
* Whether the port is externally accessible
|
|
457
|
+
*/
|
|
458
|
+
readonly external?: boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Target port in the container
|
|
461
|
+
*/
|
|
462
|
+
readonly targetPort: number;
|
|
463
|
+
/**
|
|
464
|
+
* Specifies the exposed port for the target port
|
|
465
|
+
*/
|
|
466
|
+
readonly exposedPort?: number;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Ingress configuration for the Container App
|
|
470
|
+
*/
|
|
471
|
+
export interface ContainerAppIngress {
|
|
472
|
+
/**
|
|
473
|
+
* Whether the ingress is externally accessible
|
|
474
|
+
*/
|
|
475
|
+
readonly external?: boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Target port in the container for incoming traffic
|
|
478
|
+
*/
|
|
479
|
+
readonly targetPort?: number;
|
|
480
|
+
/**
|
|
481
|
+
* Ingress transport protocol: 'auto', 'http', 'http2', or 'tcp'
|
|
482
|
+
* @default "auto"
|
|
483
|
+
*/
|
|
484
|
+
readonly transport?: string;
|
|
485
|
+
/**
|
|
486
|
+
* Traffic weights for revisions
|
|
487
|
+
*/
|
|
488
|
+
readonly traffic?: ContainerAppIngressTraffic[];
|
|
489
|
+
/**
|
|
490
|
+
* Custom domain bindings for the Container App's hostname
|
|
491
|
+
*/
|
|
492
|
+
readonly customDomains?: any[];
|
|
493
|
+
/**
|
|
494
|
+
* IP security restrictions
|
|
495
|
+
*/
|
|
496
|
+
readonly ipSecurityRestrictions?: ContainerAppIngressIpSecurityRestriction[];
|
|
497
|
+
/**
|
|
498
|
+
* CORS policy for the Container App
|
|
499
|
+
*/
|
|
500
|
+
readonly corsPolicy?: ContainerAppIngressCorsPolicy;
|
|
501
|
+
/**
|
|
502
|
+
* Sticky sessions configuration
|
|
503
|
+
*/
|
|
504
|
+
readonly stickySessions?: ContainerAppIngressStickySessions;
|
|
505
|
+
/**
|
|
506
|
+
* Client certificate mode
|
|
507
|
+
*/
|
|
508
|
+
readonly clientCertificateMode?: string;
|
|
509
|
+
/**
|
|
510
|
+
* Additional port mappings for the Container App (2025-07-01+)
|
|
511
|
+
*/
|
|
512
|
+
readonly additionalPortMappings?: ContainerAppIngressAdditionalPortMapping[];
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Dapr configuration for the Container App
|
|
516
|
+
*/
|
|
517
|
+
export interface ContainerAppDapr {
|
|
518
|
+
/**
|
|
519
|
+
* Whether Dapr is enabled
|
|
520
|
+
*/
|
|
521
|
+
readonly enabled?: boolean;
|
|
522
|
+
/**
|
|
523
|
+
* Dapr application identifier
|
|
524
|
+
*/
|
|
525
|
+
readonly appId?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Port on which the Dapr side car will listen
|
|
528
|
+
*/
|
|
529
|
+
readonly appPort?: number;
|
|
530
|
+
/**
|
|
531
|
+
* Protocol used by Dapr to communicate with the app: 'http' or 'grpc'
|
|
532
|
+
* @default "http"
|
|
533
|
+
*/
|
|
534
|
+
readonly appProtocol?: string;
|
|
535
|
+
/**
|
|
536
|
+
* Max size of HTTP request body in MB to handle by Dapr HTTP server
|
|
537
|
+
*/
|
|
538
|
+
readonly httpMaxRequestSize?: number;
|
|
539
|
+
/**
|
|
540
|
+
* Max size of HTTP header read buffer in KB to handle by Dapr HTTP server
|
|
541
|
+
*/
|
|
542
|
+
readonly httpReadBufferSize?: number;
|
|
543
|
+
/**
|
|
544
|
+
* Dapr log level: 'debug', 'info', 'warn', 'error'
|
|
545
|
+
*/
|
|
546
|
+
readonly logLevel?: string;
|
|
547
|
+
/**
|
|
548
|
+
* Whether to enable API logging for the Dapr sidecar
|
|
549
|
+
*/
|
|
550
|
+
readonly enableApiLogging?: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Maximum number of concurrent requests
|
|
553
|
+
*/
|
|
554
|
+
readonly maxConcurrency?: number;
|
|
555
|
+
/**
|
|
556
|
+
* App health check configuration
|
|
557
|
+
*/
|
|
558
|
+
readonly appHealth?: ContainerAppDaprHealthConfig;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Dapr app health check configuration
|
|
562
|
+
*/
|
|
563
|
+
export interface ContainerAppDaprHealthConfig {
|
|
564
|
+
/**
|
|
565
|
+
* Whether app health check is enabled
|
|
566
|
+
*/
|
|
567
|
+
readonly enabled?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Health check endpoint path
|
|
570
|
+
*/
|
|
571
|
+
readonly path?: string;
|
|
572
|
+
/**
|
|
573
|
+
* Probe interval in seconds
|
|
574
|
+
*/
|
|
575
|
+
readonly probeIntervalSeconds?: number;
|
|
576
|
+
/**
|
|
577
|
+
* Probe timeout in milliseconds
|
|
578
|
+
*/
|
|
579
|
+
readonly probeTimeoutMilliseconds?: number;
|
|
580
|
+
/**
|
|
581
|
+
* Number of consecutive failures before marking unhealthy
|
|
582
|
+
*/
|
|
583
|
+
readonly threshold?: number;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Container registry configuration
|
|
587
|
+
*/
|
|
588
|
+
export interface ContainerAppRegistry {
|
|
589
|
+
/**
|
|
590
|
+
* Container registry server URL
|
|
591
|
+
*/
|
|
592
|
+
readonly server: string;
|
|
593
|
+
/**
|
|
594
|
+
* Managed identity to authenticate with the registry
|
|
595
|
+
*/
|
|
596
|
+
readonly identity?: string;
|
|
597
|
+
/**
|
|
598
|
+
* Registry username
|
|
599
|
+
*/
|
|
600
|
+
readonly username?: string;
|
|
601
|
+
/**
|
|
602
|
+
* Name of the secret containing the registry password
|
|
603
|
+
*/
|
|
604
|
+
readonly passwordSecretRef?: string;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Secret configuration for the Container App
|
|
608
|
+
*/
|
|
609
|
+
export interface ContainerAppSecret {
|
|
610
|
+
/**
|
|
611
|
+
* Secret name
|
|
612
|
+
*/
|
|
613
|
+
readonly name: string;
|
|
614
|
+
/**
|
|
615
|
+
* Secret value (mutually exclusive with keyVaultUrl)
|
|
616
|
+
*/
|
|
617
|
+
readonly value?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Key Vault secret URI (mutually exclusive with value)
|
|
620
|
+
*/
|
|
621
|
+
readonly keyVaultUrl?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Resource ID of a managed identity to authenticate with Key Vault
|
|
624
|
+
*/
|
|
625
|
+
readonly identity?: string;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Identity settings for lifecycle phases (2025-07-01+)
|
|
629
|
+
*/
|
|
630
|
+
export interface ContainerAppIdentitySetting {
|
|
631
|
+
/**
|
|
632
|
+
* Resource ID of a managed identity or 'system' for system-assigned
|
|
633
|
+
*/
|
|
634
|
+
readonly identity: string;
|
|
635
|
+
/**
|
|
636
|
+
* The lifecycle stage: 'All', 'Init', or 'Main'
|
|
637
|
+
*/
|
|
638
|
+
readonly lifecycle: string;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Java runtime configuration (2025-07-01+)
|
|
642
|
+
*/
|
|
643
|
+
export interface ContainerAppJavaRuntimeConfig {
|
|
644
|
+
/**
|
|
645
|
+
* Whether to enable Java metrics
|
|
646
|
+
*/
|
|
647
|
+
readonly enableMetrics?: boolean;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Runtime configuration (2025-07-01+)
|
|
651
|
+
*/
|
|
652
|
+
export interface ContainerAppRuntime {
|
|
653
|
+
/**
|
|
654
|
+
* Java runtime configuration
|
|
655
|
+
*/
|
|
656
|
+
readonly java?: ContainerAppJavaRuntimeConfig;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Service configuration for dev services
|
|
660
|
+
*/
|
|
661
|
+
export interface ContainerAppService {
|
|
662
|
+
/**
|
|
663
|
+
* Dev Service type (e.g., 'redis', 'postgres', 'kafka')
|
|
664
|
+
*/
|
|
665
|
+
readonly type: string;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Configuration properties for the Container App
|
|
669
|
+
*/
|
|
670
|
+
export interface ContainerAppConfiguration {
|
|
671
|
+
/**
|
|
672
|
+
* Active revisions mode: 'Single' or 'Multiple'
|
|
673
|
+
* @default "Single"
|
|
674
|
+
*/
|
|
675
|
+
readonly activeRevisionsMode?: string;
|
|
676
|
+
/**
|
|
677
|
+
* Ingress configuration
|
|
678
|
+
*/
|
|
679
|
+
readonly ingress?: ContainerAppIngress;
|
|
680
|
+
/**
|
|
681
|
+
* Dapr configuration
|
|
682
|
+
*/
|
|
683
|
+
readonly dapr?: ContainerAppDapr;
|
|
684
|
+
/**
|
|
685
|
+
* Collection of private container registry credentials
|
|
686
|
+
*/
|
|
687
|
+
readonly registries?: ContainerAppRegistry[];
|
|
688
|
+
/**
|
|
689
|
+
* Collection of secrets used by a Container App
|
|
690
|
+
*/
|
|
691
|
+
readonly secrets?: ContainerAppSecret[];
|
|
692
|
+
/**
|
|
693
|
+
* Maximum number of inactive revisions to keep
|
|
694
|
+
*/
|
|
695
|
+
readonly maxInactiveRevisions?: number;
|
|
696
|
+
/**
|
|
697
|
+
* Container App to be a dev Container App Service (2025-07-01+)
|
|
698
|
+
*/
|
|
699
|
+
readonly service?: ContainerAppService;
|
|
700
|
+
/**
|
|
701
|
+
* Runtime configuration (2025-07-01+)
|
|
702
|
+
*/
|
|
703
|
+
readonly runtime?: ContainerAppRuntime;
|
|
704
|
+
/**
|
|
705
|
+
* Identity settings for lifecycle phases (2025-07-01+)
|
|
706
|
+
*/
|
|
707
|
+
readonly identitySettings?: ContainerAppIdentitySetting[];
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Managed service identity configuration
|
|
711
|
+
*/
|
|
712
|
+
export interface ContainerAppIdentity {
|
|
713
|
+
/**
|
|
714
|
+
* Type of managed service identity:
|
|
715
|
+
* 'None', 'SystemAssigned', 'UserAssigned', or 'SystemAssigned,UserAssigned'
|
|
716
|
+
*/
|
|
717
|
+
readonly type: string;
|
|
718
|
+
/**
|
|
719
|
+
* User-assigned identity resource IDs
|
|
720
|
+
*/
|
|
721
|
+
readonly userAssignedIdentities?: {
|
|
722
|
+
[key: string]: any;
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Properties for the unified Azure Container App
|
|
727
|
+
*
|
|
728
|
+
* Extends AzapiResourceProps with Container App specific properties
|
|
729
|
+
*/
|
|
730
|
+
export interface ContainerAppProps extends AzapiResourceProps {
|
|
731
|
+
/**
|
|
732
|
+
* Resource ID of the Container App Environment where this app will be hosted
|
|
733
|
+
*/
|
|
734
|
+
readonly environmentId: string;
|
|
735
|
+
/**
|
|
736
|
+
* Container App versioned application definition
|
|
737
|
+
*/
|
|
738
|
+
readonly template: ContainerAppTemplate;
|
|
739
|
+
/**
|
|
740
|
+
* Non-versioned Container App configuration properties
|
|
741
|
+
*/
|
|
742
|
+
readonly configuration?: ContainerAppConfiguration;
|
|
743
|
+
/**
|
|
744
|
+
* Managed identity configuration
|
|
745
|
+
*/
|
|
746
|
+
readonly identity?: ContainerAppIdentity;
|
|
747
|
+
/**
|
|
748
|
+
* Workload profile name to pin for container app execution
|
|
749
|
+
*/
|
|
750
|
+
readonly workloadProfileName?: string;
|
|
751
|
+
/**
|
|
752
|
+
* The lifecycle rules to ignore changes
|
|
753
|
+
* @example ["tags"]
|
|
754
|
+
*/
|
|
755
|
+
readonly ignoreChanges?: string[];
|
|
756
|
+
/**
|
|
757
|
+
* Resource group ID where the Container App will be created
|
|
758
|
+
*/
|
|
759
|
+
readonly resourceGroupId?: string;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* The resource body interface for Azure Container App API calls
|
|
763
|
+
*/
|
|
764
|
+
export interface ContainerAppBody {
|
|
765
|
+
readonly location: string;
|
|
766
|
+
readonly tags?: {
|
|
767
|
+
[key: string]: string;
|
|
768
|
+
};
|
|
769
|
+
readonly identity?: any;
|
|
770
|
+
readonly properties?: any;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Unified Azure Container App implementation
|
|
774
|
+
*
|
|
775
|
+
* Azure Container Apps enable you to run microservices and containerized applications
|
|
776
|
+
* on a serverless platform. They provide built-in support for ingress, scaling,
|
|
777
|
+
* Dapr integration, and more.
|
|
778
|
+
*
|
|
779
|
+
* Key features:
|
|
780
|
+
* - External and internal ingress with TLS, CORS, and sticky sessions
|
|
781
|
+
* - Dapr sidecar integration for microservice patterns
|
|
782
|
+
* - Horizontal auto-scaling with HTTP, TCP, custom (KEDA), and Azure Queue rules
|
|
783
|
+
* - Secrets management with Azure Key Vault references
|
|
784
|
+
* - Managed identity (SystemAssigned, UserAssigned, or both)
|
|
785
|
+
* - Init containers for setup tasks
|
|
786
|
+
* - Volume mounts (Azure Files, NFS, Ephemeral, Secret)
|
|
787
|
+
* - Health probes (Liveness, Readiness, Startup)
|
|
788
|
+
* - Multiple revision mode for blue-green and canary deployments
|
|
789
|
+
* - Service binds for dev services (Redis, Postgres, Kafka)
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* // Basic Container App with a single container:
|
|
793
|
+
* const app = new ContainerApp(this, "app", {
|
|
794
|
+
* name: "my-container-app",
|
|
795
|
+
* location: "eastus",
|
|
796
|
+
* resourceGroupId: resourceGroup.id,
|
|
797
|
+
* environmentId: environment.id,
|
|
798
|
+
* template: {
|
|
799
|
+
* containers: [{
|
|
800
|
+
* name: "my-app",
|
|
801
|
+
* image: "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
|
|
802
|
+
* resources: { cpu: 0.25, memory: "0.5Gi" },
|
|
803
|
+
* }],
|
|
804
|
+
* },
|
|
805
|
+
* });
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
* // Container App with external ingress and scaling:
|
|
809
|
+
* const app = new ContainerApp(this, "app", {
|
|
810
|
+
* name: "my-web-app",
|
|
811
|
+
* location: "eastus",
|
|
812
|
+
* resourceGroupId: resourceGroup.id,
|
|
813
|
+
* environmentId: environment.id,
|
|
814
|
+
* template: {
|
|
815
|
+
* containers: [{
|
|
816
|
+
* name: "web",
|
|
817
|
+
* image: "myregistry.azurecr.io/myapp:latest",
|
|
818
|
+
* resources: { cpu: 0.5, memory: "1Gi" },
|
|
819
|
+
* env: [{ name: "PORT", value: "3000" }],
|
|
820
|
+
* }],
|
|
821
|
+
* scale: {
|
|
822
|
+
* minReplicas: 1,
|
|
823
|
+
* maxReplicas: 10,
|
|
824
|
+
* rules: [{
|
|
825
|
+
* name: "http-rule",
|
|
826
|
+
* http: { metadata: { concurrentRequests: "50" } },
|
|
827
|
+
* }],
|
|
828
|
+
* },
|
|
829
|
+
* },
|
|
830
|
+
* configuration: {
|
|
831
|
+
* ingress: {
|
|
832
|
+
* external: true,
|
|
833
|
+
* targetPort: 3000,
|
|
834
|
+
* transport: "http",
|
|
835
|
+
* },
|
|
836
|
+
* },
|
|
837
|
+
* });
|
|
838
|
+
*
|
|
839
|
+
* @stability stable
|
|
840
|
+
*/
|
|
841
|
+
export declare class ContainerApp extends AzapiResource {
|
|
842
|
+
readonly props: ContainerAppProps;
|
|
843
|
+
readonly idOutput: cdktn.TerraformOutput;
|
|
844
|
+
readonly locationOutput: cdktn.TerraformOutput;
|
|
845
|
+
readonly nameOutput: cdktn.TerraformOutput;
|
|
846
|
+
readonly tagsOutput: cdktn.TerraformOutput;
|
|
847
|
+
readonly fqdnOutput: cdktn.TerraformOutput;
|
|
848
|
+
readonly latestRevisionFqdnOutput: cdktn.TerraformOutput;
|
|
849
|
+
readonly latestReadyRevisionNameOutput: cdktn.TerraformOutput;
|
|
850
|
+
readonly provisioningStateOutput: cdktn.TerraformOutput;
|
|
851
|
+
/**
|
|
852
|
+
* Creates a new Azure Container App
|
|
853
|
+
*
|
|
854
|
+
* @param scope - The scope in which to define this construct
|
|
855
|
+
* @param id - The unique identifier for this instance
|
|
856
|
+
* @param props - Configuration properties for the Container App
|
|
857
|
+
*/
|
|
858
|
+
constructor(scope: Construct, id: string, props: ContainerAppProps);
|
|
859
|
+
/**
|
|
860
|
+
* Gets the default API version to use when no explicit version is specified
|
|
861
|
+
*/
|
|
862
|
+
protected defaultVersion(): string;
|
|
863
|
+
/**
|
|
864
|
+
* Gets the Azure resource type for Container Apps
|
|
865
|
+
*/
|
|
866
|
+
protected resourceType(): string;
|
|
867
|
+
/**
|
|
868
|
+
* Gets the API schema for the resolved version
|
|
869
|
+
*/
|
|
870
|
+
protected apiSchema(): ApiSchema;
|
|
871
|
+
/**
|
|
872
|
+
* Indicates that location is required for Container Apps
|
|
873
|
+
*/
|
|
874
|
+
protected requiresLocation(): boolean;
|
|
875
|
+
/**
|
|
876
|
+
* Creates the resource body for the Azure API call
|
|
877
|
+
*/
|
|
878
|
+
protected createResourceBody(props: any): any;
|
|
879
|
+
/**
|
|
880
|
+
* Get the FQDN of the Container App (from ingress configuration)
|
|
881
|
+
*/
|
|
882
|
+
get fqdn(): string;
|
|
883
|
+
/**
|
|
884
|
+
* Get the FQDN of the latest revision
|
|
885
|
+
*/
|
|
886
|
+
get latestRevisionFqdn(): string;
|
|
887
|
+
/**
|
|
888
|
+
* Get the name of the latest ready revision
|
|
889
|
+
*/
|
|
890
|
+
get latestReadyRevisionName(): string;
|
|
891
|
+
/**
|
|
892
|
+
* Get the provisioning state of the Container App
|
|
893
|
+
*/
|
|
894
|
+
get provisioningState(): string;
|
|
895
|
+
/**
|
|
896
|
+
* Get the running status of the Container App
|
|
897
|
+
*/
|
|
898
|
+
get runningStatus(): string;
|
|
899
|
+
/**
|
|
900
|
+
* Add a tag to the Container App
|
|
901
|
+
*/
|
|
902
|
+
addTag(key: string, value: string): void;
|
|
903
|
+
/**
|
|
904
|
+
* Remove a tag from the Container App
|
|
905
|
+
*/
|
|
906
|
+
removeTag(key: string): void;
|
|
907
|
+
/**
|
|
908
|
+
* Customizes the resource configuration to handle Azure value normalization.
|
|
909
|
+
*
|
|
910
|
+
* Azure normalizes values in API responses:
|
|
911
|
+
* - Location: "eastus" → "East US"
|
|
912
|
+
* - Enum values: "auto" → "Auto", "enabled" → "Enabled"
|
|
913
|
+
*
|
|
914
|
+
* This override:
|
|
915
|
+
* 1. Removes `location` from the body (the framework passes it as a top-level
|
|
916
|
+
* attribute which the azapi provider normalizes properly)
|
|
917
|
+
* 2. Enables `ignoreCasing` to suppress diffs from Azure's value normalization
|
|
918
|
+
* (e.g., "auto" vs "Auto" for transport, "enabled" vs "Enabled")
|
|
919
|
+
*/
|
|
920
|
+
protected customizeResourceConfig(config: any): any;
|
|
921
|
+
/**
|
|
922
|
+
* Applies ignore changes lifecycle rules if specified in props
|
|
923
|
+
*/
|
|
924
|
+
private _applyIgnoreChanges;
|
|
925
|
+
}
|