From 2cdb96b0122d4ccfde7f0d8f86662f35a9759ed8 Mon Sep 17 00:00:00 2001 From: Sylvie Date: Mon, 26 Aug 2024 12:14:47 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"turn=20off=20admin=5Fenabled=20and=20?= =?UTF-8?q?use=20managed=20identity=20for=20container=20registr=E2=80=A6"?= =?UTF-8?q?=20(#1272)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 326c15be965fa7a59f4e9db35a5dc58b88f59421. --- operations/template/app.tf | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/operations/template/app.tf b/operations/template/app.tf index 77dcf5d9b..f8ea8ad4d 100644 --- a/operations/template/app.tf +++ b/operations/template/app.tf @@ -4,7 +4,7 @@ resource "azurerm_container_registry" "registry" { resource_group_name = data.azurerm_resource_group.group.name location = data.azurerm_resource_group.group.location sku = "Standard" - + admin_enabled = true # below tags are managed by CDC lifecycle { ignore_changes = [ @@ -24,12 +24,6 @@ resource "azurerm_container_registry" "registry" { } } -resource "azurerm_role_assignment" "allow_app_to_pull_from_registry" { - principal_id = azurerm_linux_web_app.api.identity.0.principal_id - role_definition_name = "AcrPull" - scope = azurerm_container_registry.registry.id -} - # Create the staging service plan resource "azurerm_service_plan" "plan" { name = "cdcti-${var.environment}-service-plan" @@ -75,8 +69,6 @@ resource "azurerm_linux_web_app" "api" { scm_use_main_ip_restriction = local.cdc_domain_environment ? true : null - container_registry_use_managed_identity = true - dynamic "ip_restriction" { for_each = local.cdc_domain_environment ? [1] : []