diff --git a/terraform/README.md b/terraform/README.md index 312d16e21..9be9857f0 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -194,6 +194,7 @@ No resources. | [project\_name](#input\_project\_name) | Project name. Will be used along with `environment` as a prefix for all resources. | `string` | n/a | yes | | [registry\_admin\_enabled](#input\_registry\_admin\_enabled) | Do you want to enable access key based authentication for your Container Registry? | `bool` | `false` | no | | [registry\_managed\_identity\_assign\_role](#input\_registry\_managed\_identity\_assign\_role) | Assign the 'AcrPull' Role to the Container App User-Assigned Managed Identity. Note: If you do not have 'Microsoft.Authorization/roleAssignments/write' permission, you will need to manually assign the 'AcrPull' Role to the identity | `bool` | `false` | no | +| [registry\_server](#input\_registry\_server) | Container registry server (required if `enable_container_registry` is false) | `string` | `""` | no | | [registry\_use\_managed\_identity](#input\_registry\_use\_managed\_identity) | Create a User-Assigned Managed Identity for the Container App. Note: If you do not have 'Microsoft.Authorization/roleAssignments/write' permission, you will need to manually assign the 'AcrPull' Role to the identity | `bool` | `true` | no | | [statuscake\_api\_token](#input\_statuscake\_api\_token) | API token for StatusCake | `string` | `"00000000000000000000000000000"` | no | | [statuscake\_contact\_group\_email\_addresses](#input\_statuscake\_contact\_group\_email\_addresses) | List of email address that should receive notifications from StatusCake | `list(string)` | `[]` | no | diff --git a/terraform/container-apps-hosting.tf b/terraform/container-apps-hosting.tf index c1a0b1ca4..9f6c4bd69 100644 --- a/terraform/container-apps-hosting.tf +++ b/terraform/container-apps-hosting.tf @@ -12,6 +12,7 @@ module "azure_container_apps_hosting" { registry_admin_enabled = local.registry_admin_enabled registry_use_managed_identity = local.registry_use_managed_identity registry_managed_identity_assign_role = local.registry_managed_identity_assign_role + registry_server = local.registry_server image_name = local.image_name container_command = local.container_command diff --git a/terraform/locals.tf b/terraform/locals.tf index 16f9c7214..7be358a60 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -8,6 +8,7 @@ locals { registry_admin_enabled = var.registry_admin_enabled registry_use_managed_identity = var.registry_use_managed_identity registry_managed_identity_assign_role = var.registry_managed_identity_assign_role + registry_server = var.registry_server image_name = var.image_name container_command = var.container_command container_secret_environment_variables = var.container_secret_environment_variables diff --git a/terraform/variables.tf b/terraform/variables.tf index ba50051cc..56452c141 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -38,6 +38,12 @@ variable "enable_container_registry" { type = bool } +variable "registry_server" { + description = "Container registry server (required if `enable_container_registry` is false)" + type = string + default = "" +} + variable "registry_admin_enabled" { description = "Do you want to enable access key based authentication for your Container Registry?" type = bool