Skip to content

Commit ddd568a

Browse files
authored
fix: updated the default value for "prefix" input and removed apikey from terraform_data input structure (#829)
1 parent 6b72097 commit ddd568a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Optionally, the module supports advanced security group management for the worke
2020
- Ensure that you have an up-to-date version of the [IBM Cloud VPC Infrastructure service CLI](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-reference). Only required if providing additional security groups with the `var.additional_lb_security_group_ids`.
2121
- Ensure that you have an up-to-date version of the [jq](https://jqlang.github.io/jq)
2222
- Ensure that you have an up-to-date version of the [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
23+
2324
<!-- Below content is automatically populated via pre-commit hook -->
2425
<!-- BEGIN OVERVIEW HOOK -->
2526
## Overview

ibm_catalog.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
},
247247
{
248248
"key": "prefix",
249+
"default_value": "dev",
249250
"random_string": {
250251
"length": 4
251252
},

solutions/fully-configurable/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,22 @@ resource "terraform_data" "delete_secrets" {
253253
count = var.enable_secrets_manager_integration && var.secrets_manager_secret_group_id == null ? 1 : 0
254254
input = {
255255
secret_id = module.secret_group[0].secret_group_id
256-
api_key = var.ibmcloud_api_key
257256
provider_visibility = var.provider_visibility
258257
secrets_manager_instance_id = module.existing_secrets_manager_instance_parser[0].service_instance
259258
secrets_manager_region = module.existing_secrets_manager_instance_parser[0].region
260259
secrets_manager_endpoint = var.secrets_manager_endpoint_type
261260
}
261+
# api key in triggers_replace to avoid it to be printed out in clear text in terraform_data output
262+
triggers_replace = {
263+
api_key = var.ibmcloud_api_key
264+
}
262265
provisioner "local-exec" {
263266
when = destroy
264267
command = "${path.module}/scripts/delete_secrets.sh ${self.input.secret_id} ${self.input.provider_visibility} ${self.input.secrets_manager_instance_id} ${self.input.secrets_manager_region} ${self.input.secrets_manager_endpoint}"
265268
interpreter = ["/bin/bash", "-c"]
266269

267270
environment = {
268-
API_KEY = self.input.api_key
271+
API_KEY = self.triggers_replace.api_key
269272
}
270273
}
271274
}

0 commit comments

Comments
 (0)