azurermContainerRegistryTokenPassword
Manages a Container Registry Token Password.
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.*/
new azurerm.containerRegistryScopeMap.ContainerRegistryScopeMap(
this,
"example",
{
actions: [
"repositories/repo1/content/read",
"repositories/repo1/content/write",
],
container_registry_name: "${azurerm_container_registry.acr.name}",
name: "example-scope-map",
resource_group_name: "${azurerm_resource_group.rg.name}",
}
);
const azurermContainerRegistryTokenExample =
new azurerm.containerRegistryToken.ContainerRegistryToken(this, "example_1", {
container_registry_name: "${azurerm_container_registry.acr.name}",
name: "exampletoken",
resource_group_name: "${azurerm_resource_group.rg.name}",
scope_map_id: "${azurerm_container_registry_scope_map.map.id}",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryTokenExample.overrideLogicalId("example");
const azurermContainerRegistryTokenPasswordExample =
new azurerm.containerRegistryTokenPassword.ContainerRegistryTokenPassword(
this,
"example_2",
{
container_registry_token_id: azurermContainerRegistryTokenExample.id,
password1: [
{
expiry: "2023-03-22T17:57:36+08:00",
},
],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryTokenPasswordExample.overrideLogicalId("example");
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example_3",
{
location: "West Europe",
name: "example-resource-group",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermResourceGroupExample.overrideLogicalId("example");
const azurermContainerRegistryExample =
new azurerm.containerRegistry.ContainerRegistry(this, "example_4", {
admin_enabled: false,
georeplication_locations: ["East US", "West Europe"],
location: azurermResourceGroupExample.location,
name: "example-registry",
resource_group_name: azurermResourceGroupExample.name,
sku: "Premium",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
containerRegistryTokenId
- (Required) The ID of the Container Registry Token that this Container Registry Token Password resides in. Changing this forces a new Container Registry Token Password to be created. -
password1
- (Required) Onepassword
block as defined below. -
password2
- (Optional) Onepassword
block as defined below.
A password
block supports the following:
expiry
- (Optional) The expiration date of the password in RFC3339 format. 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 Registry Token Password. -
password1
- Onepassword
block as defined below. -
password2
- Onepassword
block as defined below.
A password
block exports the following:
value
- The value of the password (Sensitive).
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Container Registry Token Password.read
- (Defaults to 5 minutes) Used when retrieving the Container Registry Token Password.update
- (Defaults to 30 minutes) Used when updating the Container Registry Token Password.delete
- (Defaults to 30 minutes) Used when deleting the Container Registry Token Password.
Import
Container Registry Token Passwords can be imported using the resourceId
, e.g.