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 - fix issue updating storage_mb and backup_retention_days together #21987

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

myc2h6o
Copy link
Contributor

@myc2h6o myc2h6o commented May 31, 2023

Caught in TestAccPostgresqlFlexibleServer_completeUpdate
when storage_mb and backup_retention_days are updated at a single request, backup_retention_days is not updated.

Similar to the logic here

if d.HasChange("storage") && !d.Get("storage.0.auto_grow_enabled").(bool) {
parameters := servers.ServerForUpdate{
Properties: &servers.ServerPropertiesForUpdate{
Storage: expandArmServerStorage(d.Get("storage").([]interface{})),
},
}
if err := client.UpdateThenPoll(ctx, *id, parameters); err != nil {

@myc2h6o
Copy link
Contributor Author

myc2h6o commented May 31, 2023

Test result
image

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bug in the api that a value isn't updated if another value is also being updated? We should open an issue on the rest-api-specs and link that here

@myc2h6o
Copy link
Contributor Author

myc2h6o commented Jun 1, 2023

@mbfrahry thanks for reviewing the change! I've found an existing issue in the spec repo Azure/azure-rest-api-specs#22867 and linked it to the comment

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for finding and linking that!

@mbfrahry mbfrahry added this to the v3.59.0 milestone Jun 1, 2023
@mbfrahry mbfrahry merged commit ef17d55 into hashicorp:main Jun 1, 2023
13 checks passed
mbfrahry added a commit that referenced this pull request Jun 1, 2023
@myc2h6o myc2h6o deleted the postgresql_update_storage branch June 3, 2023 07:34
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants