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

New resource azurerm_mssql_database_extended_auditing_policy #7793

Merged
merged 3 commits into from
Sep 10, 2020

Conversation

yupwei68
Copy link
Contributor

Partial fix: #7486
#6906

azurerm_mssql_server_extended_auditing_policy will be created after this PR is merged

=== RUN TestAccAzureRMMsSqlDatabase_withBlobAuditingPolices
=== PAUSE TestAccAzureRMMsSqlDatabase_withBlobAuditingPolices
=== CONT TestAccAzureRMMsSqlDatabase_withBlobAuditingPolices
--- PASS: TestAccAzureRMMsSqlDatabase_withBlobAuditingPolices (456.35s)

=== RUN TestAccAzureRMSqlDatabase_withBlobAuditingPolices
=== PAUSE TestAccAzureRMSqlDatabase_withBlobAuditingPolices
=== CONT TestAccAzureRMSqlDatabase_withBlobAuditingPolices
--- PASS: TestAccAzureRMSqlDatabase_withBlobAuditingPolices (416.91s)

=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic (299.94s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete (283.80s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update (427.41s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall (291.75s)

@fprimex

This comment has been minimized.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @yupwei68 -overall looks good and once the comments i've left inline are addressed this should be good to merge

@yupwei68
Copy link
Contributor Author

yupwei68 commented Sep 2, 2020

Hi @katbyte Thanks for your comments. I have pushed corresponding changes. Please continue reviewing.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @yupwei68 - running the tests it looks like there are some failures, most importantly:

------- Stdout: -------
=== RUN   TestAccAzureRMMsSqlServer_blobAuditingPolicies_withFirewall
=== PAUSE TestAccAzureRMMsSqlServer_blobAuditingPolicies_withFirewall
=== CONT  TestAccAzureRMMsSqlServer_blobAuditingPolicies_withFirewall
    TestAccAzureRMMsSqlServer_blobAuditingPolicies_withFirewall: testing.go:684: Step 4 error: errors during apply:
        
        Error: waiting for creation of SQL Server "acctestsqlserver200904005924819196" Blob Auditing Policies(Resource Group "acctestRG-mssql-200904005924819196"): Code="BlobAuditingInvalidStorageAccountName" Message="The provided storage account is not valid or does not exist."
        
          on /opt/teamcity-agent/temp/buildTmp/tf-test856348057/main.tf line 11:
          (source code not available)
        
        
--- FAIL: TestAccAzureRMMsSqlServer_blobAuditingPolicies_withFirewall (483.49s)
FAIL

@yupwei68
Copy link
Contributor Author

yupwei68 commented Sep 7, 2020

Hi @katbyte , Thanks for comments again. Corresponding changes have been pushed. I could not reproduce your error in comment. I have tried to apply the storage account in different subscription. It succeeds too. Here's the acctest results:
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_basic (333.75s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_requiresImport
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_requiresImport
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_requiresImport
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_requiresImport (323.59s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_complete (313.29s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_update (445.33s)
=== RUN TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall
=== PAUSE TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall
=== CONT TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall
--- PASS: TestAccAzureRMMsSqlDatabaseExtendedAuditingPolicy_storageAccBehindFireWall (313.68s)

@katbyte katbyte added the service/mssql Microsoft SQL Server label Sep 10, 2020
@katbyte katbyte added this to the v2.27.0 milestone Sep 10, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yupwei68, LGTM now 👍

@ghost
Copy link

ghost commented Sep 10, 2020

This has been released in version 2.27.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.27.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Oct 10, 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 as resolved and limited conversation to collaborators Oct 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for external extended_auditing_policy setting for azurerm_sql_server
3 participants