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

Terraform destroy fails with missing credential error #43

Open
JamieJQuinn opened this issue Nov 16, 2021 · 0 comments
Open

Terraform destroy fails with missing credential error #43

JamieJQuinn opened this issue Nov 16, 2021 · 0 comments
Labels
AWS bug Something isn't working

Comments

@JamieJQuinn
Copy link

Expected result:

Cluster is destroyed when running python destroy-citc.py aws <ip> citc-terraform-<cluster-id>/citc-key

Actual result:

Terraform fails with error:

aws_instance.mgmt: Destroying... [id=i-020833380f8efa17c]
aws_instance.mgmt: Provisioning with 'local-exec'...
aws_instance.mgmt (local-exec): Executing: ["/bin/sh" "-c" "files/cleanup.sh"]
aws_instance.mgmt (local-exec): Terminating any remaining compute nodes

aws_instance.mgmt (local-exec): Unable to locate credentials. You can configure credentials by running "aws configure".
aws_instance.mgmt (local-exec): Node termination request completed
aws_instance.mgmt (local-exec): Wiping DNS entries for hanging nodes

aws_instance.mgmt (local-exec): Unable to locate credentials. You can configure credentials by running "aws configure".
╷
│ Error: local-exec provisioner error
│ 
│   with aws_instance.mgmt,
│   on compute.tf line 69, in resource "aws_instance" "mgmt":
│   69:   provisioner "local-exec" {
│ 
│ Error running command 'files/cleanup.sh': exit status 253. Output: Terminating any remaining
│ compute nodes
│ 
│ Unable to locate credentials. You can configure credentials by running "aws configure".
│ Node termination request completed
│ Wiping DNS entries for hanging nodes
│ 
│ Unable to locate credentials. You can configure credentials by running "aws configure".
│ 
╵
Terraform destroy failed. Try again with:
  cd citc-terraform-nearby-vervet
  ./terraform -chdir=aws apply -destroy 
You may need to manually clean up any remaining running instances or DNS entries

aws-cli is configured with SSO, not sure if that's a factor

Workaround:

  • Manually terminate mgmt instance in AWS console
  • Manually run terraform -chdir=aws apply -destroy
@milliams milliams added AWS bug Something isn't working labels Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWS bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants