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

Issue when deploy container app environment with default consumption profile under workload profile (without D4..and E4..). #24596

Open
1 task done
nickjangid22 opened this issue Jan 23, 2024 · 4 comments

Comments

@nickjangid22
Copy link

nickjangid22 commented Jan 23, 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.

I am trying to deploy container apps environment with terraform. I am using existing subnet for build this container apps environment which subnet have /27 size. I want to use default Consumption profile under environment type Workload profile for environment which can be deploy in /27 size subnet for my environment. I don't want use dedicated workload profile means D4..D8..... and E4...E8......
Now I am able to deploy container apps environment with default Consumption profile under environment type Workload profile but through terraform It is showing error.

Azure Portal
environment_type
consumption_profile

Terraform
aca_environment
aca_environment_error

Terraform Version

1.7.0

AzureRM Provider Version

3.88.0

Affected Resource(s)/Data Source(s)

azurerm_container_app_environment

Terraform Configuration Files

resource "azurerm_container_app_environment" "test_environment" {
  name                       = "test-environment"
  location                   = azurerm_resource_group.test_aca_rg.location
  resource_group_name        = azurerm_resource_group.test_aca_rg.name
  infrastructure_subnet_id   = data.azurerm_subnet.test_aca_subnet.id         
  lifecycle {
    ignore_changes = [tags]
  }    
}

Debug Output/Panic Output

│ CreateOrUpdate:
│ managedenvironments.ManagedEnvironmentsClient#CreateOrUpdate: Failure
│ sending request: StatusCode=0 -- Original Error:
│ Code="ManagedEnvironmentInvalidNetworkConfiguration" Message="The
│ environment network configuration is invalid: Provided subnet must have a
│ size of at least /23"

Expected Behaviour

No response

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@jiaweitao001
Copy link
Contributor

Hi @nickjangid22 , thanks for raising this issue. This the expected behavior of creating container app environment. Please make sure you have a subnet size of at least /23 as the error message prompted. Thanks!

@nickjangid22
Copy link
Author

Hi @jiaweitao001,
I am able to create container environment with existing subnet (size /27) through azure portal and configuration which I am select is environment type "Workload Profiles" and default "Consumption" under Workload profiles. I have attached the screenshots also. But same thing if I am doing with terraform, it's showing error for required /23 size subnet.

@jiaweitao001
Copy link
Contributor

Hi @nickjangid22 , currently users are unable to set Consumption only workload profile with Terraform, this is a known issue, and we already have a fix pending HashiCorp's review. Fix PR: #24277

@kawahara-titan
Copy link

Hi @nickjangid22 , currently users are unable to set Consumption only workload profile with Terraform, this is a known issue, and we already have a fix pending HashiCorp's review. Fix PR: #24277

@jiaweitao001 - thanks. Just to confirm, does this also address the issue of the subnet incorrectly requiring a /23 cidr range as opposed to /27 - as described here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants