-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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_configuration restarts the underlying server on each value change #22257
Comments
Thanks for raising this issue. I assume it's by TF design since the request of restarting server for static parameters is from service team and they confirmed that the server needs to be restarted to reflect the change on static parameters. Currently, TF only restarts the server against static parameters. It wouldn't restart server against dynamic parameters. For your situation, suggest to put the list of static parameters in front of the list of dynamic parameters in tf config. |
This behavior is confusing: TF adds some special and not documented action on top of parameter update. The server restart is a kind of tricky side effect which you do not expect. Why then azure-cli or azure portal does not do the same? I wish Infrastructure-related software to be boringly predictable :) |
@neil-yechenwei, is it possible to make the restarts optional? Maybe, On the spot I cannot come up with any other SaaS solution which enforces mandatory restart on each server parameter change (even in Azure stack). I think, regular customer wouldn't expect such events from the box. Server restart is disruptive operation in general, so there should be a possibility to control when and how customer can perform it. I assume there might be use-cases when immediate restart is the desired outcome, but I believe it should be a conscious choice of the infrastructure operator. What do you think? |
@neil-yechenwei , @rcskosir, I implemented a provider feature that allows to disable postgres server restarts: #23811. The implementation is 100% backward compatible so it should not change behaviour of any existing code. Could you check it out? |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.3.2
AzureRM Provider Version
3.40+
Affected Resource(s)/Data Source(s)
azurerm_postgresql_flexible_server_configuration
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Changing flex-server configuration should work the same as in az-cli or azure-portal: updating single parameter should not trigger immediate server restart.
We have a scenario, when the fleet of flex servers is managed by an extended team, that could change several config settings. This scenario works fine when team contributes to the terraform over extended period of time, and then we apply changes during the maintenance window. We want to control when to restart the service, as it could cause disruptions to the clients. For example, recently we introduced around 10 config values change at once, which caused unexpected restart storm.
Actual Behaviour
Each parameter change triggers undocumented server restarts, which is disruptive operation. This behaviour differs from other native tools or from Azure Single Server configuration.
This change was introduced in #20044
Steps to Reproduce
No response
Important Factoids
No response
References
The text was updated successfully, but these errors were encountered: