forked from ansible-collections/community.general
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestfeature IdeaThis proposes the idea of adding new features to the projectThis proposes the idea of adding new features to the project
Description
SUMMARY
Currently terraform doesnt allow some resource manipulations outside of it. But such manipulations will be convenient to use by other ansible code. A lookup plugin to pull the resource IDS generated by terraform will be useful to do that.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
terraform lookup plugin
ADDITIONAL INFORMATION
The lookup plugin would take the path to the terraform state file and the either the resource type or resource name or both and return the IDS for the matched parameters passed.
- hosts: localhost
vars:
content: "{{ lookup('terraform', resource_name='load_balancer', state_file='myproject/terraform.tfstate', resource_type='aws_lb') }}"
tasks:
- debug: msg = "The ID is {{ content }}"
Reactions are currently unavailable
Metadata
Metadata
Labels
enhancementNew feature or requestNew feature or requestfeature IdeaThis proposes the idea of adding new features to the projectThis proposes the idea of adding new features to the project