This Terraform module deploys a container registry in Azure with optional diagnostic settings.
-> NOTE: This module can create User Assigned Identity for your cluster, to create one, just specify identity
variable.
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "this" {
name = "rg-terraform-northeu-001"
location = "northeurope"
}
module "acr" {
source = "Retoxx-dev/container-registry/azurerm"
version = "1.0.0"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
name = "<container-registry-name>"
sku = "Basic"
admin_enabled = false
public_network_access_enabled = false
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "this" {
name = "rg-terraform-northeu-001"
location = "northeurope"
}
module "acr" {
source = "Retoxx-dev/container-registry/azurerm"
version = "1.0.0"
resource_group_name = azurerm_resource_group.this.name
location = azurerm_resource_group.this.location
name = "<container-registry-name>"
sku = "Basic"
admin_enabled = false
public_network_access_enabled = false
georeplications = [
{
location = "westeurope"
regional_endpoint_enabled = true
zone_redundancy_enabled = true
}
]
}
Name | Version |
---|---|
terraform | >= 1.3.1 |
azurerm | >=3.33 |
Name | Version |
---|---|
azurerm | >=3.33 |
No modules.
Name | Type |
---|---|
azurerm_container_registry.this | resource |
azurerm_monitor_diagnostic_setting.this | resource |
azurerm_user_assigned_identity.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
admin_enabled | (Optional) Specifies whether the admin user is enabled. Defaults to false. | bool |
false |
no |
anonymous_pull_enabled | (Optional) Whether allows anonymous (unauthenticated) pull access to this Container Registry? This is only supported on resources with the Standard or Premium SKU. | bool |
null |
no |
data_endpoint_enabled | (Optional) Whether to enable dedicated data endpoints for this Container Registry? This is only supported on resources with the Premium SKU. | bool |
null |
no |
diagnostic_settings | (Optional) A diagnostic_settings block. | object({ |
null |
no |
encryption | (Optional) Specifies the encryption configuration for the resource. | object({ |
null |
no |
export_policy_enabled | (Optional) Boolean value that indicates whether export policy is enabled. Defaults to true. In order to set it to false, make sure the public_network_access_enabled is also set to false. | bool |
true |
no |
georeplications | (Optional) Specifies the georeplication configuration for the resource. | list(object({ |
null |
no |
identity | (Optional) Specifies the identity configuration for the resource. | object({ |
null |
no |
location | (Required) The location in which to create the Kubernetes Cluster. | string |
n/a | yes |
name | (Required) Specifies the name of the Container Registry. Only Alphanumeric characters allowed. Changing this forces a new resource to be created. | string |
n/a | yes |
network_rule_bypass_option | (Optional) Whether to allow trusted Azure services to access a network restricted Container Registry? Possible values are None and AzureServices. Defaults to AzureServices. | string |
null |
no |
network_rule_sets | (Optional) Specifies the network rule set configuration for the resource. | list(object({ |
null |
no |
public_network_access_enabled | (Optional) Whether public network access is allowed for the container registry. Defaults to true. | bool |
true |
no |
quarantine_policy_enabled | (Optional) Boolean value that indicates whether quarantine policy is enabled. | bool |
null |
no |
resource_group_name | (Required) The name of the resource group in which to create the Kubernetes Cluster. | string |
n/a | yes |
retention_policy | (Optional) Specifies the retention policy configuration for the resource. | object({ |
null |
no |
sku | (Required) The SKU name of the container registry. Possible values are Basic , Standard and Premium . |
string |
n/a | yes |
tags | (Optional) A mapping of tags to assign to the resource. | map(string) |
null |
no |
trust_policy | (Optional) Specifies the trust policy configuration for the resource. | object({ |
null |
no |
zone_redundancy_enabled | (Optional) Whether zone redundancy is enabled for this Container Registry? Changing this forces a new resource to be created. Defaults to false. | bool |
false |
no |
Name | Description |
---|---|
admin_password | The admin password of the Container Registry. |
admin_username | The admin username of the Container Registry. |
id | The ID of the Container Registry. |
identity_principal_id | The principal ID of the Container Registry. |
identity_tenant_id | The tenant ID of the Container Registry. |
login_server | The login_server of the Container Registry. |