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
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
Define a multi-source ArgoCD application using the argocd_application resource.
Include the directory block in the second source with exclude and include options.
Run terraform apply to create the application.
Run terraform plan again and observe that the directory block is continuously reported as needing to be added.
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.
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.
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)
2. make sure multi-source app is correctly represented inside Terraform (state/schema)
Update:
I mixed up some things. We are already using the libary version 2.9.x:
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
The text was updated successfully, but these errors were encountered: