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_server fails on update if auto_grow was triggered #5865

Closed
PSanetra opened this issue Feb 24, 2020 · 2 comments · Fixed by #6459
Closed

azurerm_postgresql_server fails on update if auto_grow was triggered #5865

PSanetra opened this issue Feb 24, 2020 · 2 comments · Fixed by #6459

Comments

@PSanetra
Copy link

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

terraform: 0.12.16
azurerm: 1.44.0

Affected Resource(s)

  • azurerm_postgresql_server

Terraform Configuration Files

resource "azurerm_postgresql_server" "db-server" {
  name = "myserver"
  location = "westeurope"
  resource_group_name = "some_resource_group"

  sku {
    name = "GP_Gen5_2"
    capacity = 2
    tier = "GeneralPurpose"
    family = "Gen5"
  }

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

  administrator_login = "postgres"
  administrator_login_password = "changeme"
  version = "11"
  ssl_enforcement = "Enabled"
}

Expected Behavior

When the storage was already increased, because auto_grow was enabled, then storage_mb should be ignored.

Actual Behavior

Terraform aborts with the following error from Azure: Error: Error waiting for update of PostgreSQL Server "myserver" (Resource Group "some_resource_group"): Code="UnsupportedUpdate" Message="Cannot update StorageMB Downscaling for server"

katbyte added a commit that referenced this issue Apr 21, 2020
refactor code and tests to

support for create_mode, creation_source_server_id, infrastructure_encryption_enabled,public_network_access_enabled, ssl_minimal_tls_version_enforced properties
support replicas
computed storage_mb when auto_grow_enabled is true
use booleans for toggle properties by renaming:
-- ssl_enforcement -> ssl_enforcement_enabled
-- geo_redundant_backup -> backup_geo_redundant_enabled
-- auto_grow -> auto_grow_enabled
move all properties within the storage_profile block to the top level
superseeds #6241
fixes #6216
fixes #6180
fixes #5865
fixes #5121
fixed #2819
@katbyte katbyte added this to the v2.7.0 milestone Apr 21, 2020
@ghost
Copy link

ghost commented Apr 23, 2020

This has been released in version 2.7.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.7.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented May 22, 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 May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants