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

Terraform support for point on time server restore for Azure managed PostgreSQL #6180

Closed
singitamkr opened this issue Mar 19, 2020 · 5 comments · Fixed by #6459
Closed

Terraform support for point on time server restore for Azure managed PostgreSQL #6180

singitamkr opened this issue Mar 19, 2020 · 5 comments · Fixed by #6459

Comments

@singitamkr
Copy link

Hi,
We are using terraform for our couple cluster deployment for our product in MS Azure. But, in case of managed PostgreSQL, when we do a parallel upgrades we are not able to restore an existing PostgreSQL DB to a new instance with point in time restore option. Azure cli supports the same as below command. Azure managed PostgreSQL server restore (point in time) is not supported in terraform at present.

./az postgres server restore -g DatabaseTestingnPOC -n NewPrimary -s primary --restore-point-in-time "2020-03-17T16:50:30.0000Z"

Can you please help in getting this through terraform.

Thanks best regards
Krishna
Official email - [email protected]

@duaneguthrie
Copy link

to add on here:
azure sql db has https://www.terraform.io/docs/providers/azurerm/r/sql_database.html with "create_mode" = "restore"

we need similar api for PostgreSql https://docs.microsoft.com/en-us/rest/api/postgresql/databases/createorupdate

@njuCZ
Copy link
Contributor

njuCZ commented Mar 23, 2020

I am working on this issue

@duaneguthrie
Copy link

thanks so much

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.