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.52k stars 4.6k forks source link

Error: Provider produced inconsistent result after apply to azurerm_postgresql_flexible_server #17278

Open thomeu opened 2 years ago

thomeu commented 2 years ago

Is there an existing issue for this?

Community Note

Terraform Version

0.12.31

AzureRM Provider Version

3.6.0

Affected Resource(s)/Data Source(s)

azurerm_postgresql_flexible_server

Terraform Configuration Files

terraform {
  required_version = "= 0.12.31"
}

provider "azurerm" {
  version = "3.6.0"
  features {}
}

resource "azurerm_postgresql_flexible_server" "sql_flexible_server" {
  name                   = "psqlflexibleserver"
  resource_group_name    = "thomeu-rg"
  location               = "West Europe"
  version                = "13"
  administrator_login    = "psqladmin"
  administrator_password = "H@Sh1CoR3!"
  zone                   = "1"
  storage_mb             = 32768
  sku_name               = "B_Standard_B1ms"
}

resource "azurerm_postgresql_flexible_server_database" "sql_flexible_database" {
  name      = "thomeu-db"
  server_id = azurerm_postgresql_flexible_server.sql_flexible_server.id
  collation = "en_US.UTF8"
  charset   = "UTF8"
}

Debug Output/Panic Output

Error: Provider produced inconsistent result after apply

When applying changes to
azurerm_postgresql_flexible_server.sql_flexible_server, provider
"registry.terraform.io/-/azurerm" produced an unexpected new value for was
present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

##[error]Terraform command 'apply' failed with exit code '1'.:  Provider produced inconsistent result after apply
##[error]
Error: Provider produced inconsistent result after apply

When applying changes to
azurerm_postgresql_flexible_server.sql_flexible_server, provider
"registry.terraform.io/-/azurerm" produced an unexpected new value for was
present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Expected Behaviour

Update Azure Database for PostgreSQL flexible server version from 12 to 13.

Actual Behaviour

Error.

Steps to Reproduce

Change version value from 12 to 13.

Important Factoids

No response

References

No response

sinbai commented 2 years ago

@thomeu thank you for opening this issue. After checking the terraform log, it seems this is an Azure API issue. I have filed an Azure API issue to track it. Could you follow it for more updates?

neiser commented 1 year ago

Note: This bug is present as of today (2023-01-30).