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

ArgoCD cluster not refreshing state after manually destroy it #319

Closed
paco-sisutech opened this issue Jul 23, 2023 · 2 comments
Closed

ArgoCD cluster not refreshing state after manually destroy it #319

paco-sisutech opened this issue Jul 23, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@paco-sisutech
Copy link

Terraform Version, ArgoCD Provider Version and ArgoCD Version

Terraform version: 1.5.3
ArgoCD provider version: 5.6
ArgoCD version:2.7.7

Affected Resource

  • argocd_cluster

Debug Output

   project.cluster-dev-project (cluster-dev-project): Drift detected (update)
   ╷
   │ Error: failed to read cluster https://random-ip/cluster-dev
   │
   │   with cluster.project-dev-cluster (project-dev-cluster),
   │   on cdk.tf.json line 249, in resource.argocd_cluster.project-dev-cluster (project-dev-cluster):
   │  249:       },
   │
   │ rpc error: code = PermissionDenied desc = permission denied

Steps to Reproduce

  1. Have previously created a cluster with terraform
  2. Remove cluster manually in argocd
  3. Try to refresh state, apply or destroy just the cluster resource

Expected Behavior

Refresh state and remove cluster from the state when refreshing state

Actual Behavior

PermissionDenied error, new behaviour of ArgoCD when there is not such resource in the server

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
@paco-sisutech paco-sisutech added the bug Something isn't working label Jul 23, 2023
@paco-sisutech
Copy link
Author

Seems like I kind of fix it, just removed the state in terraform for the resource and then run apply, that made it:
terraform state rm cluster.project-dev-cluster

@w4rgrum
Copy link
Contributor

w4rgrum commented Feb 13, 2024

@paco-sisutech this is probably linked to this issue: #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants