Skip to content

Using Container App Environment with Consumption Workload Profile shows drift in plan #31840

Description

@krusty93

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

When creating a Container App Environment with Consumption only Workload Profiles, the provider wants to replace the workload_profile block at every plan/apply.

The issue can be work around by using ignore_changes:

  lifecycle {
    ignore_changes = [
      workload_profile,
    ]
  }
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.13.1

AzureRM Provider Version

4.61.0

Affected Resource(s)/Data Source(s)

azurerm_container_app_environment

Terraform Configuration Files

resource "azurerm_container_app_environment" "example" {
  name                = var.name
  resource_group_name = var.resource_group_name
  location            = var.location

  identity { type = "SystemAssigned" }

  infrastructure_subnet_id       = var.subnet_id
  internal_load_balancer_enabled = false
  public_network_access          = "Disabled"

  log_analytics_workspace_id = var.log_analytics_workspace_id
  zone_redundancy_enabled    = false

  workload_profile {
    maximum_count         = 1
    minimum_count         = 1
    name                  = "Consumption"
    workload_profile_type = "Consumption"
  }

  tags = var.tags
}

Debug Output/Panic Output

# azurerm_container_app_environment.example will be updated in-place
  ~ resource "azurerm_container_app_environment" "example" {
        id                                          = "redacted"
        name                                        = "redacted"
        tags                                        = {
            "redacted"     = "redacted"
        }
        # (17 unchanged attributes hidden)

      - workload_profile {
          - maximum_count         = 0 -> null
          - minimum_count         = 0 -> null
          - name                  = "Consumption" -> null
          - workload_profile_type = "Consumption" -> null
        }
      + workload_profile {
          + maximum_count         = 1
          + minimum_count         = 1
          + name                  = "Consumption"
          + workload_profile_type = "Consumption"
        }

        # (1 unchanged block hidden)
    }

Expected Behaviour

No changes

Actual Behaviour

The resource azurerm_container_app_environment shows a drift

Steps to Reproduce

  1. terraform apply
  2. terraform plan

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions