{"repo":"adammck/terraform-inventory","free":true,"listed":false,"github":"https://github.com/adammck/terraform-inventory","clone":"git clone https://github.com/adammck/terraform-inventory.git","description":"Terraform State → Ansible Dynamic Inventory","language":"Go","stars":1839,"topics":["go","ansible","terraform"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Terraform Inventory This is a little Go app which generates a dynamic [Ansible][ans] inventory from a [Terraform][tf] state file. It allows one to spawn a bunch of instances with Terraform, then (re-)provision them with Ansible. The following providers are supported: AWS CloudStack DigitalOcean Docker Exoscale Google Compute Engine Hetzner Cloud libvirt Linode OpenStack Packet ProfitBricks Scaleway SoftLayer VMware Nutanix Open Telekom Cloud Yandex.Cloud Telmate/Proxmox It's very simple to add support for new providers. See pull requests with the [provider][pv] label for examples. Help Wanted 🙋 This library is stable, but I've been neglecting it somewhat on account of no longer using Ansible at work. Please drop me a line if you'd be interested in helping to maintain this tool. Installation On OSX, install it with Homebrew: brew install terraform-inventory Alternatively, you can download a [release][rel] suitable for your platform and unzip it. Make sure the terraform-inventory binary is executable, and you're ready to go. Usage If you are using [remote state][rs] (or if your state file happens to be named terraform.tfstate ), cd to it and run: ansible-playbook --inventory-file=/path/to/terraform-inventory deploy/playbook.yml This will provide the resource names and IP addresses of any instances found in the state file to Ansible, which can then be used as hosts patterns in your playbooks. For example, given for the following Terraform config: resource \"digitalocean droplet\"","default_branch":null,"files":null,"tree":[],"storefront":"/r/adammck","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adammck/terraform-inventory/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}