diff --git a/ibm_catalog.json b/ibm_catalog.json index c643551d..d814f496 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -64,7 +64,7 @@ "authority": "scc-v3", "profiles": [ { - "profile_name": "AI ICT Guardrails", + "profile_name": "AI Security Guardrails 2.0", "profile_version": "1.0.0" } ] @@ -255,6 +255,13 @@ "description": "The name of an existing resource group that is used by this solution. Prefix is NOT used for existing resource group. All resources created by this solution are deployed in this resource group. ", "required": false }, + { + "key": "existing_scc_instance_crn", + "type": "string", + "default_value": "__NULL__", + "description": "The CRN of an existing Security and Compliance Center instance. If not supplied, a new instance will be created.", + "required": false + }, { "key": "watsonx_admin_api_key", "type": "password", diff --git a/solutions/basic/stack_definition.json b/solutions/basic/stack_definition.json index d5303aff..edc85616 100644 --- a/solutions/basic/stack_definition.json +++ b/solutions/basic/stack_definition.json @@ -75,6 +75,13 @@ "hidden": false, "default": null }, + { + "name": "existing_scc_instance_crn", + "required": false, + "type": "string", + "hidden": false, + "default": null + }, { "name": "enable_platform_logs_metrics", "required": false, @@ -375,6 +382,14 @@ "name": "scc_region", "value": "ref:../../inputs/region" }, + { + "name": "profile_attachments", + "value": ["AI Security Guardrails 2.0"] + }, + { + "name": "existing_scc_instance_crn", + "value": "ref:../../inputs/existing_scc_instance_crn" + }, { "name": "resource_group_name", "value": "ref:../Account Infrastructure Base/outputs/audit_resource_group_name" diff --git a/tests/pr_test.go b/tests/pr_test.go index 42eb3aa9..9d77010b 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -132,6 +132,7 @@ func TestProjectsBasicExistingResourcesTest(t *testing.T) { "signing_key": privateKey, "existing_kms_instance_crn": terraform.Output(t, existingTerraformOptions, "kms_instance_crn"), "existing_en_instance_crn": terraform.Output(t, existingTerraformOptions, "event_notification_instance_crn"), + "existing_scc_instance_crn": terraform.Output(t, existingTerraformOptions, "existing_scc_instance_crn"), "en_email_list": []string{"GoldenEye.Operations@ibm.com"}, } diff --git a/tests/resources/main.tf b/tests/resources/main.tf index eacf0498..e5c01b02 100644 --- a/tests/resources/main.tf +++ b/tests/resources/main.tf @@ -39,6 +39,40 @@ module "secrets_manager" { sm_tags = var.resource_tags } +############################################################################# +# Provision cloud object storage and bucket +############################################################################# + +module "cos" { + source = "terraform-ibm-modules/cos/ibm" + version = "8.10.1" + resource_group_id = module.resource_group.resource_group_id + region = var.region + cross_region_location = null + cos_instance_name = "${var.prefix}-vpc-logs-cos" + cos_tags = var.resource_tags + bucket_name = "${var.prefix}-vpc-logs-cos-bucket" + kms_encryption_enabled = false + retention_enabled = false +} + +############################################################################## +# SCC +############################################################################## + +module "create_scc_instance" { + source = "terraform-ibm-modules/scc/ibm" + version = "1.7.2" + instance_name = "${var.prefix}-scc-instance" + region = var.region + resource_group_id = module.resource_group.resource_group_id + resource_tags = var.resource_tags + access_tags = [] + cos_bucket = module.cos.bucket_name + cos_instance_crn = module.cos.cos_instance_id + attach_wp_to_scc_instance = false + skip_cos_iam_authorization_policy = false + ############################################################################## # Key Protect All Inclusive ############################################################################## diff --git a/tests/resources/outputs.tf b/tests/resources/outputs.tf index 7e7a5229..86ff107f 100644 --- a/tests/resources/outputs.tf +++ b/tests/resources/outputs.tf @@ -28,6 +28,11 @@ output "secrets_manager_instance_crn" { description = "CRN of created secret manager instance" } +output "existing_scc_instance_crn" { + value = module.scc_instance.crn + description = "CRN of created scc instance" +} + output "kms_instance_crn" { value = module.key_protect_all_inclusive.key_protect_crn description = "CRN of created kms instance"