-
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_mssql_database
: Fix extended_auditing_policy
for Secondaries
#13799
azurerm_mssql_database
: Fix extended_auditing_policy
for Secondaries
#13799
Conversation
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 @aristosvo, thanks for this PR. Looks like there are some test failures though
------- Stdout: -------
=== RUN TestAccMsSqlDatabase_createSecondaryMode
=== PAUSE TestAccMsSqlDatabase_createSecondaryMode
=== CONT TestAccMsSqlDatabase_createSecondaryMode
testcase.go:108: Step 1/2 error: After applying this test step, the plan was not empty.
stdout:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# azurerm_mssql_database.secondary will be updated in-place
~ resource "azurerm_mssql_database" "secondary" {
+ extended_auditing_policy = (known after apply)
id = "/subscriptions/*******/resourceGroups/acctestRG-mssql2-211020080224539510/providers/Microsoft.Sql/servers/acctest-sqlserver2-211020080224539510/databases/acctest-dbs-211020080224539510"
name = "acctest-dbs-211020080224539510"
# (14 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccMsSqlDatabase_createSecondaryMode (495.94s)
FAIL
Thanks @stephybun, I noticed indeed. I created a fix, tests are passing locally: ❯ go install && make acctests SERVICE='mssql' TESTARGS='-run=TestAccMsSqlDatabase_createSecondaryMode'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/mssql -run=TestAccMsSqlDatabase_createSecondaryMode -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccMsSqlDatabase_createSecondaryMode
=== PAUSE TestAccMsSqlDatabase_createSecondaryMode
=== CONT TestAccMsSqlDatabase_createSecondaryMode
--- PASS: TestAccMsSqlDatabase_createSecondaryMode (826.99s)
PASS
ok github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql 828.639s Edit:
|
Thanks @aristosvo, that test passes in TC now. There are some other test failures but they're failing in main and look unrelated to this change. LGTM! |
This functionality has been released in v2.82.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Fixes #13774
For some reason,
extended_auditing_policy
is returned for Secondaries nowadays, breaking every update of a secondary without this fix.