Skip to content

Commit

Permalink
Updated no longer supported code blocks (#27540)
Browse files Browse the repository at this point in the history
* Update main.tf

The log block is no longer supported, it changed to enabled_log, the supported block.
The enabled string is not needed and the retention_policy function is deprecated.

* Update examples/sql-azure/sql_server_auditing_log_analytics/main.tf

Co-authored-by: stephybun <steph@hashicorp.com>

* Update examples/sql-azure/sql_server_auditing_log_analytics/main.tf

Co-authored-by: stephybun <steph@hashicorp.com>

---------

Co-authored-by: stephybun <steph@hashicorp.com>
  • Loading branch information
frostsxx and stephybun authored Oct 2, 2024
1 parent cede20d commit 1bd6159
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions examples/sql-azure/sql_server_auditing_log_analytics/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,16 @@ resource "azurerm_monitor_diagnostic_setting" "example" {
target_resource_id = "${azurerm_mssql_server.example.id}/databases/master"
log_analytics_workspace_id = azurerm_log_analytics_workspace.example.id

log {
enabled_log {
category = "SQLSecurityAuditEvents"
enabled = true

retention_policy {
enabled = false
}
}

metric {
category = "AllMetrics"

retention_policy {
enabled = false
}
}

lifecycle {
ignore_changes = [log, metric]
ignore_changes = [enabled_log, metric]
}
}

Expand Down

0 comments on commit 1bd6159

Please sign in to comment.