/terraform-azurerm-acr

Terraform module for AzureRM ACR

Primary LanguageHCLMIT LicenseMIT

terraform-azurerm-acr

Terraform module for AzureRM ACR. This module validates the name according to Azure resource naming restrictions.

Usage

provider "azurerm" {
  features {}
}

module "rg" {
  source  = "bcochofel/resource-group/azurerm"
  version = "1.4.0"

  name     = "rg-acr-basic-example"
  location = "North Europe"
}

module "acr" {
  source = "../.."

  name                = "acrbasicexample"
  resource_group_name = module.rg.name

  sku           = "Basic"
  admin_enabled = false

  depends_on = [module.rg]
}

Requirements

Name Version
terraform >= 0.13.0
azurerm >= 2.41.0

Providers

Name Version
azurerm >= 2.41.0

Modules

No Modules.

Resources

Name
azurerm_container_registry
azurerm_resource_group

Inputs

Name Description Type Default Required
admin_enabled Specifies whether the admin user is enabled. bool true no
georeplication_locations A list of Azure locations where the container registry should be geo-replicated
(sku must be Premium).
list(string) [] no
name Specifies the name of the Container Registry.
Changing this forces a new resource to be created.
string n/a yes
resource_group_name The name of the resource group in which to create the ACR.
The Resource Group must already exist.
string n/a yes
sku The SKU name of the container registry.
Possible values are Basic, Standard and Premium.
string "Premium" no
tags A mapping of tags which should be assigned to Resources. map(string) {} 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 ACR resource ID.
login_server The URL that can be used to log into the container registry.
name ACR resource name.
rg_name Resource Group name.

Run tests

cd test/
go test -v

pre-commit hooks

This repository uses pre-commit.

To install execute:

pre-commit install --install-hooks -t commit-msg

To run the hooks you need to install:

References