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_server_extended_auditing_policy #8447

Merged
merged 5 commits into from
Sep 15, 2020

Conversation

yupwei68
Copy link
Contributor

@yupwei68 yupwei68 commented Sep 14, 2020

Extend: #7793
Fix: #7486
#6906
#8437

=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic (195.94s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport (244.87s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete (175.96s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update (280.84s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall (290.78s)
PASS

Process finished with exit code 0

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @yupwei68, this is looking good but I'm seeing issues with TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall. Terraform wants to update storage_endpoint.

storage_endpoint:  "" => "https://unlikely23exst2acctaae1z.blob.core.windows.net/"

It looks like we'll want to wait for a specific state as the resource goes down when updating the storage_endpoint.

"state": "Disabled",
"storageEndpoint": "",

and then comes back up later down the line

"state": "Enabled",
"storageEndpoint": "faketesturl",

Terraform doesn't catch it though so we should add a WaitforState and make sure the resource is Enabled before passing it on to the read method.

@yupwei68
Copy link
Contributor Author

@mbfrahry Sorry, I forgot the server auditing creation is async, I'll change it.

@yupwei68
Copy link
Contributor Author

@mbfrahry Thanks for your comments. I've retested them. Please continue reviewing

=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_basic (325.85s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_requiresImport (259.68s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_complete (357.87s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_update (650.06s)
=== RUN TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall
=== PAUSE TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall
=== CONT TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall
--- PASS: TestAccAzureRMMsSqlServerExtendedAuditingPolicy_storageAccBehindFireWall (454.10s)
PASS

Process finished with exit code 0

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @yupwei68

@mbfrahry mbfrahry merged commit 9f8e733 into hashicorp:master Sep 15, 2020
mbfrahry added a commit that referenced this pull request Sep 15, 2020
@mbfrahry mbfrahry added service/mssql Microsoft SQL Server new-resource labels Sep 15, 2020
@mbfrahry mbfrahry added this to the v2.28.0 milestone Sep 15, 2020
@ghost
Copy link

ghost commented Sep 17, 2020

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

@yupwei68 yupwei68 deleted the wyp-sql-server-auditing branch October 12, 2020 01:48
@ghost
Copy link

ghost commented Oct 16, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for external extended_auditing_policy setting for azurerm_sql_server
2 participants