ansible-collections / cloud.terraform

The collection automates the management and provisioning of infrastructure as code (IaC) using the Terraform CLI tool within Ansible playbooks and Execution Environment runtimes.
GNU General Public License v3.0
100 stars 36 forks source link

Terraform state inventory plugin should support multiple cloud providers #148

Closed vvarga007 closed 4 months ago

vvarga007 commented 5 months ago
SUMMARY

Terraform state inventory should support multiple cloud providers and provide the capability to support in-house developed providers/resources. Currently, only three major cloud provider resources are supported. (AWS, Azure, GCP).

ISSUE TYPE
COMPONENT NAME

terraform_state inventory plugin

ADDITIONAL INFORMATION

I opened a pull request with my proposed solution: ansible-collections/cloud.terraform#146

Example usage for Digital Ocean resources:

plugin: cloud.terraform.terraform_state
backend_type: s3
backend_config:
 region: us-east-1
 key: terraform/state
 bucket: my-sample-bucket
hostnames:
 - id
groups:
 nyc: region == 'nyc3'
provider_mapping:
 - name: do
   provider_name: registry.terraform.io/digitalocean/digitalocean
   types:
     - digitalocean_droplet