Skip to content

Commit

Permalink
Adding secrets file path as variable
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosrodlop committed May 21, 2024
1 parent 4c5784b commit 9be23c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions blueprints/02-at-scale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Once you have familiarized yourself with [CloudBees CI blueprint add-on: Get sta
|------|-------------|------|---------|:--------:|
| hosted_zone | Amazon Route 53 hosted zone. CloudBees CI applications are configured to use subdomains in this hosted zone. | `string` | n/a | yes |
| trial_license | CloudBees CI trial license details for evaluation. | `map(string)` | n/a | yes |
| secret_file | Relative location of the Secret file to be converted into a Kubernetes Secret. secrets-values.yml is not stored in the repository but it is generated as copy from secrets-values.yml.example. | `string` | `"k8s/secrets-values.yml"` | no |
| suffix | Unique suffix to assign to all resources. When adding the suffix, changes are required in CloudBees CI for the validation phase. | `string` | `""` | no |
| tags | Tags to apply to resources. | `map(string)` | `{}` | no |

Expand Down
4 changes: 1 addition & 3 deletions blueprints/02-at-scale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ module "eks_blueprints_addon_cbci" {
}

create_k8s_secrets = true
# k8s/secrets-values.yml is not included in the repository
# tflint-ignore: all
k8s_secrets = templatefile("k8s/secrets-values.yml", { # tflint-ignore: all
k8s_secrets = templatefile(var.secret_file, {
global_password = local.global_password
})

Expand Down
6 changes: 6 additions & 0 deletions blueprints/02-at-scale/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ variable "suffix" {
error_message = "The suffix can contain 10 characters or less."
}
}

variable "secret_file" {
description = "Relative location of the Secret file to be converted into a Kubernetes Secret. secrets-values.yml is not stored in the repository but it is generated as copy from secrets-values.yml.example."
default = "k8s/secrets-values.yml"
type = string
}

0 comments on commit 9be23c7

Please sign in to comment.