Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_postgresql_flexible_server_virtual_endpoint - Provider produced inconsistent result after apply when source and replica use the same ID #28502

Open
1 task done
katbyte opened this issue Jan 14, 2025 · 0 comments

Comments

@katbyte
Copy link
Collaborator

katbyte commented Jan 14, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.7

AzureRM Provider Version

4.4.0

Affected Resource(s)/Data Source(s)

azurerm_postgresql_flexible_server_virtual_endpoint

Terraform Configuration Files

variable "name" {
    default = "test"
}

resource "azurerm_resource_group" "example" {
  name     = var.name
  location = "East US2"
}

resource "azurerm_postgresql_flexible_server" "example" {
  name                          = var.name
  resource_group_name           = azurerm_resource_group.example.name
  location                      = azurerm_resource_group.example.location
  version                       = "16"
  public_network_access_enabled = false
  administrator_login           = "psqladmin"
  administrator_password        = "H@Sh1CoR3!"
  zone                          = "1"

  storage_mb   = 32768
  storage_tier = "P30"

  sku_name = "GP_Standard_D2s_v3"
}

resource "azurerm_postgresql_flexible_server_virtual_endpoint" "example" {
  name              = "${var.name}endpoint"
  source_server_id  = azurerm_postgresql_flexible_server.example.id
  replica_server_id = azurerm_postgresql_flexible_server.example.id   # these being the same is possible in the portal and when they are the same in terraform it gets unhappy
  type              = "ReadWrite"
}

Debug Output/Panic Output

Error: Provider produced inconsistent result after apply

When applying changes to module.postgressql-flexible-server.azurerm_postgresql_flexible_server_virtual_endpoint.this[0], provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an unexpected new value: 

Root object 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

portal allows them to be the same

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants