Adding or removing match_expressions
in a selector forces a new argocd_application_set resource
#330
Labels
match_expressions
in a selector forces a new argocd_application_set resource
#330
Adding or removing new
match_expressions
blocks to an argocd_application_set resource, either in a generator's selector or in a post-filter selector requires a new resources to be created. It doesn't look like this is required by the ArgoCD API, and it means that if we need to add a new match expression in the future the applications in our application set are destroyed and then recreated.Terraform Version, ArgoCD Provider Version and ArgoCD Version
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
match_expressions
block inside the clusters selector (or in a post-filter selector block) EX:terraform apply
Expected Behavior
Terraform should update the application_set with the new match_expressions block in-place.
Actual Behavior
Terraform should update the application_set with the new match_expressions block in-place.
Important Factoids
I tried a custom provider build with
ForceNew: false,
set in thematchExpressionsSchema
in schema_label_selector.go and I was able to add and remove match_expression blocks from an applicationset without recreating it. The argo server logs show the applicationset being updated without any apparent issues.Community Note
The text was updated successfully, but these errors were encountered: