azurermContainerAppEnvironmentCertificate
Manages a Container App Environment Certificate.
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: "myEnvironment",
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");
const azurermContainerAppEnvironmentCertificateExample =
new azurerm.containerAppEnvironmentCertificate.ContainerAppEnvironmentCertificate(
this,
"example_3",
{
certificate_blob: '${filebase64("path/to/certificate_file.pfx")}',
certificate_password: "$3cretSqu1rreL",
container_app_environment_id: azurermContainerAppEnvironmentExample.id,
name: "myfriendlyname",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerAppEnvironmentCertificateExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name of the Container Apps Environment Certificate. Changing this forces a new resource to be created. -
containerAppEnvironmentId
- (Required) The Container App Managed Environment ID to configure this Certificate on. Changing this forces a new resource to be created. -
certificateBlobBase64
- (Required) The Certificate Private Key as a base64 encoded PFX or PEM. Changing this forces a new resource to be created. -
certificatePassword
- (Required) The password for the Certificate. Changing this forces a new resource to be created.
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 Certificate -
expirationDate
- The expiration date for the Certificate. -
issueDate
- The date of issue for the Certificate. -
issuer
- The Certificate Issuer. -
subjectName
- The Subject Name for the Certificate. -
thumbprint
- The Thumbprint of the Certificate.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Container App Environment Certificate.update
- (Defaults to 30 minutes) Used when updating the Container App Environment Certificate.read
- (Defaults to 5 minutes) Used when retrieving the Container App Environment Certificate.delete
- (Defaults to 30 minutes) Used when deleting the Container App Environment Certificate.
Import
A Container App Environment Certificate can be imported using the resourceId
, e.g.