Skip to content

Commit

Permalink
add description to Service Principal resources so that customers can …
Browse files Browse the repository at this point in the history
…identify origin (#51)
  • Loading branch information
maratsal authored Aug 16, 2024
1 parent 336a3f6 commit 55e7637
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions modules/config-posture/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ locals {
resource "azuread_service_principal" "sysdig_cspm_sp" {
client_id = data.sysdig_secure_trusted_azure_app.config_posture.application_id
use_existing = true
notes = "Service Principal linked to the Sysdig Secure CNAPP - CSPM module"
}

#---------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions modules/integrations/event-hub/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ resource "random_string" "random" {
resource "azuread_service_principal" "sysdig_event_hub_sp" {
client_id = data.sysdig_secure_trusted_azure_app.threat_detection.application_id
use_existing = true
notes = "Service Principal linked to the Sysdig Secure CNAPP - CDR module"
}

#---------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions modules/onboarding/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ data "sysdig_secure_trusted_azure_app" "onboarding" {
resource "azuread_service_principal" "sysdig_onboarding_sp" {
client_id = data.sysdig_secure_trusted_azure_app.onboarding.application_id
use_existing = true
notes = "Service Principal linked to the Sysdig Secure CNAPP - Onboarding module"
}

#-------------------------------------------------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions modules/services/event-hub-data-source/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ locals {
subscription_hash = substr(md5(data.azurerm_client_config.current.subscription_id), 0, 8)
}

# A random resource is used to generate unique Event Hub names.
# This prevents conflicts when recreating an Event Hub Namespace with the same name.
# Azure caches the Event Hub name after deletion.
# A random resource is used to generate unique Event Hub names.
# This prevents conflicts when recreating an Event Hub Namespace with the same name.
# Azure caches the Event Hub name after deletion.
# If the namespace is recreated, Azure restores the existing Event Hub, causing a Terraform apply failure.
resource "random_string" "random" {
length = 4
Expand All @@ -30,6 +30,7 @@ resource "azuread_service_principal" "sysdig_service_principal" {
lifecycle {
prevent_destroy = true
}
notes = "Service Principal linked to the Sysdig Secure CNAPP"
}

#---------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions modules/services/service-principal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ resource "azuread_service_principal" "sysdig_sp" {
lifecycle {
prevent_destroy = true
}
notes = "Service Principal linked to the Sysdig Secure CNAPP"
}

#---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 55e7637

Please sign in to comment.