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.61k stars 4.65k forks source link

Autoscaling documentation example mentions 'frequency' but is nowhere explained and apply fails. Is it implemented? #10562

Open jeanpaulsmit opened 3 years ago

jeanpaulsmit commented 3 years ago

Community Note

Terraform (and AzureRM Provider) Version

1.40 and up to 2.47

Affected Resource(s)

monitor_autoscale_setting

Debug Output

Error: Unsupported argument

on tacx-core-apim.tf line 531, in resource "azurerm_monitor_autoscale_setting" "autoscaleBasedOnSchedule": 531: frequency = "Week"

An argument named "frequency" is not expected here.

Expected Behaviour

The following piece of azurerm_monitor_autoscale_setting profile setting to be accepted:

recurrence { frequency = "Week" timezone = "W. Europe Standard Time" days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"] hours = [21] minutes = [0] }

Actual Behaviour

An argument named "frequency" is not expected here.

Steps to Reproduce

Use this resource:

resource "azurerm_monitor_autoscale_setting" "autoscaleBasedOnSchedule" { name = "autoscaleBasedOnSchedule" resource_group_name = azurerm_resource_group.rg.name location = azurerm_resource_group.rg.location target_resource_id = azurerm_api_management.apim.id

profile { name = "Week days"

capacity {
  default = 1
  minimum = 1
  maximum = 1
}

recurrence {
  frequency = "Week"
  timezone  = "W. Europe Standard Time"
  days      = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
  hours     = [21]
  minutes   = [0]
}

} }

jeanpaulsmit commented 3 years ago

Is there any news on this topic? Maybe it's fixed by a later version? Anyone?

Shaybs commented 3 years ago

Any updates?

jeanpaulsmit commented 2 years ago

Would it be possible to provide an update on the status of this issue? The label mentions 'enhancement' but to me it seems like a bug if one of the necessary fields is not accepted? Maybe this has been addressed in a later version already?