Manages a Container App Environment.
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_log_analytics_workspace" "example" {
name = "acctest-01"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "PerGB2018"
retention_in_days = 30
}
resource "azurerm_container_app_environment" "example" {
name = "my-environment"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
log_analytics_workspace_id = azurerm_log_analytics_workspace.example.id
}
The following arguments are supported:
name
- (Required) The name of the Container Apps Managed Environment. Changing this forces a new resource to be created.
resource_group_name
- (Required) The name of the resource group in which the Container App Environment is to be created. Changing this forces a new resource to be created.
location
- (Required) Specifies the supported Azure location where the Container App Environment is to exist. Changing this forces a new resource to be created.
dapr_application_insights_connection_string
- (Optional) Application Insights connection string used by Dapr to export Service to Service communication telemetry. Changing this forces a new resource to be created.
infrastructure_resource_group_name
- (Optional) Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. Changing this forces a new resource to be created.
infrastructure_subnet_id
- (Optional) The existing Subnet to use for the Container Apps Control Plane. Changing this forces a new resource to be created. internal_load_balancer_enabled
- (Optional) Should the Container Environment operate in Internal Load Balancing Mode? Defaults to false
. Changing this forces a new resource to be created.zone_redundancy_enabled
- (Optional) Should the Container App Environment be created with Zone Redundancy enabled? Defaults to false
. Changing this forces a new resource to be created.log_analytics_workspace_id
- (Optional) The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to. Changing this forces a new resource to be created.
workload_profile
- (Optional) The profile of the workload to scope the container app execution. A workload_profile
block as defined below.
tags
- (Optional) A mapping of tags to assign to the resource.
A workload_profile
block supports the following:
name
- (Required) The name of the workload profile.
workload_profile_type
- (Required) Workload profile type for the workloads to run on. Possible values include Consumption
, D4
, D8
, D16
, D32
, E4
, E8
, E16
and E32
.
maximum_count
- (Required) The maximum number of instances of workload profile that can be deployed in the Container App Environment.
minimum_count
- (Required) The minimum number of instances of workload profile that can be deployed in the Container App Environment.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Container App Environment
custom_domain_verification_id
- The ID of the Custom Domain Verification for this Container App Environment.
default_domain
- The default, publicly resolvable, name of this Container App Environment.
docker_bridge_cidr
- The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.platform_reserved_cidr
- The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.platform_reserved_dns_ip_address
- The IP address from the IP range defined by platform_reserved_cidr
that is reserved for the internal DNS server.static_ip_address
- The Static IP address of the Environment.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Container App Environment.update
- (Defaults to 30 minutes) Used when updating the Container App Environment.read
- (Defaults to 5 minutes) Used when retrieving the Container App Environment.delete
- (Defaults to 30 minutes) Used when deleting the Container App Environment.A Container App Environment can be imported using the resource id
, e.g.
terraform import azurerm_container_app_environment.example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/managedEnvironments/myEnvironment"