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

Error: Provider produced inconsistent final plan in azurerm_postgresql_server #4813

Closed
ausfestivus opened this issue Nov 5, 2019 · 2 comments · Fixed by #5443
Closed

Error: Provider produced inconsistent final plan in azurerm_postgresql_server #4813

ausfestivus opened this issue Nov 5, 2019 · 2 comments · Fixed by #5443
Labels
bug service/postgresql upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR

Comments

@ausfestivus
Copy link
Contributor

ausfestivus commented Nov 5, 2019

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 "+1" or "me too" comments, 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

Terraform (and AzureRM Provider) Version

😀 abest@BARMIX2:~/xxxxxx/cptTerraformEnterprise/terraform-private/examples/bootstrap-azure (develop-andrewb) $ terraform -v
Terraform v0.12.13
+ provider.azurerm v1.36.1
+ provider.random v2.2.1

Affected Resource(s)

  • azurerm_postgresql_server

Terraform Configuration Files

resource "azurerm_postgresql_server" "new" {
    name                = "${local.prefix}"
    location            = "${var.location}"
    resource_group_name = "${azurerm_resource_group.new.name}"

    sku {
        name     = "B_Gen5_2"
        capacity = 2
        tier     = "Basic"
        family   = "Gen5"
    }

    storage_profile {
        storage_mb            = 5120
        backup_retention_days = 30
        geo_redundant_backup  = "Disabled"
        auto_grow             = "Enabled"
    }

    administrator_login          = "psqladminun"
    administrator_login_password = "${random_string.dbserver.result}"
    version                      = "9.6"
    ssl_enforcement              = "Enabled"
    tags                         = "${var.additional_tags}"
}

Debug Output

See the Gist here https://gist.github.com/ausfestivus/e66a004bcf1cf1c0fc4be8af735ee683

Panic Output

nil

Expected Behavior

apply should not have ended with an error.

Actual Behavior

The following error is displayed at the end of the apply run:

2019/11/05 22:25:48 [ERROR] <root>: eval: *terraform.EvalCheckPlannedChange, err: Provider produced inconsistent final plan: When expanding the plan for azurerm_postgresql_database.new to include new values learned so far during apply, provider "azurerm" produced an invalid new value for .server_name: was cty.StringVal("cptTFE"), but now cty.StringVal("cpttfe").

This is a bug in the provider, which should be reported in the provider's own issue tracker.
2019/11/05 22:25:48 [ERROR] <root>: eval: *terraform.EvalSequence, err: Provider produced inconsistent final plan: When expanding the plan for azurerm_postgresql_database.new to include new values learned so far during apply, provider "azurerm" produced an invalid new value for .server_name: was cty.StringVal("cptTFE"), but now cty.StringVal("cpttfe").

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

Steps to Reproduce

With the above HCL run terraform apply -var-file ../AFILE.tfvars -input false -auto-approv

Important Factoids

nil

References

@katbyte
Copy link
Collaborator

katbyte commented Nov 8, 2019

Hi @ausfestivus,

I'm sorry that your having this issue, it seems like the API is either accepting uppercase in error, or not returning the correct case. Given that portal prevents uppercase server names i'm going to guess the API is just not correctly validating input and silently lowercasing it.

I've opened an issue on the sdk but i think you will have to change the server name to lowercase.

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug service/postgresql upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants