Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply changes to container environnement workload_profile minimum_count/maximum_count has no effect #24408

Closed
1 task done
mapperCoderZ opened this issue Jan 5, 2024 · 3 comments · Fixed by #24409
Closed
1 task done

Comments

@mapperCoderZ
Copy link

mapperCoderZ commented Jan 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • 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 "+1" or "me too" comments, 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.5.0

AzureRM Provider Version

3.86.0

Affected Resource(s)/Data Source(s)

azurerm_container_app_environment

Terraform Configuration Files

resource "azurerm_container_app_environment" "container_app_environment" {
  depends_on = [
    azurerm_role_assignment.container_app_fileshare_contributor
  ]
  name                       = azurecaf_name.container_app_environment.result
  resource_group_name        = var.resource_group_name
  location                   = var.location
  log_analytics_workspace_id = var.log_analytics_id

  infrastructure_subnet_id       = var.container_app_environment_properties.infrastructure_subnet_id
  internal_load_balancer_enabled = true

  dynamic "workload_profile" {
    for_each = var.container_app_environment_properties.workloadProfiles
    content {
      name                  = workload_profile.value.name
      minimum_count         = 0
      maximum_count         = 12
      workload_profile_type = "D8"
    }
  }
}

Debug Output/Panic Output

PLAN:
# module.container_apps.azurerm_container_app_environment.container_app_environment will be updated in-place
  ~ resource "azurerm_container_app_environment" "container_app_environment" {
        id                             = "/subscriptions/XXXX/resourceGroups/rg-backend-rec1-northeu/providers/Microsoft.App/managedEnvironments/cae-mkp-rec1-northeu"
        name                           = "cae-mkp-rec1-northeu"
        tags                           = {}
        # (8 unchanged attributes hidden)

      - workload_profile {
          - maximum_count         = 10 -> null
          - minimum_count         = 0 -> null
          - name                  = "GPD8" -> null
          - workload_profile_type = "D8" -> null
        }
      + workload_profile {
          + maximum_count         = 12
          + minimum_count         = 0
          + name                  = "GPD8"
          + workload_profile_type = "D8"
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.

terraform apply
...
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Expected Behaviour

maximum_count is set to 12

Actual Behaviour

maximum_count remains at 10
additionally, the log_analytics_workspace_id is removed on the container environnement azure ressource

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@harshavmb
Copy link
Contributor

harshavmb commented Jan 5, 2024

Hi @mapperCoderZ ,

I pushed changes to support updates of workload_profile. You could follow here for more details.

As far as log_analytics_workspace_id is concerned I didn't see it getting removed from container environment. But I do see some comments here related to AppLogsConfiguration. It would be helpful if you could share more logs with debug to have a deeper look.

@mapperCoderZ
Copy link
Author

thank you

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants