Skip to content

Commit 4026d8c

Browse files
Ak-skyvburckhardt
andauthored
feat: added pre-wired rule for IKS -> IS (VPC infrastructure) in fscloud submodule (#306)
Co-authored-by: Vincent Burckhardt <vincent.burckhardt@ie.ibm.com>
1 parent 57f862a commit 4026d8c

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

examples/fscloud/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module "cbr_account_level" {
6969
allow_vpcs_to_container_registry = var.allow_vpcs_to_container_registry
7070
allow_vpcs_to_cos = var.allow_vpcs_to_cos
7171
allow_at_to_cos = var.allow_at_to_cos
72+
allow_iks_to_is = var.allow_iks_to_is
7273

7374
# Demonstrates how zone creation will be skipped for these two service references ["user-management", "iam-groups"]
7475
skip_specific_services_for_zone_creation = ["user-management", "iam-groups"]

examples/fscloud/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,9 @@ variable "allow_at_to_cos" {
6969
description = "Set rule for Activity Tracker to COS, default is true"
7070
default = true
7171
}
72+
73+
variable "allow_iks_to_is" {
74+
type = bool
75+
description = "Set rule for IKS to IS (VPC Infrastructure Services), default is true"
76+
default = true
77+
}

modules/fscloud/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This module creates default coarse-grained CBR rules in a given account followin
88
- VPCs where clusters are deployed -> COS
99
- VPCs -> container registry
1010
- All ICD -> KMS
11+
- IKS -> IS (VPC Infrastructure Services)
1112

1213
This module is designed to allow the consumer to add additional custom rules to open up additional flows necessarity for their usage. See the `custom_rule_contexts_by_service` input variable, and an [usage example](../../examples/fscloud/) demonstrating how to open up more flows.
1314

@@ -50,6 +51,7 @@ The services 'compliance', 'directlink', 'iam-groups', 'containers-kubernetes',
5051
| <a name="input_allow_block_storage_to_kms"></a> [allow\_block\_storage\_to\_kms](#input\_allow\_block\_storage\_to\_kms) | Set rule for block storage to KMS, default is true | `bool` | `true` | no |
5152
| <a name="input_allow_cos_to_kms"></a> [allow\_cos\_to\_kms](#input\_allow\_cos\_to\_kms) | Set rule for COS to KMS, default is true | `bool` | `true` | no |
5253
| <a name="input_allow_icd_to_kms"></a> [allow\_icd\_to\_kms](#input\_allow\_icd\_to\_kms) | Set rule for ICD to KMS, deafult is true | `bool` | `true` | no |
54+
| <a name="input_allow_iks_to_is"></a> [allow\_iks\_to\_is](#input\_allow\_iks\_to\_is) | Set rule for IKS to IS (VPC Infrastructure Services), default is true | `bool` | `true` | no |
5355
| <a name="input_allow_roks_to_kms"></a> [allow\_roks\_to\_kms](#input\_allow\_roks\_to\_kms) | Set rule for ROKS to KMS, default is true | `bool` | `true` | no |
5456
| <a name="input_allow_vpcs_to_container_registry"></a> [allow\_vpcs\_to\_container\_registry](#input\_allow\_vpcs\_to\_container\_registry) | Set rule for VPCs to container registry, default is true | `bool` | `true` | no |
5557
| <a name="input_allow_vpcs_to_cos"></a> [allow\_vpcs\_to\_cos](#input\_allow\_vpcs\_to\_cos) | Set rule for VPCs to COS, default is true | `bool` | `true` | no |

modules/fscloud/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,13 @@ locals {
236236
var.allow_vpcs_to_container_registry ? [local.cbr_zone_vpcs.zone_id] : []
237237
])
238238
}],
239+
# IKS -> IS
240+
"is" : [{
241+
endpointType : "private",
242+
networkZoneIds : flatten([
243+
var.allow_iks_to_is ? [local.containers-kubernetes_cbr_zone_id] : []
244+
])
245+
}],
239246
}
240247

241248
prewired_rule_contexts_by_service_check = { for key, value in local.prewired_rule_contexts_by_service :

modules/fscloud/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ variable "allow_at_to_cos" {
5050
default = true
5151
}
5252

53+
variable "allow_iks_to_is" {
54+
type = bool
55+
description = "Set rule for IKS to IS (VPC Infrastructure Services), default is true"
56+
default = true
57+
}
58+
5359
variable "zone_service_ref_list" {
5460
type = list(string)
5561
validation {

0 commit comments

Comments
 (0)