From 697eddfba70b19f4cc48665249bcb00cab7aebf6 Mon Sep 17 00:00:00 2001 From: Lionel Mace Date: Tue, 7 Nov 2023 17:03:10 +0100 Subject: [PATCH] uncommend --- terraform/cbr/account-cbr.tf | 68 +++++++++++++++++------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/terraform/cbr/account-cbr.tf b/terraform/cbr/account-cbr.tf index a3e403d..482041b 100644 --- a/terraform/cbr/account-cbr.tf +++ b/terraform/cbr/account-cbr.tf @@ -2,15 +2,14 @@ # Resources ############################################################################## -# Demo - Uncomment after -# resource "ibm_cbr_zone" "zone_vpc" { -# name = "${local.basename}-zone-vpc" -# account_id = local.account_id -# addresses { -# type = "vpc" -# value = ibm_is_vpc.vpc.crn -# } -# } +resource "ibm_cbr_zone" "zone_vpc" { + name = "${local.basename}-zone-vpc" + account_id = local.account_id + addresses { + type = "vpc" + value = ibm_is_vpc.vpc.crn + } +} resource "ibm_cbr_zone" "zone_home" { name = "${local.basename}-zone-home" @@ -32,32 +31,31 @@ resource "ibm_cbr_zone" "cbr_zone_pgw" { } } -# Demo - Uncomment after -# resource "ibm_cbr_rule" "cbr_rule_cos" { -# description = format("%s-%s", local.basename, "rule-cos") -# enforcement_mode = "report" -# contexts { -# attributes { -# name = "networkZoneId" -# value = ibm_cbr_zone.zone_vpc.id -# } -# } -# resources { -# attributes { -# name = "accountId" -# value = data.ibm_iam_account_settings.account_settings.account_id -# } -# attributes { -# name = "serviceName" -# value = "cloud-object-storage" -# } -# attributes { -# name = "serviceInstance" -# operator = "stringEquals" -# value = ibm_resource_instance.cos.guid -# } -# } -# } +resource "ibm_cbr_rule" "cbr_rule_cos" { + description = format("%s-%s", local.basename, "rule-cos") + enforcement_mode = "report" + contexts { + attributes { + name = "networkZoneId" + value = ibm_cbr_zone.zone_vpc.id + } + } + resources { + attributes { + name = "accountId" + value = data.ibm_iam_account_settings.account_settings.account_id + } + attributes { + name = "serviceName" + value = "cloud-object-storage" + } + attributes { + name = "serviceInstance" + operator = "stringEquals" + value = ibm_resource_instance.cos.guid + } + } +} resource "ibm_cbr_rule" "cbr_rule" { description = format("%s-%s", local.basename, "rule")