-
Notifications
You must be signed in to change notification settings - Fork 959
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
ignore_changes not working in kubernetes_manifest #2410
Comments
Hi @thecosmicfrog – terraform's ignore_changes feature doesn't work with fields nested within the |
Hi @jrhouston. Thanks for your response. I have experimented with several New Terraform config and output: Terraform configurationresource "kubernetes_manifest" "argocd_application" {
for_each = local.applications
# Trying multiple fields.
computed_fields = [
"object.metadata",
"object.operation",
"object.spec",
"metadata",
"operation",
"spec"
]
<removed lifecycle.ignore_changes block>
[...rest of resource as in original question...]
}
|
This issue is related to #2375, the |
@BBBmau Interesting, thanks for sharing! I've subscribed to the mentioned issue. Are there any suggested paths forward at this time? |
@thecosmicfrog unfortunately as of right now there is no workaround since this is by design to prevent any potential crashes from occurring since A redesign is in discussion and will be worked on to address this issue. Just a matter of patience! |
Thanks @BBBmau. Will this redesign be a feature of |
@thecosmicfrog it will be a feature implemented into the |
Great, thanks @BBBmau! |
Terraform version, Kubernetes provider version and Kubernetes version
Terraform configuration
Question
Hi all. I am using the
kubernetes_manifest
resource in order to install Argo CDApplication
objects (spec is defined here).Initial object creation works without issue, and subsequent runs of
terraform apply
show no changes (as I would expect).However, if the input value of
manifest.spec.source.helm.valuesObject
changes (say, the value offoo
changes frombar
tobar123
), the subsequent run ofterraform apply
says that the entirekubernetes_manifest
resource must be replaced, alongside a massive number of added and changed fields:I understand that objects created by Terraform can change outside of its control, and it appears that Argo CD's controllers are doing that in this case, by creating default values for optional fields. As such, I added a few
lifecycle.ignore_changes
entries to instruct Terraform to disregard these:However, this appears to have made no difference, as a
terraform apply
still gives me the same "must be replaced" output with all the same fields.I feel like I may be missing something here, so I'm asking for assistance at this stage. Thanks! 🙂
The text was updated successfully, but these errors were encountered: