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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

maximum_elastic_worker_count not ignored when set to 1 on non elastic premium plans #25902

Open
1 task done
sit-md opened this issue May 8, 2024 · 2 comments
Open
1 task done

Comments

@sit-md
Copy link

sit-md commented May 8, 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.8.2

AzureRM Provider Version

3.101.0

Affected Resource(s)/Data Source(s)

azurerm_service_plan

Terraform Configuration Files

resource "azurerm_service_plan" "appServicePlan" {
  name                         = "SomeAppServicePlan"
  resource_group_name          = "MyResourceGroup"
  location                     = "West Europe"
  sku_name                     = "Y1"
  maximum_elastic_worker_count = 1
  os_type                      = "Windows"
}

Debug Output/Panic Output

Error: `maximum_elastic_worker_count` can only be specified with Elastic Premium Skus

Expected Behaviour

The maximum_elastic_worker_count is ignored if plan kind is not Elastic Premium and this value is set to 1 (which is the value on a consumption-based plan after applying the configuration).

Actual Behaviour

On consumption plans:
Before applying the configuration, the value of maximum_elastic_worker_count needs to be 0 to be ignored.
After applying the configuration, the value of maximum_elastic_worker_count needs to be 1 to be ignored.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@xiaxyi
Copy link
Contributor

xiaxyi commented May 10, 2024

Thanks @sit-md for raising this issue, are you trying set the maximum_elastic_worker_count for consumption plan? If this is the case, let me confirm the api behavior first? Please correct me if there is any misunderstanding.

@sit-md
Copy link
Author

sit-md commented May 13, 2024

@xiaxyi Yes, that is correct. Some context for you: in our non-production environments we use consumption plans to keep the costs low. In the stage and production environments we use elastic premium plans to be able to take the load. Our configuration for this resource lives in a module to keep it as DRY as possible.

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

No branches or pull requests

2 participants