This repository was archived by the owner on Aug 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ locals {
4545 vpc_subnets = ! var. exists ? var. vpc_subnets : []
4646 security_group_id = ! var. exists ? data. ibm_is_vpc . vpc [0 ]. default_security_group : " "
4747 ipv4_cidr_blocks = ! var. exists ? data. ibm_is_subnet . vpc_subnet [* ]. ipv4_cidr_block : []
48- kms_enabled = var. kms_key_id != " "
49- kms_config = local. kms_enabled ? [{
48+ kms_config = var. kms_enabled ? [{
5049 instance_id = var.kms_id
5150 crk_id = var.kms_key_id
5251 private_endpoint = var.kms_private_endpoint
@@ -127,7 +126,7 @@ data ibm_is_subnet vpc_subnet {
127126}
128127
129128resource "ibm_iam_authorization_policy" "policy" {
130- count = local . kms_enabled && var. authorize_kms ? length (local. policy_targets ) : 0
129+ count = var . kms_enabled && var. authorize_kms ? length (local. policy_targets ) : 0
131130
132131 source_service_name = " containers-kubernetes"
133132 target_service_name = local. policy_targets [count . index ]
Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ variable "cos_id" {
9595 description = " The crn of the COS instance that will be used with the OCP instance"
9696}
9797
98+ variable "kms_enabled" {
99+ type = bool
100+ description = " Flag indicating that kms encryption should be enabled for this cluster"
101+ default = false
102+ }
103+
98104variable "kms_id" {
99105 type = string
100106 description = " The crn of the KMS instance that will be used to encrypt the cluster."
You can’t perform that action at this time.
0 commit comments