terraform – Manages a Terraform deployment (and plans)¶
New in version 2.5.
Synopsis¶
Provides support for deploying resources with Terraform and pulling resource information back into Ansible.
Requirements¶
The below requirements are needed on the host that executes this module.
terraform
Parameters¶
Notes¶
Note
To just run a terraform plan, use check mode.
Examples¶
# Basic deploy of a service
- terraform:
project_path: '{{ project_dir }}'
state: present
# Define the backend configuration at init
- terraform:
project_path: 'project/'
state: "{{ state }}"
force_init: true
backend_config:
region: "eu-west-1"
bucket: "some-bucket"
key: "random.tfstate"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]