terraform-ansible-example icon indicating copy to clipboard operation
terraform-ansible-example copied to clipboard

Provisioning doesn't work when changing count value

Open Artemmkin opened this issue 7 years ago • 1 comments

When you increase count value, new instances are not provisioned. When decreasing the value, you get an error. The cause of the error is Ansible provisioning.

Artemmkin avatar Apr 19 '17 16:04 Artemmkin

The cause of the problem is probably ec2.py, which is not the best way to provision in the first place. Problems with this approach:

  • We can work only with AWS, but not other cloud providers
  • It's based on the information fetched from AWS and not on the state file

We need to find a way to base inventory file on the state created by terraform. At the same time, we need to be able to use remote state. This script seems to fit the bill

Artemmkin avatar Apr 20 '17 06:04 Artemmkin