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.46k stars 4.54k forks source link

azurerm_monitor_autoscale_setting error on notification settings (administrator, co-administrator) #26306

Open farwind opened 3 weeks ago

farwind commented 3 weeks ago

Is there an existing issue for this?

Community Note

Terraform Version

1.5.7

AzureRM Provider Version

3.107.0

Affected Resource(s)/Data Source(s)

azurerm_monitor_autoscale_setting

Terraform Configuration Files

simmilar to example in terraform registry, with webhook service url configured as only difference in notification settings.

Debug Output/Panic Output

│ Error: creating Monitor Auto Scale Setting (Subscription: "fd5c526d-54f4-4280-a8c4-94d1fd1df32e"
│ Resource Group Name: "rg-cancom-ci-monitor-46e3-we-test"
│ Auto Scale Setting Name: "mas-cancom-ci-monitor-46e3-we-t"): unexpected status 400 (400 Bad Request) with response: {"code":"SendEmailsToAdminCoAdminsNotSupported","message":"Sending email notifications to subscription administrator and coadministrators is not supported after April 3, 2024 due to Azure classic administrator retirement."}
│ 
│   with module.monitor.azurerm_monitor_autoscale_setting.this[0],
│   on ../../main.tf line 806, in resource "azurerm_monitor_autoscale_setting" "this":
│  806: resource "azurerm_monitor_autoscale_setting" "this" {
│

Expected Behaviour

create resource without any issues

Actual Behaviour

failure with above mentioned error message

Steps to Reproduce

terraform apply

Important Factoids

N/A

References

No response

teowa commented 3 weeks ago

Hi @farwind , thanks for submitting this issue! From the Azure update that we might no longer able to enable send_to_subscription_administrator or send_to_subscription_co_administrator for azurerm_monitor_autoscale_setting. I will submit PR the deprecate these properties in azurerm provider.