Open Houlistonm opened 4 years ago
Ping. almost 60 days w/o feedback/comments.
@mitchellh Apologies if direct contact is considered inappropriate. You're the #1 on the contribution list for this repository. This is a continuing problem for our team, and I would welcome the opportunity to discuss it. Thank you. Mark.
This is still important to our project, can somebody please look at this?
Current Terraform Version
Use-cases
I have a module that launches our AWS hosts and configures via Cloud-Init.
We’ve been experiencing some failures with Cloud-Init and we initially added a remote-exec provisioner to the instance to wait for Cloud-Init to finish and the status would cause a pass/fail in Terraform apply.
Unfortunately that caused a deadlock, our Cloud-Init needed a volume attached to complete, and TF couldn’t attach the volumes while it was waiting on Cloud-Init to complete.
Our solution was to use a null_resource, and this works for all of our use cases with one side-effect.
If the null_resource fails, it doesn’t taint the instance. So the next TF run, the null_resource is re-created and fails because the [broken] host still exists.
This causes problems in our CI/CD pipeline.
Asked for ideas on discuss
Attempted Solutions
Proposal
I'm proposing that the null_resources should support a new argument to that would taint a resource on failure of the null_resource. Ideally, this should be limited to the one of the resources that triggered the null_resource.
References