File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,13 @@ resource "kubernetes_deployment" "this" {
5050 }
5151 }
5252
53- env_from {
54- secret_ref {
55- name = var. secret_name
56- optional = true
53+ dynamic "env_from" {
54+ for_each = var. secrets
55+
56+ content {
57+ secret_ref {
58+ name = env_from. value
59+ }
5760 }
5861 }
5962 }
Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ variable "replicas" {
5252 default = 1
5353}
5454
55- variable "secret_name " {
56- description = " https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/deployment#name "
57- default = " "
55+ variable "secrets " {
56+ description = " List of secret names from which env_from blocks will be generated "
57+ default = []
5858}
5959
6060variable "config" {
You can’t perform that action at this time.
0 commit comments