169163334 - Adds Azure Container Registry

Adds the ACR. Georeplication disabled for the moment until we add the DR
site.
This commit is contained in:
Rob Gil 2019-12-19 20:12:20 -05:00
parent 54ba6586d2
commit 74b2510730
5 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,13 @@
resource "azurerm_resource_group" "acr" {
name = "${var.name}-${var.environment}-acr"
location = var.region
}
resource "azurerm_container_registry" "acr" {
name = "${var.name}${var.environment}registry" # Alpha Numeric Only
resource_group_name = azurerm_resource_group.acr.name
location = azurerm_resource_group.acr.location
sku = var.sku
admin_enabled = var.admin_enabled
#georeplication_locations = [azurerm_resource_group.acr.location, var.backup_region]
}

View File

@ -0,0 +1,37 @@
variable "region" {
type = string
description = "Region this module and resources will be created in"
}
variable "name" {
type = string
description = "Unique name for the services in this module"
}
variable "environment" {
type = string
description = "Environment these resources reside (prod, dev, staging, etc)"
}
variable "owner" {
type = string
description = "Owner of the environment and resources created in this module"
}
variable "backup_region" {
type = string
description = "Backup region for georeplicating the container registry"
}
variable "sku" {
type = string
description = "SKU to use for the container registry service"
default = "Premium"
}
variable "admin_enabled" {
type = string
description = "Admin enabled? (true/false default: false)"
default = false
}

View File

@ -0,0 +1,8 @@
module "container_registry" {
source = "../../modules/container_registry"
name = var.name
region = var.region
environment = var.environment
owner = var.owner
backup_region = var.backup_region
}

View File

@ -7,6 +7,11 @@ variable "region" {
} }
variable "backup_region" {
default = "westus2"
}
variable "owner" { variable "owner" {
default = "dev" default = "dev"
} }