You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ArgoCD controller sees the notifications.argoproj.io/subscribe... annotation, sends a message, and adds the notified.notifications.argoproj.io annotation in return to mark the notification state of the application.
Terraform ignores the notified.notifications.argoproj.io annotation both after the current apply and in future plans.
Actual Behavior
Terraform applies the manifest.
The ArgoCD controller sees the notifications.argoproj.io/subscribe... annotation, sends a message, and adds the notified.notifications.argoproj.io annotation in return to mark the notification state of the application.
Terraform errors out with
Error: Provider produced inconsistent result after apply
When applying changes to kubernetes_manifest.argo_application_crd, provider
"provider[\"registry.terraform.io/hashicorp/kubernetes\"]" produced an
unexpected new value: .object.metadata.annotations: new element
"notified.notifications.argoproj.io" has appeared.
This is a bug in the provider, which should be reported in the provider's own issue tracker.
On retry, terraform attempts to remove the annotation, and after apply returns the same error because the controller has added the notification back.
Important Factoids
We need to manage some annotations on the resource to manage the ArgoCD controller behaviour w.r.t the application resource, so we cannot use metadata.annotations in computed_fields.
Everything else works as expected if we leave the notifications.argoproj.io/subscribe out, because then ArgoCD will not immediately modify the application.
I tested variations of the ingore_annotations entry such as "notified\\.notifications\\.argoproj\\.io" and ".*argoproj\\.io.*" with no difference in results.
PS: I'm currently partly working around the issue by keeping metadata.annotations in computed_fields, and then managing the annotations "out of band" with
This however is just a hack - it requires a separate field manager string (otherwise the kubernetes_annotations will attempt to clobber the application spec fields), and means I cannot reliably use the wait field of the kubernetes_manifest resource because not all the annotations may be correct at the time.
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
kubernetes_manifest
Terraform Configuration Files
Steps to Reproduce
terraform apply
Expected Behavior
notifications.argoproj.io/subscribe...
annotation, sends a message, and adds thenotified.notifications.argoproj.io
annotation in return to mark the notification state of the application.notified.notifications.argoproj.io
annotation both after the current apply and in future plans.Actual Behavior
notifications.argoproj.io/subscribe...
annotation, sends a message, and adds thenotified.notifications.argoproj.io
annotation in return to mark the notification state of the application.On retry, terraform attempts to remove the annotation, and after apply returns the same error because the controller has added the notification back.
Important Factoids
metadata.annotations
incomputed_fields
.notifications.argoproj.io/subscribe
out, because then ArgoCD will not immediately modify the application.ingore_annotations
entry such as"notified\\.notifications\\.argoproj\\.io"
and".*argoproj\\.io.*"
with no difference in results.References
https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#ignore-kubernetes-annotations-and-labels
Community Note
The text was updated successfully, but these errors were encountered: