-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 public_network_access_enabled setting on replica not respected on create #11346
Comments
Hi @NillsF! Short analysis/hypothesis of the problem: As you are replicating to a different region, there should be a way for the other Azure region to reach your Docs say that
Nothing found on necessity of the public availability of the database. I'll check the order of application of public access in the code and check if this can be done differently to enable this workflow. |
It's a tough problem, although not hard to fix. I believe it is a problem which should probably be fixed on the Azure API side. I've reproduced it in the acctests by adding
|
This has been released in version 2.57.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.57.0"
}
# ... other configuration ... |
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. |
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_postgresql_server
Terraform Configuration Files
Two files:
postgres.tf
var.tf
Debug Output
https://gist.github.com/NillsF/be2b1d564fa20844f7e59a98c8dc8379
Panic Output
Expected Behaviour
public_network_access_enabled
should be kept false when creating.Actual Behaviour
When creating a postgresSQL replica, the
public_network_access_enabled
setting is set to true. In the master, it is kept the right way.However, the
terraform plan
shows TF trying to set it to false:This can be resolved by running
terraform plan
andterraform apply
a second time.Steps to Reproduce
terraform plan
andterraform apply
using the files provided above. This will result in the bad configterraform plan
andterraform apply
again will update the configuration correctly.Important Factoids
References
@aristosvo did some great work implementing locking in the following issue/PR:
The text was updated successfully, but these errors were encountered: