Skip to content

Commit

Permalink
Revert "turn off admin_enabled and use managed identity for container…
Browse files Browse the repository at this point in the history
… registr…" (#1272)

This reverts commit 326c15b.
  • Loading branch information
somesylvie authored Aug 26, 2024
1 parent 326c15b commit 2cdb96b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions operations/template/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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"
Expand Down Expand Up @@ -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] : []

Expand Down

0 comments on commit 2cdb96b

Please sign in to comment.