-
Feature Request
-
Resolution: Unresolved
-
Normal
-
None
-
2.5
-
False
-
-
False
- What is the nature and description of the request?
The customer is requesting enhancements to the cloud.terraform Ansible Collection (v3.0.0) to support advanced Terraform functionalities:
-
- Detect drift in infrastructure and refresh the Terraform state file using functionality equivalent to terraform plan/apply -refresh-only.
-
- Import existing resources into the Terraform state file, mimicking the functionality of terraform import.
- Why does the customer need this? (List the business requirements here)
These enhancements are critical to improving the idempotency and state management of Terraform deployments via Ansible. Currently:
-
- Drift detection and correction require manual interventions outside of Ansible automation workflows.
-
- Importing existing resources cannot be achieved through the Ansible cloud.terraform collection, limiting its use in environments where infrastructure already exists and needs to be brought under Terraform management.
This limitation affects automation consistency and increases operational overhead, making it difficult to integrate Terraform more deeply into Ansible-driven automation pipelines.
- Importing existing resources cannot be achieved through the Ansible cloud.terraform collection, limiting its use in environments where infrastructure already exists and needs to be brought under Terraform management.
- How would you like to achieve this? (List the functional requirements here)
The customer is requesting the following functionality to be added to the cloud.terraform Ansible Collection:
-
- A module or flag to perform "terraform plan/apply -refresh-only ..." via Ansible, enabling drift detection and state refresh as part of the playbook execution.
-
- A module or option to perform "terraform import ...", allowing users to import existing resources into the Terraform state directly through an Ansible playbook.
These features should be exposed in a way that integrates smoothly into existing Ansible playbooks, maintaining idempotency and alignment with Terraform best practices.