azurerm_postgresql_flexible_server: more support for in-place major version upgrade#28559
azurerm_postgresql_flexible_server: more support for in-place major version upgrade#28559mbfrahry merged 5 commits intohashicorp:mainfrom
azurerm_postgresql_flexible_server: more support for in-place major version upgrade#28559Conversation
5346a48 to
7e1a5ea
Compare
|
Here's my proposal to improve this experience... Say the user has deployed a server using this block: My proposal is that we implement some additional |
7e1a5ea to
72b1129
Compare
|
@nachoalonsoportillo Thank you for the proposal; it is valuable to some users. However, adding such a property may disrupt existing configurations where I also tested to update the create_mode to an existing server and it works, although the GET api doesn't return the create_mode at all. and no matter what the create_mode I updated, the version can be updated in place. So I removed the whole |
3b8e41e to
905aa4d
Compare
82ca51c to
a78da30
Compare
|
Hi, when will the fix be merged? We need it to have a proper in-place upgrade using Terraform. |
| "allow_major_version_upgrade_enabled": { | ||
| Type: pluginsdk.TypeBool, | ||
| Optional: true, | ||
| Default: false, | ||
| }, |
There was a problem hiding this comment.
I agree with your initial assessment to not have a variable for this. Let's remove it
| * `version` - (Optional) The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15` and `16`. Required when `create_mode` is `Default`. | ||
|
|
||
| -> **Note:** When `create_mode` is `Update`, upgrading version wouldn't force a new resource to be created. | ||
| -> **Note:** Upgrading version wouldn't force a new resource to be created whilst it can still cause the server out of service for a while. Downgrading the version will force a new resource to be created. |
There was a problem hiding this comment.
| -> **Note:** Upgrading version wouldn't force a new resource to be created whilst it can still cause the server out of service for a while. Downgrading the version will force a new resource to be created. | |
| -> **Note:** Downgrading `version` isn't supported and will force a new PostgreSQL Flexible Server to be created. |
There was a problem hiding this comment.
These have been updated. would you please take another look?
|
Hi, when will the fix be merged? We need it to have a proper in-place upgrade using Terraform. |
* Update CHANGELOG.md #29285, #29294 * Update CHANGELOG.md for #29307 * Update CHANGELOG.md #29283 * Update CHANGELOG.md #29271 * Update CHANGELOG.md #29298 * Update CHANGELOG.md #29278 * Update CHANGELOG.md #29341 * Update CHANGELOG.md #29328 * Update CHANGELOG.md #29292 * Update CHANGELOG.md #29361 * Update CHANGELOG.md #29296 * Update CHANGELOG.md #28239 * Update CHANGELOG.md #28974 * Update CHANGELOG.md #29254 * Update CHANGELOG.md #29333 * Update CHANGELOG.md #29314 * Update CHANGELOG.md #28929 * Update CHANGELOG.md for #29382 * Update for #28676 * Update CHANGELOG.md for #28740 * Update CHANGELOG.md for #28559 * Update CHANGELOG.md #29143 * Update CHANGELOG.md #29329 * Update CHANGELOG.md #29380 * Update CHANGELOG.md #29309 * Update CHANGELOG.md #29317 * prep for release --------- Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> Co-authored-by: kt <kt@katbyte.me> Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: jackofallops <ste@hashicorp.com>
…new resource to be created (hashicorp#28559)
* Update CHANGELOG.md hashicorp#29285, hashicorp#29294 * Update CHANGELOG.md for hashicorp#29307 * Update CHANGELOG.md hashicorp#29283 * Update CHANGELOG.md hashicorp#29271 * Update CHANGELOG.md hashicorp#29298 * Update CHANGELOG.md hashicorp#29278 * Update CHANGELOG.md hashicorp#29341 * Update CHANGELOG.md hashicorp#29328 * Update CHANGELOG.md hashicorp#29292 * Update CHANGELOG.md hashicorp#29361 * Update CHANGELOG.md hashicorp#29296 * Update CHANGELOG.md hashicorp#28239 * Update CHANGELOG.md hashicorp#28974 * Update CHANGELOG.md hashicorp#29254 * Update CHANGELOG.md hashicorp#29333 * Update CHANGELOG.md hashicorp#29314 * Update CHANGELOG.md hashicorp#28929 * Update CHANGELOG.md for hashicorp#29382 * Update for hashicorp#28676 * Update CHANGELOG.md for hashicorp#28740 * Update CHANGELOG.md for hashicorp#28559 * Update CHANGELOG.md hashicorp#29143 * Update CHANGELOG.md hashicorp#29329 * Update CHANGELOG.md hashicorp#29380 * Update CHANGELOG.md hashicorp#29309 * Update CHANGELOG.md hashicorp#29317 * prep for release --------- Co-authored-by: Matthew Frahry <mbfrahry@gmail.com> Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com> Co-authored-by: kt <kt@katbyte.me> Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: jackofallops <ste@hashicorp.com>
|
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. |
Community Note
Description
Per API's behavior of
create_modeonly works when creating the instance, and upgrade theversionof the server should not cause a force-recreate of the resource. I have tested locally, whether create_mode set or not, the version can be upgrade successfully. So this PR changes the force-new logic to only when downgrading the version.This PR also move some related validation logic from
CreatetoCustomizeDiff, so all the errors can be exposed in plan stage.The new version update psudo logic:
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_postgresql_flexible_server- support in-place major version upgrade [changing theazurerm_postgresql_flexible_serverversion from 11 to any other version forces a recreate #25184]This is a (please select all that apply):
Related Issue(s)
Fixes #25184
Note
If this PR changes meaningfully during the course of review please update the title and description as required.