Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d460955

Browse files
authored
fix: give en_source_name a default value of "compliance" (#201)
1 parent d0f25ba commit d460955

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.secrets.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2023-12-11T06:40:44Z",
6+
"generated_at": "2023-12-12T06:40:44Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ You need the following permissions to run this module.
102102
| <a name="input_cos_instance_crn"></a> [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 |
103103
| <a name="input_en_instance_crn"></a> [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 |
104104
| <a name="input_en_source_description"></a> [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 |
105-
| <a name="input_en_source_name"></a> [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 |
105+
| <a name="input_en_source_name"></a> [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 |
106106
| <a name="input_existing_scc_instance_crn"></a> [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 |
107107
| <a name="input_instance_name"></a> [instance\_name](#input\_instance\_name) | Name of the security and compliance instance that will be provisioned by this module | `string` | n/a | yes |
108108
| <a name="input_plan"></a> [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 |

examples/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module "create_scc_instance" {
6868
cos_bucket = var.existing_scc_instance_crn == null ? module.cos[0].bucket_name : null
6969
cos_instance_crn = var.existing_scc_instance_crn == null ? module.cos[0].cos_instance_id : null
7070
en_instance_crn = module.event_notification.crn
71-
en_source_name = module.event_notification.event_notification_instance_name
71+
en_source_name = "${var.prefix}-en-integration" # This name must be unique per SCC instance that is integrated with the Event Notfications instance.
7272
skip_cos_iam_authorization_policy = false
7373
attach_wp_to_scc_instance = true
7474
skip_scc_wp_auth_policy = false

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ resource "ibm_scc_instance_settings" "scc_instance_settings" {
9494
instance_id = resource.ibm_resource_instance.scc_instance[0].guid
9595
event_notifications {
9696
instance_crn = var.en_instance_crn
97-
source_name = var.en_source_name
98-
source_description = var.en_source_description
97+
source_name = var.en_instance_crn != null ? var.en_source_name : null # only pass source name if value being passed for 'en_instance_crn'
98+
source_description = var.en_instance_crn != null ? var.en_source_description : null # only pass source description if value being passed for 'en_instance_crn'
9999
}
100100
object_storage {
101101
instance_crn = var.cos_instance_crn

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ variable "en_instance_crn" {
8787

8888
variable "en_source_name" {
8989
type = string
90-
default = null
91-
description = "The source name to use for the Event Notifications integration. Required if a value is passed for `en_instance_crn`."
90+
default = "compliance"
91+
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."
9292
}
9393

9494
variable "en_source_description" {

0 commit comments

Comments
 (0)