recreate_client
seemingly ignored when using chef provisioner twice for same node
#10688
Labels
recreate_client
seemingly ignored when using chef provisioner twice for same node
#10688
Terraform Version
0.7.13
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
https://gist.github.com/Bjorn248/99b7820d982e1abb0abca99e9fd6b5bd
Debug Output
Debug: https://gist.github.com/Bjorn248/9972bccb6a8d8c308386045ac0cbaabb
Non-Debug: https://gist.github.com/Bjorn248/22f0441dc99a225beebfb3307e5a720b
Expected Behavior
sudo knife node delete
should have never been run withrecreate_client
set to false. With older versions of terraform this was not an issue, and theapply
ran through without problems. Oncerecreate_client
was added this broke.What I am doing here is configuring a mongo replicaset, a relatively simple task. First, I use three
aws_instance
resources to spin up my servers and use the inline chef provisioner to install mongo on them, and then once all 3 are up I use anull_resource
to configure a replicaset from DB1, also using chef. This was working before (in older versions of terraform), and the behavior was just that terraform would ssh in and basically runchef-client
with the appropriate attributes and run_list inside thenull_resource
and it would not try to delete the chef node before the second run.Actual Behavior
Once the
apply
gets to thenull_resource
it tries to delete the chef node even thoughrecreate_client
is set to false. It fails to delete the chef node (citing lack of permissions even though I tried this with an admin user and that still did not resolve the issue) and the apply fails. In order to get theapply
to run all the way through I have to delete the chef client nodes before runningapply
again so that terraform can recreate the nodes and run chef-client a second time, this time configuring the replica set.Steps to Reproduce
recreate_client
set to false (it actually does not matter if it is set totrue
orfalse
the result is the same).null_resource
fails because terraform tries to delete the node.References
#3605
The text was updated successfully, but these errors were encountered: