169163334 - Adds Azure Container Registry
Adds the ACR. Georeplication disabled for the moment until we add the DR site.
This commit is contained in:
parent
54ba6586d2
commit
74b2510730
13
terraform/modules/container_registry/main.tf
Normal file
13
terraform/modules/container_registry/main.tf
Normal 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]
|
||||
}
|
0
terraform/modules/container_registry/outputs.tf
Normal file
0
terraform/modules/container_registry/outputs.tf
Normal file
37
terraform/modules/container_registry/variables.tf
Normal file
37
terraform/modules/container_registry/variables.tf
Normal 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
|
||||
|
||||
}
|
8
terraform/providers/dev/container_registry.tf
Normal file
8
terraform/providers/dev/container_registry.tf
Normal 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
|
||||
}
|
@ -7,6 +7,11 @@ variable "region" {
|
||||
|
||||
}
|
||||
|
||||
variable "backup_region" {
|
||||
default = "westus2"
|
||||
}
|
||||
|
||||
|
||||
variable "owner" {
|
||||
default = "dev"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user