community.general.terraform – Manages a Terraform deployment (and plans)¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.terraform
.
Synopsis¶
Provides support for deploying resources with Terraform and pulling resource information back into Ansible.
Parameters¶
Examples¶
- name: Basic deploy of a service
community.general.terraform:
project_path: '{{ project_dir }}'
state: present
- name: Define the backend configuration at init
community.general.terraform:
project_path: 'project/'
state: "{{ state }}"
force_init: true
backend_config:
region: "eu-west-1"
bucket: "some-bucket"
key: "random.tfstate"
- name: Define the backend configuration with one or more files at init
community.general.terraform:
project_path: 'project/'
state: "{{ state }}"
force_init: true
backend_config_files:
- /path/to/backend_config_file_1
- /path/to/backend_config_file_2
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Ryan Scott Brown (@ryansb)