Skip to content

Commit

Permalink
uncommend
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelmace committed Nov 7, 2023
1 parent 6efc36b commit 697eddf
Showing 1 changed file with 33 additions and 35 deletions.
68 changes: 33 additions & 35 deletions terraform/cbr/account-cbr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
Expand Down

0 comments on commit 697eddf

Please sign in to comment.