diff --git a/.secrets.baseline b/.secrets.baseline
index d8cc48b..5c1d691 100644
--- a/.secrets.baseline
+++ b/.secrets.baseline
@@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
- "generated_at": "2023-12-11T06:40:44Z",
+ "generated_at": "2023-12-12T06:40:44Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
diff --git a/README.md b/README.md
index 42ecee8..bcedc91 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ You need the following permissions to run this module.
| [cos\_instance\_crn](#input\_cos\_instance\_crn) | CRN of the Cloud Object Storage to store SCC data. Required when creating a new SCC instance. | `string` | `null` | no |
| [en\_instance\_crn](#input\_en\_instance\_crn) | The CRN of Event Notifications instance to be used with SCC. If no value is provided, Event Notifications will not be enabled for this SCC instance | `string` | `null` | no |
| [en\_source\_description](#input\_en\_source\_description) | Optional description to give for the Event Notifications integration source. Only used if a value is passed for `en_instance_crn`. | `string` | `null` | no |
-| [en\_source\_name](#input\_en\_source\_name) | The source name to use for the Event Notifications integration. Required if a value is passed for `en_instance_crn`. | `string` | `null` | no |
+| [en\_source\_name](#input\_en\_source\_name) | The source name to use for the Event Notifications integration. Required if a value is passed for `en_instance_crn`. This name must be unique per SCC instance that is integrated with the Event Notfications instance. | `string` | `"compliance"` | no |
| [existing\_scc\_instance\_crn](#input\_existing\_scc\_instance\_crn) | The CRN of an existing Security and Compliance Center instance. If not supplied, a new instance will be created. | `string` | `null` | no |
| [instance\_name](#input\_instance\_name) | Name of the security and compliance instance that will be provisioned by this module | `string` | n/a | yes |
| [plan](#input\_plan) | Pricing plan to create SCC instance. Options include security-compliance-center-standard-plan or security-compliance-center-trial-plan | `string` | `"security-compliance-center-standard-plan"` | no |
diff --git a/examples/complete/main.tf b/examples/complete/main.tf
index 5da0784..dccfd86 100644
--- a/examples/complete/main.tf
+++ b/examples/complete/main.tf
@@ -68,7 +68,7 @@ module "create_scc_instance" {
cos_bucket = var.existing_scc_instance_crn == null ? module.cos[0].bucket_name : null
cos_instance_crn = var.existing_scc_instance_crn == null ? module.cos[0].cos_instance_id : null
en_instance_crn = module.event_notification.crn
- en_source_name = module.event_notification.event_notification_instance_name
+ en_source_name = "${var.prefix}-en-integration" # This name must be unique per SCC instance that is integrated with the Event Notfications instance.
skip_cos_iam_authorization_policy = false
attach_wp_to_scc_instance = true
skip_scc_wp_auth_policy = false
diff --git a/main.tf b/main.tf
index 05aaf5b..3f5b30d 100644
--- a/main.tf
+++ b/main.tf
@@ -94,8 +94,8 @@ resource "ibm_scc_instance_settings" "scc_instance_settings" {
instance_id = resource.ibm_resource_instance.scc_instance[0].guid
event_notifications {
instance_crn = var.en_instance_crn
- source_name = var.en_source_name
- source_description = var.en_source_description
+ source_name = var.en_instance_crn != null ? var.en_source_name : null # only pass source name if value being passed for 'en_instance_crn'
+ source_description = var.en_instance_crn != null ? var.en_source_description : null # only pass source description if value being passed for 'en_instance_crn'
}
object_storage {
instance_crn = var.cos_instance_crn
diff --git a/variables.tf b/variables.tf
index 02b6732..4c7e0e4 100644
--- a/variables.tf
+++ b/variables.tf
@@ -87,8 +87,8 @@ variable "en_instance_crn" {
variable "en_source_name" {
type = string
- default = null
- description = "The source name to use for the Event Notifications integration. Required if a value is passed for `en_instance_crn`."
+ default = "compliance"
+ description = "The source name to use for the Event Notifications integration. Required if a value is passed for `en_instance_crn`. This name must be unique per SCC instance that is integrated with the Event Notfications instance."
}
variable "en_source_description" {