Relative Content

Tag Archive for amazon-web-servicesansibleterraformdevops

Ansible dynamic inventory with terraform

I have an EC2 instance with Jenkins, Ansible and Terraform installed.What i want to do is to create a Jenkins job which runs a Terraform script for creating a new EC2 instance and Ansible playbook for installing Tomcat in the new one. My problem is that when i run terraform apply i want to have in inventory file the new ip of the instance. How can i change that ip everytime i create a new instance?