Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Modification of cluster (should recreate the ressource or allow to override the existing one) #510

Open
NGAJean opened this issue Dec 2, 2024 · 2 comments
Labels
bug Something isn't working needs-more-info Waiting on additional information from issue/PR reporter.

Comments

@NGAJean
Copy link

NGAJean commented Dec 2, 2024

Terraform Version, ArgoCD Provider Version and ArgoCD Version

Terraform version: hashicorp/terraform:1.8
ArgoCD provider version: argoproj-labs/argocd v7.1.0
ArgoCD version: v2.12.3+6b9cd82

Affected Resource(s)

  • argocd_cluster

Debug Output

Error: failed to update cluster https://xxxxx
rpc error: code = PermissionDenied desc = permission denied

Steps to Reproduce

  1. register a first cluster
  2. register a new cluster with the same name
  3. modification failed

Expected Behavior

Automatically trigger a resource recreation or allow via a parameter like upsert in cli to override the existing one.

Actual Behavior

Modification failed

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@NGAJean NGAJean added the bug Something isn't working label Dec 2, 2024
@the-technat the-technat added the needs-more-info Waiting on additional information from issue/PR reporter. label Dec 6, 2024
@the-technat
Copy link
Collaborator

Hi @NGAJean would you mind sharing an example TF file to reproduce the issue? I cannot imagine what you mean by "register a new cluster with the same name". Is this a second argocd_cluster resource you are adding or something you do via CLI/UI?

@NGAJean
Copy link
Author

NGAJean commented Dec 7, 2024

Hi @the-technat, the usecase is the following.
We are using EKS, sometimes when we change some low level parameters we have to recreate the entire cluster.
The new cluster have the same name than the previous one but with a different endpoint and CA authority.
To update the cluster definition on the argoCD application side with the cli we are able to use the upsert flag to override an existing cluster (the previous one) with the same name even if the spec differs (the new one).
What we expect with this argocd terraform provider is that if the endpoint and/or the ca authority for an existing `argocd_cluster terraform ressource change it trigger a recreation of this terraform ressource instead on failed on the apply command.
Is it more clear now ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-more-info Waiting on additional information from issue/PR reporter.
Projects
None yet
Development

No branches or pull requests

2 participants