hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.54k stars 4.61k forks source link

azurerm_service_plan with "sku_name = WS1" does not support "maximum_elastic_worker_count" #18128

Closed mikegouldthorp closed 2 years ago

mikegouldthorp commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

1.2.7

AzureRM Provider Version

3.19.1

Affected Resource(s)/Data Source(s)

azurerm_service_plan

Terraform Configuration Files

### FAILED - AzureRM Provider 3.19.1 ###

resource "azurerm_service_plan" "svcplan" {
  name                         = "new-std-la-plan"
  location                     = data.azurerm_resource_group.rg.location
  resource_group_name          = data.azurerm_resource_group.rg.name
  os_type                      = "Windows"
  sku_name                     = "WS1"
  maximum_elastic_worker_count = 5

  tags = local.tags
}

### SUCCEEDED - AzureRM version 2.99.0 ###

resource "azurerm_app_service_plan" "svcplan" {
  name                         = "old-std-la-plan"
  location                     = data.azurerm_resource_group.rg.location
  resource_group_name          = data.azurerm_resource_group.rg.name
  kind                         = "elastic"
  maximum_elastic_worker_count = 5

  sku {
    tier = "WorkflowStandard"
    size = "WS1"
  }

  tags = local.tags
}

Debug Output/Panic Output

NA

Expected Behaviour

The azurerm_service_plan resource (azurerm 3.19.1) with sku_name = WS1 should be able to define maximum_elastic_worker_count.

We validated that we could manually set the "maximum burst" count in the Azure Portal UI after provisioning azurerm_service_plan with sku_name = WS1 without maximum_elastic_worker_count. This would confirm that the sku WS1 does support "scale out" or "elastic" functionality.

image

######################################

When using the azurerm_app_service_plan resource (azurerm 2.99.0) with sku size = WS1 and kind = elastic the maximum_elastic_worker_count could be defined.

resource "azurerm_app_service_plan" "svcplan" {
  name                         = "old-std-la-plan"
  location                     = data.azurerm_resource_group.rg.location
  resource_group_name          = data.azurerm_resource_group.rg.name
  kind                         = "elastic"
  maximum_elastic_worker_count = 5

  sku {
    tier = "WorkflowStandard"
    size = "WS1"
  }

Actual Behaviour

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

  with module.tf-az-logicapps.azurerm_service_plan.svcplan,
  on .terraform\modules\tf-az-logicapps\main.tf line 70, in resource "azurerm_service_plan" "svcplan":
  70: resource "azurerm_service_plan" "svcplan" {

`maximum_elastic_worker_count` can only be specified with Elastic Premium Skus

Steps to Reproduce

The following will fail during apply

resource "azurerm_service_plan" "svcplan" {
  name                         = "new-std-la-plan"
  location                     = data.azurerm_resource_group.rg.location
  resource_group_name          = data.azurerm_resource_group.rg.name
  os_type                      = "Windows"
  sku_name                     = "WS1"
  maximum_elastic_worker_count = 5

  tags = local.tags
}

Important Factoids

No response

References

No response

github-actions[bot] commented 2 years ago

This functionality has been released in v3.22.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 1 year ago

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.