Closed jessereynolds closed 2 years ago
@jessereynolds I was able to reproduce, thank you for the bug submission.
The scenario which reproduced it for me was running autope post run failure or user initiated kill, specifically while Bolt is running Terraform. When you get into this situation, run ps
and check to see if there are any terraform processes running, if yes then kill them. After that, from the autope project directory cd .terraform/aws_pe_arch && terraform destroy
. It might say that there is nothing to destroy but will clean up some lock files that were previously left around.
After Terraform finishes the destroy then return to the Bolt project's root and attempt to run autope again. This solved the issue for me.
If you use autope/terraform enough on AWS then you might notice that it "hangs" occasionally. I've found this to be related to the short lifespan of the STS token that is generated when going through the bastion assume-role
workflow so I got in the habit of refreshing my credentials before doing anything with Terraform, e.g. re-assuming my role. Overall, we've found more quirks using Terraform with AWS then with GCP.
This is might be a bug more appropriate for puppetlabs/puppetlabs-terraform since the resolve_reference
is happening before the autope plan runs so we have a limited ability to work around it in this module.
We'll document that you may see this and other undesirable behaviours when your token expires. Thanks!
Describe the Bug
Running an initial build on aws (with role switching) yields the following error:
I was able to get past this by removing the
inventory.yaml
file and trying again.Expected Behavior
The environment is built on aws.
Happy to provide more info if needed. Note that I am using
assume-role
to switch from the bastion role to the required role.