sl1pm4t / k2tf

Kubernetes YAML to Terraform HCL converter
Mozilla Public License 2.0
1.17k stars 108 forks source link

kubernetes_{daemonset,deployment}: set automount_service_account_token to true #78

Closed flokli closed 2 years ago

flokli commented 3 years ago

Contrary to the kubernetes defaults, the kubernetes terraform provider hardcodes automount_service_account_token to false:

https://github.com/hashicorp/terraform-provider-kubernetes/issues/38

However, this leads to non-working resources being created, as they rely on that defaulting to true.

k2tf should add

automount_service_account_token = true
meroupatate commented 3 years ago

thank you @flokli i spent two days trying to figure out what was wrong with my deployment and my daemonset 😭

flokli commented 3 years ago

@meroupatate sorry to hear. If there really needs to be this deviation from the defaults, it should really be documented loudly…

flokli commented 3 years ago

It seems terraform-provider-kubernetes pedalled back, and switched over to use the k8s defaults again: https://github.com/hashicorp/terraform-provider-kubernetes/pull/1054

sl1pm4t commented 2 years ago

I think this is resolved upstream (as pointed out above by @flokli ), so going to close this.