Skip to content

Commit

Permalink
azurerm_mssql_server_microsoft_support_auditing_policy - only include…
Browse files Browse the repository at this point in the history
… storage endpoint in payload if set (#24122)
  • Loading branch information
katbyte authored Dec 7, 2023
1 parent dc070e5 commit 2c8d88c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,14 @@ func resourceMsSqlServerMicrosoftSupportAuditingPolicyCreateUpdate(d *pluginsdk.

params := sql.ServerDevOpsAuditingSettings{
ServerDevOpsAuditSettingsProperties: &sql.ServerDevOpsAuditSettingsProperties{
StorageEndpoint: utils.String(d.Get("blob_storage_endpoint").(string)),
IsAzureMonitorTargetEnabled: utils.Bool(d.Get("log_monitoring_enabled").(bool)),
},
}

if v := d.Get("blob_storage_endpoint").(string); v != "" {
params.ServerDevOpsAuditSettingsProperties.StorageEndpoint = utils.String(v)
}

if d.Get("enabled").(bool) {
params.ServerDevOpsAuditSettingsProperties.State = sql.BlobAuditingPolicyStateEnabled
} else {
Expand Down

0 comments on commit 2c8d88c

Please sign in to comment.