Skip to content

Commit 5a2e79e

Browse files
Vipin KumarVipin Kumar
authored andcommitted
addressed review comments
1 parent 0d9e036 commit 5a2e79e

File tree

7 files changed

+13
-33
lines changed

7 files changed

+13
-33
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ Optionally, you need the following permissions to attach Access Management tags
305305
| <a name="input_existing_secrets_manager_instance_crn"></a> [existing\_secrets\_manager\_instance\_crn](#input\_existing\_secrets\_manager\_instance\_crn) | CRN of secrets manager instance where ingress certificate secrets will be stored. | `string` | `null` | no |
306306
| <a name="input_force_delete_storage"></a> [force\_delete\_storage](#input\_force\_delete\_storage) | Flag indicating whether or not to delete attached storage when destroying the cluster - Default: false | `bool` | `false` | no |
307307
| <a name="input_ignore_worker_pool_size_changes"></a> [ignore\_worker\_pool\_size\_changes](#input\_ignore\_worker\_pool\_size\_changes) | Enable if using worker autoscaling. Stops Terraform managing worker count | `bool` | `false` | no |
308-
| <a name="input_is_default_secrets_manager_instance"></a> [is\_default\_secrets\_manager\_instance](#input\_is\_default\_secrets\_manager\_instance) | Whether the secrets manager instance provided will be default for storing ingress certificates. | `bool` | `true` | no |
309308
| <a name="input_kms_config"></a> [kms\_config](#input\_kms\_config) | Use to attach a KMS instance to the cluster. If account\_id is not provided, defaults to the account in use. | <pre>object({<br/> crk_id = string<br/> instance_id = string<br/> private_endpoint = optional(bool, true) # defaults to true<br/> account_id = optional(string) # To attach KMS instance from another account<br/> wait_for_apply = optional(bool, true) # defaults to true so terraform will wait until the KMS is applied to the master, ready and deployed<br/> })</pre> | `null` | no |
310309
| <a name="input_manage_all_addons"></a> [manage\_all\_addons](#input\_manage\_all\_addons) | Instructs Terraform to manage all cluster addons, even if addons were installed outside of the module. If set to 'true' this module will destroy any addons that were installed by other sources. | `bool` | `false` | no |
311310
| <a name="input_number_of_lbs"></a> [number\_of\_lbs](#input\_number\_of\_lbs) | The number of LBs to associated the `additional_lb_security_group_names` security group with. | `number` | `1` | no |
@@ -314,7 +313,7 @@ Optionally, you need the following permissions to attach Access Management tags
314313
| <a name="input_pod_subnet_cidr"></a> [pod\_subnet\_cidr](#input\_pod\_subnet\_cidr) | Specify a custom subnet CIDR to provide private IP addresses for pods. The subnet must have a CIDR of at least `/23` or larger. Default value is `172.30.0.0/16` when the variable is set to `null`. | `string` | `null` | no |
315314
| <a name="input_region"></a> [region](#input\_region) | The IBM Cloud region where the cluster will be provisioned. | `string` | n/a | yes |
316315
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The Id of an existing IBM Cloud resource group where the cluster will be grouped. | `string` | n/a | yes |
317-
| <a name="input_secrets_manager_secret_group_id"></a> [secrets\_manager\_secret\_group\_id](#input\_secrets\_manager\_secret\_group\_id) | Secret group id where ingress secrets will be kept in the secrets manager instance. If not specified, default group will be used. | `string` | `""` | no |
316+
| <a name="input_secrets_manager_secret_group_id"></a> [secrets\_manager\_secret\_group\_id](#input\_secrets\_manager\_secret\_group\_id) | Secret group id where ingress secrets will be kept in the secrets manager instance. If not specified, default group will be used. | `string` | `null` | no |
318317
| <a name="input_service_subnet_cidr"></a> [service\_subnet\_cidr](#input\_service\_subnet\_cidr) | Specify a custom subnet CIDR to provide private IP addresses for services. The subnet must be at least `/24` or larger. Default value is `172.21.0.0/16` when the variable is set to `null`. | `string` | `null` | no |
319318
| <a name="input_tags"></a> [tags](#input\_tags) | Metadata labels describing this cluster deployment, i.e. test | `list(string)` | `[]` | no |
320319
| <a name="input_use_existing_cos"></a> [use\_existing\_cos](#input\_use\_existing\_cos) | Flag indicating whether or not to use an existing COS instance for OpenShift internal registry storage. Only applicable if 'enable\_registry\_storage' is true | `bool` | `false` | no |

ibm_catalog.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,6 @@
391391
},
392392
{
393393
"key": "secrets_manager_secret_group_id"
394-
},
395-
{
396-
"key": "is_default_secrets_manager_instance"
397394
}
398395
],
399396
"dependencies": [

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,6 @@ resource "ibm_container_ingress_instance" "instance" {
753753
depends_on = [ibm_container_vpc_cluster.cluster, ibm_container_vpc_cluster.autoscaling_cluster, ibm_container_vpc_worker_pool.pool, ibm_container_vpc_worker_pool.autoscaling_pool]
754754
cluster = var.cluster_name
755755
instance_crn = var.existing_secrets_manager_instance_crn
756-
is_default = var.is_default_secrets_manager_instance
756+
is_default = true
757757
secret_group_id = var.secrets_manager_secret_group_id
758758
}

solutions/fully-configurable/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ The following resources are provisioned by this example:
8383
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The IBM Cloud api key. | `string` | n/a | yes |
8484
| <a name="input_ibmcloud_kms_api_key"></a> [ibmcloud\_kms\_api\_key](#input\_ibmcloud\_kms\_api\_key) | The IBM Cloud API key that can create a root key and key ring in the key management service (KMS) instance for the cluster. If not specified, the 'ibmcloud\_api\_key' variable is used. Specify this key if the KMS instance in `existing_kms_instance_crn` is in an account that is different from the cluster's account. Leave this input empty if both the cluster and the KMS instance are in the same account. | `string` | `null` | no |
8585
| <a name="input_ignore_worker_pool_size_changes"></a> [ignore\_worker\_pool\_size\_changes](#input\_ignore\_worker\_pool\_size\_changes) | Enable if using worker autoscaling. Stops Terraform managing worker count. | `bool` | `false` | no |
86-
| <a name="input_is_default_secrets_manager_instance"></a> [is\_default\_secrets\_manager\_instance](#input\_is\_default\_secrets\_manager\_instance) | Whether the secrets manager instance provided will be default for storing ingress certificates. | `bool` | `true` | no |
8786
| <a name="input_kms_encryption_enabled_boot_volume"></a> [kms\_encryption\_enabled\_boot\_volume](#input\_kms\_encryption\_enabled\_boot\_volume) | Set this to true to control the encryption keys used to encrypt the data that for the block storage volumes for VPC. If set to false, the data is encrypted by using randomly generated keys. For more info on encrypting block storage volumes, see https://cloud.ibm.com/docs/vpc?topic=vpc-creating-instances-byok | `bool` | `false` | no |
8887
| <a name="input_kms_encryption_enabled_cluster"></a> [kms\_encryption\_enabled\_cluster](#input\_kms\_encryption\_enabled\_cluster) | Set to true to enable KMS encryption for the cluster's Object Storage bucket. When set to true, a value must be passed for either `existing_cluster_kms_key_crn` or `existing_kms_instance_crn`. | `bool` | `false` | no |
8988
| <a name="input_kms_endpoint_type"></a> [kms\_endpoint\_type](#input\_kms\_endpoint\_type) | The endpoint for communicating with the KMS instance. Possible values: `public`, `private`. Applies only if `kms_encryption_enabled_cluster` is true | `string` | `"private"` | no |
@@ -94,7 +93,7 @@ The following resources are provisioned by this example:
9493
| <a name="input_pod_subnet_cidr"></a> [pod\_subnet\_cidr](#input\_pod\_subnet\_cidr) | Specify a custom subnet CIDR to provide private IP addresses for pods. The subnet must have a CIDR of at least `/23` or larger. Default value is `172.30.0.0/16` when the variable is set to `null`. | `string` | `null` | no |
9594
| <a name="input_prefix"></a> [prefix](#input\_prefix) | The prefix to add to all resources that this solution creates (e.g `prod`, `test`, `dev`). To not use any prefix value, you can set this value to `null` or an empty string. | `string` | n/a | yes |
9695
| <a name="input_provider_visibility"></a> [provider\_visibility](#input\_provider\_visibility) | Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints). | `string` | `"private"` | no |
97-
| <a name="input_secrets_manager_secret_group_id"></a> [secrets\_manager\_secret\_group\_id](#input\_secrets\_manager\_secret\_group\_id) | Secret group id where ingress secrets will be kept in the secrets manager instance. If not specified, default group will be used. | `string` | `""` | no |
96+
| <a name="input_secrets_manager_secret_group_id"></a> [secrets\_manager\_secret\_group\_id](#input\_secrets\_manager\_secret\_group\_id) | Secret group id where ingress secrets will be kept in the secrets manager instance. If not specified, default group will be used. | `string` | `null` | no |
9897
| <a name="input_service_subnet_cidr"></a> [service\_subnet\_cidr](#input\_service\_subnet\_cidr) | Specify a custom subnet CIDR to provide private IP addresses for services. The subnet must be at least `/24` or larger. Default value is `172.21.0.0/16` when the variable is set to `null`. | `string` | `null` | no |
9998
| <a name="input_use_private_endpoint"></a> [use\_private\_endpoint](#input\_use\_private\_endpoint) | Set this to true to force all api calls to use the IBM Cloud private endpoints. | `bool` | `true` | no |
10099
| <a name="input_verify_worker_network_readiness"></a> [verify\_worker\_network\_readiness](#input\_verify\_worker\_network\_readiness) | By setting this to true, a script will run kubectl commands to verify that all worker nodes can communicate successfully with the master. If the runtime does not have access to the kube cluster to run kubectl commands, this should be set to false. | `bool` | `true` | no |

solutions/fully-configurable/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,4 @@ module "ocp_base" {
233233
enable_secrets_manager_for_ingress = var.enable_secrets_manager_for_ingress
234234
existing_secrets_manager_instance_crn = var.existing_secrets_manager_instance_crn
235235
secrets_manager_secret_group_id = var.secrets_manager_secret_group_id
236-
is_default_secrets_manager_instance = var.is_default_secrets_manager_instance
237236
}

solutions/fully-configurable/variables.tf

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,10 @@ variable "enable_secrets_manager_for_ingress" {
486486
description = "Whether to enable secrets manager for storing ingress certificate."
487487
default = false
488488
validation {
489-
condition = !var.enable_secrets_manager_for_ingress || var.existing_secrets_manager_instance_crn != null
489+
condition = anytrue([
490+
!var.enable_secrets_manager_for_ingress,
491+
var.existing_secrets_manager_instance_crn != null
492+
])
490493
error_message = "'existing_secrets_manager_instance_crn' should be provided if setting 'enable_secrets_manager_for_ingress' to true."
491494
}
492495
}
@@ -500,15 +503,5 @@ variable "existing_secrets_manager_instance_crn" {
500503
variable "secrets_manager_secret_group_id" {
501504
type = string
502505
description = "Secret group id where ingress secrets will be kept in the secrets manager instance. If not specified, default group will be used."
503-
default = ""
504-
}
505-
506-
variable "is_default_secrets_manager_instance" {
507-
type = bool
508-
description = "Whether the secrets manager instance provided will be default for storing ingress certificates."
509-
default = true
510-
validation {
511-
condition = var.is_default_secrets_manager_instance || var.secrets_manager_secret_group_id == null
512-
error_message = "Secret groups are only supported for default Secrets Manager instances. Either set 'is_default_secrets_manager_instance' to true or do not provide a value for 'secrets_manager_secret_group_id'."
513-
}
506+
default = null
514507
}

variables.tf

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,10 @@ variable "enable_secrets_manager_for_ingress" {
410410
description = "Whether to enable secrets manager for storing ingress certificate."
411411
default = false
412412
validation {
413-
condition = !var.enable_secrets_manager_for_ingress || var.existing_secrets_manager_instance_crn != null
413+
condition = anytrue([
414+
!var.enable_secrets_manager_for_ingress,
415+
var.existing_secrets_manager_instance_crn != null
416+
])
414417
error_message = "'existing_secrets_manager_instance_crn' should be provided if setting 'enable_secrets_manager_for_ingress' to true."
415418
}
416419
}
@@ -424,15 +427,5 @@ variable "existing_secrets_manager_instance_crn" {
424427
variable "secrets_manager_secret_group_id" {
425428
type = string
426429
description = "Secret group id where ingress secrets will be kept in the secrets manager instance. If not specified, default group will be used."
427-
default = ""
428-
}
429-
430-
variable "is_default_secrets_manager_instance" {
431-
type = bool
432-
description = "Whether the secrets manager instance provided will be default for storing ingress certificates."
433-
default = true
434-
validation {
435-
condition = var.is_default_secrets_manager_instance || var.secrets_manager_secret_group_id == null
436-
error_message = "Secret groups are only supported for default Secrets Manager instances. Either set 'is_default_secrets_manager_instance' to true or do not provide a value for 'secrets_manager_secret_group_id'."
437-
}
430+
default = null
438431
}

0 commit comments

Comments
 (0)