-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubernetes_deployment diff always tries to add volume_mount #1256
Comments
This is really similar to an issue that was fixed a little while ago for the default service account: #1096. But it looks like problem still exists for non-default service accounts. I think this PR will fix it #1235, since the value of |
@tyen-brex I notice you have In any case, this diff here is arising because we're doing a simple regex on volume mount names to strip out service account tokens so they don't cause a diff when they've been auto-mounted. See here: https://github.com/hashicorp/terraform-provider-kubernetes/blob/main/kubernetes/structures_pod.go#L46 We would need to update this code to check if the volume is actually defined in the config or not. If you need this to be explicit in your config then the workaround for the moment would be to change the name so it doesn't match the regex for the default naming convention. |
@jrhouston Good point about having the volume defined explicitly. Will try moving the explicit volume, thanks |
Going to close this – please reopen if this is still an issue for you. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Our terraform config has a
kubernetes_service_account
that's used in akubernetes_deployment
. The terraform plan perpetually shows a diff to mount a volume and volume_mountTerraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Steps to Reproduce
Expected Behavior
Actual Behavior
Terraform apply perpetually wants to add a volume and volume mounts for the serviceaccount token
Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: