azurermContainerAppEnvironmentStorage
Manages a Container App Environment Storage.
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 azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
this,
"example_1",
{
account_replication_type: "LRS",
account_tier: "Standard",
location: azurermResourceGroupExample.location,
name: "azureteststorage",
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.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermStorageShareExample = new azurerm.storageShare.StorageShare(
this,
"example_2",
{
name: "sharename",
quota: 5,
storage_account_name: azurermStorageAccountExample.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.*/
azurermStorageShareExample.overrideLogicalId("example");
const azurermLogAnalyticsWorkspaceExample =
new azurerm.logAnalyticsWorkspace.LogAnalyticsWorkspace(this, "example_3", {
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_4",
{
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 azurermContainerAppEnvironmentStorageExample =
new azurerm.containerAppEnvironmentStorage.ContainerAppEnvironmentStorage(
this,
"example_5",
{
access_key: azurermStorageAccountExample.primaryAccessKey,
access_mode: "ReadOnly",
account_name: azurermStorageAccountExample.name,
container_app_environment_id: azurermContainerAppEnvironmentExample.id,
name: "mycontainerappstorage",
share_name: azurermStorageShareExample.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.*/
azurermContainerAppEnvironmentStorageExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name for this Container App Environment Storage. Changing this forces a new resource to be created. -
containerAppEnvironmentId
- (Required) The ID of the Container App Environment to which this storage belongs. Changing this forces a new resource to be created. -
accountName
- (Required) The Azure Storage Account in which the Share to be used is located. Changing this forces a new resource to be created. -
accessKey
- (Required) The Storage Account Access Key. -
shareName
- (Required) The name of the Azure Storage Share to use. Changing this forces a new resource to be created. -
accessMode
- (Required) The access mode to connect this storage to the Container App. Possible values includereadOnly
andreadWrite
. Changing this forces a new resource to be created.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Container App Environment Storage
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Container App Environment Storage.update
- (Defaults to 30 minutes) Used when updating the Container App Environment Storage.read
- (Defaults to 5 minutes) Used when retrieving the Container App Environment Storage.delete
- (Defaults to 30 minutes) Used when deleting the Container App Environment Storage.
Import
A Container App Environment Storage can be imported using the resourceId
, e.g.