Skip to content

avidhara/terraform-azurerm-acr

Repository files navigation

Terraform module for Azure ACR

How to use it as a module

module "acr" {
  source  = "./"
  name                = "iba6yu5bgopi"
  resource_group_name = "terraform-test"
  location            = "East US"
  sku                 = "Premium"
  admin_enabled       = true
}

Requirements

Name Version
terraform >= 0.13.1
azurerm >= 3.0.0

Providers

Name Version
azurerm >= 3.0.0

Modules

No modules.

Resources

Name Type
azurerm_container_registry.this resource

Inputs

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 false no
create_acr (Optional) Do you want to create ECR repo bool true 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 true no
encryption (Optional) An encryption block any [] 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 A list of Azure locations where the Ccontainer Registry should be geo-replicated. Only activated on Premium SKU.
Supported properties are:
location = string
zone_redundancy_enabled = bool
regional_endpoint_enabled = bool
tags = map(string)
or this can be a list of string (each element is a location)
any [] no
identity (Optional) An identity block any [] no
location (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. 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 "AzureServices" no
network_rule_set A list of Azure locations where the Ccontainer Registry should be geo-replicated. Only activated on Premium SKU.
Supported properties are:
default_action = string
ip_rule = list(map(string))
virtual_network = list(map(string))
any [] no
public_network_access_enabled (Optional) Whether public network access is allowed for the container registry. Defaults to true. bool false no
quarantine_policy_enabled (Optional) Boolean value that indicates whether quarantine policy is enabled. bool false no
resource_group_name (Required) The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created. string n/a yes
retention_policy (Optional) A retention_policy block any
[
{
"days": 30,
"enabled": true
}
]
no
sku (Optional) The SKU name of the container registry. Possible values are Basic, Standard and Premium.Defaults to Premium. string "Premium" no
tags (Optional) A mapping of tags to assign to the resource. map(string) {} no
trust_policy (Optional) A trust_policy block any
[
{
"enabled": false
}
]
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

Outputs

Name Description
admin_password The Password associated with the Container Registry Admin account - if the admin account is enabled.
admin_username The Username associated with the Container Registry Admin account - if the admin account is enabled.
id The ID of the Container Registry.
login_server The URL that can be used to log into the container registry.