-
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
Fix #196 creating a database with create_mode PointInTimeRestore fails #197
Fix #196 creating a database with create_mode PointInTimeRestore fails #197
Conversation
This one conflicts with PR #191. @ouzklcn what are the details of your test? I'll test similarly with my updated sql db provider. |
@sebastus You can use below resource template for testing. If you like I can fork your code fix it and open a PR to your branch as well. resource "azurerm_sql_database" "sql_db" {
name = "test-restore"
resource_group_name = "testdb-rg"
location = "West Europe"
server_name = "testdb-server"
create_mode = "PointInTimeRestore"
source_database_id = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testdb-rg/providers/Microsoft.Sql/servers/testdb-server/databases/testdb"
restore_point_in_time = "2017-07-28T08:24:37.467Z"
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ouzklcn
Thanks for this PR - apologies for the delay in reviewing this!
This change LGTM - would it be possible to add an acceptance test for this change so we can verify it's functioning as intended? Here's an example from the azurerm_sql_database
resource.
Thanks!
Hey @tombuildsstuff I added a test. You can find it's output below.
Unfortunately, as you can see from the output, it takes a lot time complete. Azure does not immediately creates a restorable backup once it creates a database. It takes around 10 minutes. Because of that I need to set the test to sleep for a reasonable time to wait Azure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ouzklcn
Thanks for pushing those changes - I've taken another look and this LGTM :)
Tests pass:
$ TF_ACC=1 envchain azurerm go test ./azurerm -v -timeout 120m -run TestAccAzureRMSqlDatabase_
=== RUN TestAccAzureRMSqlDatabase_basic
--- PASS: TestAccAzureRMSqlDatabase_basic (170.06s)
=== RUN TestAccAzureRMSqlDatabase_elasticPool
--- PASS: TestAccAzureRMSqlDatabase_elasticPool (265.52s)
=== RUN TestAccAzureRMSqlDatabase_withTags
--- PASS: TestAccAzureRMSqlDatabase_withTags (301.37s)
=== RUN TestAccAzureRMSqlDatabase_datawarehouse
--- PASS: TestAccAzureRMSqlDatabase_datawarehouse (296.40s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 1033.369s
Thanks!
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! |
No description provided.