-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcae.tf
47 lines (40 loc) · 1.24 KB
/
cae.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
resource "azapi_resource" "azurerm_container_app_environment" {
depends_on = [
azapi_update_resource.nodes_delegation
]
type = "Microsoft.App/managedEnvironments@2023-05-01"
name = local.aca_name
location = azurerm_resource_group.this.location
parent_id = azurerm_resource_group.this.id
body = jsonencode({
properties = {
appLogsConfiguration = {
destination = "azure-monitor"
}
daprAIConnectionString = azurerm_application_insights.this.connection_string
infrastructureResourceGroup = "${local.resource_name}_aca_nodes_rg"
zoneRedundant = true
vnetConfiguration = {
infrastructureSubnetId = azurerm_subnet.nodes.id
internal = true
}
peerAuthentication = {
mtls = {
enabled = true
}
}
workloadProfiles = [
{
workloadProfileType = local.workload_profile_name
name = local.workload_profile_name
}]
}
})
}
data "azurerm_container_app_environment" "this" {
depends_on = [
azapi_resource.azurerm_container_app_environment
]
name = local.aca_name
resource_group_name = azurerm_resource_group.this.name
}