Open TrimPeachu opened 11 months ago
@TrimPeachu is this resource part of a module?
How is the value of var.k8s-required-configmaps
being set? Is kubernetes_config_map.job-configs
also dependant on that value?
Hi @alexsomesan ,
This resource is not part of a module.
var.k8s-required-configmaps
is defined as so:
variable "k8s-required-configmaps" {
default = [
"test.A",
"test.B"
]
}
And correct, kubernetes_config_map.job-configs
is also depended on var.k8s-required-configmaps
resource "kubernetes_config_map" "job-configs" {
provider = kubernetes
metadata {
name = "job-configs"
}
data = merge(
{ for config in var.k8s-required-configmaps : config => file("${var.jobs_configs_dir}/${config}.json") },
{ for config in local.k8s-optional-configmaps : config => file("${var.jobs_configs_dir}/${config}.json") if fileexists("${var.jobs_configs_dir}/${config}.json") }
)
}
However upon testing, same unwanted result occurs even if I use sth like this:
resource "kubernetes_config_map" "job-configs" {
provider = kubernetes
metadata {
name = "job-configs"
}
data = {
"test1" = "testA"
"test2" = "testB"
"test3" = "testC"
}
}
Hi, is the info I have provided sufficient @alexsomesan or is there something more I can provide so you are able to assist me with this issue?
Thanks :))
Not sure how issues are handled here, but this seems like a duplicate of https://github.com/hashicorp/terraform-provider-kubernetes/issues/1358
Terraform Version, Provider Version and Kubernetes Version
Terraform Configuration Files
Expected Behavior
Show no changes
Actual Behavior
I seem to have an issue that at first seemed similar to the #1835 but if I have understood it correctly, their problem was using service account name.