Open kszlachcikowski opened 5 years ago
Hi @kszlachcikowski! Thanks for the report! There are known issues with for_each
in provisioners (https://github.com/hashicorp/terraform/issues/22289) and this fix will go out in 0.12.7, which hopefully changes your issue's status :)
Terraform 0.12.7 is now released! https://github.com/hashicorp/terraform/blob/v0.12.7/CHANGELOG.md
Hi,
There seems to be an issue with the chef provisioner when generating resources using "for_each" (new in terraform 0.12.6). Whenever the "each" variable is used within the chef provisioner block of the resource to dynamically fill out attributes (eg. "node_name") terraform fails during the apply phase (after the vm instance is created but not yet provisioned) with the following error:
Terraform Version
Terraform v0.12.6
Affected Resource(s)
azurerm_virtual_machine
Terraform Configuration Files
Expected Behavior
1 or more VM's should be created and provisioning applied to all of them using the "each" variable to provide individual VM details.
Actual Behavior
The "apply" is run and VM instances created but no provisioning occurs. The apply run ends with:
Steps to Reproduce
terraform apply
References
https://github.com/hashicorp/terraform/issues/17179