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

azurerm_mssql_database - threat_detection_policy.0.storage_* can now be correctly set as empty #19670

Merged
merged 4 commits into from
Dec 14, 2022

Conversation

mbfrahry
Copy link
Member

@mbfrahry mbfrahry commented Dec 14, 2022

image

@github-actions github-actions bot added service/mssql Microsoft SQL Server size/S labels Dec 14, 2022
@mbfrahry mbfrahry marked this pull request as ready for review December 14, 2022 00:35
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.

LGTM 🦀

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

Left a few comments inline, since I think this'll break removing these?

@@ -742,10 +742,10 @@ func expandMsSqlServerSecurityAlertPolicy(d *pluginsdk.ResourceData) sql.Databas
if v, ok := securityAlert["retention_days"]; ok {
properties.RetentionDays = utils.Int32(int32(v.(int)))
}
if v, ok := securityAlert["storage_account_access_key"]; ok {
if v, ok := securityAlert["storage_account_access_key"]; ok && v.(string) != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think doing this means these can no longer be removed, can we add a test removing these to confirm that works?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was all good with no code changes but I added a test to confirm!

properties.StorageAccountAccessKey = utils.String(v.(string))
}
if v, ok := securityAlert["storage_endpoint"]; ok {
if v, ok := securityAlert["storage_endpoint"]; ok && v.(string) != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think doing this means these can no longer be removed, can we add a test removing these to confirm that works?

@mbfrahry mbfrahry merged commit a2deb5e into main Dec 14, 2022
@mbfrahry mbfrahry deleted the b-mssql-database-storage branch December 14, 2022 22:52
@mbfrahry mbfrahry added this to the v3.36.0 milestone Dec 14, 2022
mbfrahry added a commit that referenced this pull request Dec 14, 2022
@github-actions
Copy link

This functionality has been released in v3.36.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!

favoretti pushed a commit to favoretti/terraform-provider-azurerm that referenced this pull request Jan 12, 2023
favoretti pushed a commit to favoretti/terraform-provider-azurerm that referenced this pull request Jan 12, 2023
@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/mssql Microsoft SQL Server size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants