Open Ravitejareddykamidi opened 1 month ago
Hi @Ravitejareddykamidi
Thanks for reporting. ~I remove the flag "bug" and add the "enhancement" label. The provider is still using the Argo CD client in version 2.4. Multi-Source apps were introduced inside Argo CD 2.6.x.~
~So we need to~ ~1. update the argocd library (go.mod)~
Update: I mixed up some things. We are already using the libary version 2.9.x:
require (
# ..
github.com/argoproj/argo-cd/v2 v2.9.21
github.com/argoproj/gitops-engine v0.7.3
github.com/argoproj/pkg v0.13.7-0.20230627120311-a4dd357b057e
# ..
)
Then we need to make sure that the multi-source app is correctly reflected into TF. I will add the bug label again.
Description:
I'm encountering an issue with the argocd Terraform provider (source: oboukili/argocd, version: 6.1.1) when trying to create a multi-source application. Specifically, the directory block for excluding and including files does not get saved in the Terraform state file. As a result, when I re-run terraform plan or terraform apply, it continuously shows that changes are required, even though no actual changes were made.
Terraform Version, ArgoCD Provider Version and ArgoCD Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Steps to Reproduce
Expected Behavior
The directory block should be saved in the Terraform state file after the first terraform apply, and no changes should be detected on subsequent terraform plan or terraform apply runs unless there are actual changes.
Actual Behavior
The directory block does not get saved in the Terraform state file, causing Terraform to continuously detect and attempt to apply changes related to this block on every terraform plan or terraform apply run, even though the ArgoCD UI already reflects the changes.
Terraform Plan shows the following every time:
Important Factoids
The directory block is already present in the ArgoCD UI and contains the correct values. This behavior only affects the directory block, while other resources function as expected. This happens when defining multiple sources within an ArgoCD application.
References
No specific references found yet.
Community Note