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

azurerm_dashboard_grafana invalid major version #27133

Open tpcgold opened 3 months ago

tpcgold commented 3 months ago

Is there an existing issue for this?

Community Note

Terraform Version

1.9.4

AzureRM Provider Version

3.116.0

Affected Resource(s)/Data Source(s)

azurerm_dashboard_grafana

Terraform Configuration Files

resource "azurerm_dashboard_grafana" "grafana" {
  provider              = azurerm.web
  location              = azurerm_resource_group.rgK8s.location
  name                  = "grafana${var.app_name}${var.ENVIRONMENT}${random_string.suffix.id}"
  resource_group_name   = azurerm_resource_group.rgK8s.name
  azure_monitor_workspace_integrations {
    resource_id = azurerm_monitor_workspace.monitoring_workspace.id
  }
  identity {
    type = "SystemAssigned"
  }
  depends_on = [
    azurerm_resource_group.rgK8s,
  ]
}

Debug Output/Panic Output

Error: creating Grafana (Subscription: "{place_holder}" Resource Group Name: "{place_holder}" Grafana Name: "{place_holder}"): performing GrafanaCreate: unexpected status 400 (400 Bad Request) with error: GrafanaMajorVersionNotSupported: The requested grafana major version '9' is not valid for sku type Standard. Valid versions: 10, 11
with azurerm_dashboard_grafana.grafana
on monitoring.tf line 11, in resource "azurerm_dashboard_grafana" "grafana":
resource "azurerm_dashboard_grafana" "grafana" {
creating Grafana (Subscription: "{place_holder}"
Resource Group Name: "{place_holder}"
Grafana Name: "{place_holder}"): performing GrafanaCreate: unexpected status 400 (400 Bad Request) with error: GrafanaMajorVersionNotSupported: The requested grafana major version '9' is not valid for sku type Standard. Valid versions: 10, 11

and if defining grafana_major_version = 11:

Error: expected grafana_major_version to be one of ["9" "10"], got 11
with azurerm_dashboard_grafana.grafana
on monitoring.tf line 16, in resource "azurerm_dashboard_grafana" "grafana":
  grafana_major_version = 11

Expected Behaviour

default value should be correct

Actual Behaviour

8 is invalid and 11 not available

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

jiaweitao001 commented 3 months ago

Hi @tpcgold , thanks for opening the issue. Currently the only supported major version is 10. It's not clearly described in the documentation, we will fix it.