azurermContainerAppEnvironment
Manages a Container App Environment.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermLogAnalyticsWorkspaceExample =
new azurerm.logAnalyticsWorkspace.LogAnalyticsWorkspace(this, "example_1", {
location: azurermResourceGroupExample.location,
name: "acctest-01",
resource_group_name: azurermResourceGroupExample.name,
retention_in_days: 30,
sku: "PerGB2018",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermLogAnalyticsWorkspaceExample.overrideLogicalId("example");
const azurermContainerAppEnvironmentExample =
new azurerm.containerAppEnvironment.ContainerAppEnvironment(
this,
"example_2",
{
location: azurermResourceGroupExample.location,
log_analytics_workspace_id: azurermLogAnalyticsWorkspaceExample.id,
name: "my-environment",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerAppEnvironmentExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name of the Container Apps Managed Environment. Changing this forces a new resource to be created. -
resourceGroupName
- (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. -
logAnalyticsWorkspaceId
- (Required) The ID for the Log Analytics Workspace to link this Container Apps Managed Environment to. Changing this forces a new resource to be created.
infrastructureSubnetId
- (Optional) The existing Subnet to use for the Container Apps Control Plane. Changing this forces a new resource to be created.
\~> NOTE: The Subnet must have a /21
or larger address space.
internalLoadBalancerEnabled
- (Optional) Should the Container Environment operate in Internal Load Balancing Mode? Defaults tofalse
. Changing this forces a new resource to be created.
\~> Note: can only be set to true
if infrastructureSubnetId
is specified.
tags
- (Optional) A mapping of tags to assign to the resource.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
-
id
- The ID of the Container App Environment -
defaultDomain
- The default, publicly resolvable, name of this Container App Environment.
\~> NOTE: This value is generated by the service to be globally unique.
dockerBridgeCidr
- The network addressing in which the Container Apps in this Container App Environment will reside in CIDR notation.
\~> NOTE: This property only has a value when infrastructureSubnetId
is configured and will be a range within the CIDR of the Subnet.
platformReservedCidr
- The IP range, in CIDR notation, that is reserved for environment infrastructure IP addresses.
\~> NOTE: This property only has a value when infrastructureSubnetId
is configured and will be a range within the CIDR of the Subnet.
platformReservedDnsIpAddress
- The IP address from the IP range defined byplatformReservedCidr
that is reserved for the internal DNS server.
\~> NOTE: This property only has a value when infrastructureSubnetId
is configured and will be a value within the CIDR of the Subnet.
staticIpAddress
- The Static IP of the Environment.
\~> NOTE: This will be a Public IP unless internalLoadBalancerEnabled
is set to true
, in which case an IP in the Internal Subnet will be reserved.
Timeouts
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.
Import
A Container App Environment can be imported using the resourceId
, e.g.