Skip to content

Commit 69ef912

Browse files
committed
Set user_kustomization pre- and post-commands as sensitive
1 parent 046df3d commit 69ef912

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# 2.18.3 -> 2.19.0
44

5-
## Extra_kustomization
5+
## User Kustomization
66
The extra_kustomization-feature has been moved to a module so that multiple extra_kustomizations can be run in sequential steps.
77
A new variable `user_kustomizations` is now in use, which contains the previous extra_kustomize_* vars.
88

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ In `kube.tf`, specify the folders in `user_kustomizations`.
444444
kustomize_parameters = {
445445
eso_access_username = "..."
446446
eso_access_password = "..."
447-
}
447+
}
448448
},
449449
...
450450
}

docs/llms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ Locked and loaded! Let's continue the detailed exploration.
22252225
```
22262226

22272227
* **`user_kustomizations` (Map of Objects, Optional):**
2228-
* **Purpose:** Allows you to specify Kustomization sets that are run sequantially, with each set containing its own source_folder, pre_commands, post_commands and kustomize_parameters
2228+
* **Purpose:** Allows you to specify Kustomization sets that are run sequentially, with each set containing its own source_folder, pre_commands, post_commands and kustomize_parameters
22292229
* **Use Cases:**
22302230
* Some applications deployed via Helm or Kustomize install CustomResourceDefinitions (CRDs) first, and then CustomResources (CRs) that depend on those CRDs. There can be a race condition if the CRs are applied before the CRDs are fully registered. You could add a command here to wait for CRDs to become available (e.g., `kubectl wait --for condition=established crd/mycrd.example.com --timeout=120s`).
22312231
* The `user_kustomizations`-map allows you to define steps of install where e.g. the first step installs CRDs, checks for their proper existence and then second step that install further CRs.

kustomization_user.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ locals {
1212

1313
processed_kustomizes = {
1414
for key, config in local.user_kustomize_defaulted : key => merge(config, {
15-
# kustomize_parameters may contain secrets
16-
kustomize_parameters = sensitive(config.kustomize_parameters)
15+
# kustomize_parameters, pre_commands, and post_commands may contain secrets
16+
kustomize_parameters = sensitive(config.kustomize_parameters),
17+
pre_commands = sensitive(config.pre_commands),
18+
post_commands = sensitive(config.post_commands)
1719
})
1820
}
1921
}

modules/user_kustomization_set/variables.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ variable "template_parameters" {
3535
}
3636

3737
variable "pre_commands_string" {
38-
type = string
39-
default = ""
38+
type = string
39+
default = ""
40+
sensitive = true
4041
}
4142

4243
variable "post_commands_string" {
43-
type = string
44-
default = ""
44+
type = string
45+
default = ""
46+
sensitive = true
4547
}

modules/user_kustomizations/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ variable "kustomizations_map" {
2323
}))
2424
default = {}
2525
description = "Map of kustomization entries, where key is the order number."
26+
sensitive = true
2627
validation {
2728
condition = alltrue([
2829
for key in keys(var.kustomizations_map) :

0 commit comments

Comments
 (0)