File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
modules/integrations/event-hub Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ resource "azurerm_role_assignment" "sysdig_data_receiver" {
121
121
# Create diagnostic settings for the subscription
122
122
# ---------------------------------------------------------------------------------------------
123
123
resource "azurerm_monitor_diagnostic_setting" "sysdig_diagnostic_setting" {
124
- count = length (var. enabled_platform_logs ) > 0 ? 1 : 0
124
+ count = length (var. enabled_platform_logs ) > 0 && ! var . is_organizational ? 1 : 0
125
125
126
126
name = " ${ var . diagnostic_settings_name } -${ random_string . random . result } -${ local . subscription_hash } "
127
127
target_resource_id = data. azurerm_subscription . sysdig_subscription . id
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ locals {
32
32
resource "azurerm_monitor_diagnostic_setting" "sysdig_org_diagnostic_setting" {
33
33
count = var. is_organizational ? length (local. enabled_subscriptions ) : 0
34
34
35
- name = " ${ var . diagnostic_settings_name } -${ local . subscription_hash } "
35
+ name = " ${ var . diagnostic_settings_name } -${ substr ( md5 ( local. enabled_subscriptions [ count . index ] . id ), 0 , 8 ) } "
36
36
target_resource_id = local. enabled_subscriptions [count . index ]. id
37
37
eventhub_authorization_rule_id = azurerm_eventhub_namespace_authorization_rule. sysdig_rule . id
38
38
eventhub_name = azurerm_eventhub. sysdig_event_hub . name
You can’t perform that action at this time.
0 commit comments