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

Azure Container Apps - support for specifying workload profiles #23877

Closed
1 task done
audunsolemdal opened this issue Nov 13, 2023 · 2 comments
Closed
1 task done

Azure Container Apps - support for specifying workload profiles #23877

audunsolemdal opened this issue Nov 13, 2023 · 2 comments

Comments

@audunsolemdal
Copy link
Contributor

audunsolemdal commented Nov 13, 2023

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.

Description

Workload profiles became GA at the end of august this year. It seems as the azurerm_container_app_environment currently does not support creating environments with workload profiles, and therefore defaults to the Consumption based option which previously was the only choice.

We need to update three main things from what I can see

  • Support setting workload_profiles_enabled = true for azurerm_container_app_environment
  • Support inputting 0-n workload_profiles for azurerm_container_app_environment
  • Add an optional input workload_profile_name for azurerm_container_app. From what I read, this defaults to "Consumption", which is the built-in workload profile.

New or Affected Resource(s)/Data Source(s)

azurerm_container_app_environment, azurerm_container_app

Potential Terraform Configuration

resource "azurerm_container_app_environment" "container_env" {
  name                           = "somename"
    (...)
  workload_profiles_enabled      = true
  workload_profiles = [
    {
      name      = str
      workload_profile_type = str
      min_nodes = int
      max_nodes = int
    }
    (...)
  ]
}


resource "azurerm_container_app" "container_app" {
  for_each = var.container_apps
  (..)
  container_app_environment_id = azurerm_container_app_environment.container_env.id
  name                         = each.value.name
  workload_profile_name        = azurerm_container_app_environment.container_env.workload_profiles[0].name
}

References

https://learn.microsoft.com/en-us/azure/templates/microsoft.app/managedenvironments?pivots=deployment-language-terraform
https://learn.microsoft.com/en-us/azure/templates/microsoft.app/containerapps?pivots=deployment-language-terraform

#20582 (comment)

@audunsolemdal
Copy link
Contributor Author

duplicate of #21747

Copy link

github-actions bot commented May 2, 2024

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 May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant