I have a problem with my setup that is causing a lot of duplicate notifications to get sent when using the Terraform ArgoCD provider.
It seems that the ArgoCD notifications project uses an annotation - notified.notifications.argoproj.io to track whether it has already sent out notifications for a particular app. The annotation is added directly to the app itself, and does not currently appear on any Terraform diffs generated with the ArgoCD provider. When an update is made through the Terraform ArgoCD provider, this annotation seems to get wiped out by the provider, and then recreated by the argocd notification service (with a duplicate sent out). This is causing a lot of duplicate notifications to get sent, and defeats the point of having the notified.notifications.argoproj.io annotation.
It seems that a merge request was accepted a while back to ignore all notified.notifications.argoproj.io annotations within the provider. The reason was to try and stop irrelevant details from always appearing in the terraform diff.
I believe that this is what causes the annotation to get wiped. I think the approach of ignoring the annotation altogether is wrong, and the reporter of that issue could have used a Terraform lifecycle statement if they did not want the ArgoCD notifications annotation to appear in their diff.
Is it possible to preserve this annotation in some way? Even if it does appear in the diff I think it's better to be explicit about these changes in Terraform updates rather than to silently ignore and then change the values. I'm also keen to hear if there are any workarounds that could help.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi there,
I have a problem with my setup that is causing a lot of duplicate notifications to get sent when using the Terraform ArgoCD provider.
It seems that the ArgoCD notifications project uses an annotation -
notified.notifications.argoproj.io
to track whether it has already sent out notifications for a particular app. The annotation is added directly to the app itself, and does not currently appear on any Terraform diffs generated with the ArgoCD provider. When an update is made through the Terraform ArgoCD provider, this annotation seems to get wiped out by the provider, and then recreated by the argocd notification service (with a duplicate sent out). This is causing a lot of duplicate notifications to get sent, and defeats the point of having thenotified.notifications.argoproj.io
annotation.It seems that a merge request was accepted a while back to ignore all
notified.notifications.argoproj.io
annotations within the provider. The reason was to try and stop irrelevant details from always appearing in the terraform diff.https://github.com/oboukili/terraform-provider-argocd/pull/71
I believe that this is what causes the annotation to get wiped. I think the approach of ignoring the annotation altogether is wrong, and the reporter of that issue could have used a Terraform lifecycle statement if they did not want the ArgoCD notifications annotation to appear in their diff.
Is it possible to preserve this annotation in some way? Even if it does appear in the diff I think it's better to be explicit about these changes in Terraform updates rather than to silently ignore and then change the values. I'm also keen to hear if there are any workarounds that could help.
Thanks