Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the -from-module flag when init #108

Open
samerbahri98 opened this issue Dec 26, 2023 · 3 comments
Open

Add support for the -from-module flag when init #108

samerbahri98 opened this issue Dec 26, 2023 · 3 comments
Labels
type/enhancement New feature or request

Comments

@samerbahri98
Copy link

SUMMARY

Terraform has a feature where it can initialize a working directory from a terraform module like this:

terraform init -form-module <module>

The ansible cloud.terraform.terraform module does not support this unfortunately. And it would be nice if this feature exists.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

cloud.terraform.terraform

ADDITIONAL INFORMATION

I can work on it and open a pull request if everyone is busy (please indicate in the comment if you are interested in having this feature, and if you want me to work on it).

EXAMPLE
- name: Deploy Nginx Ingress Controller
  cloud.terraform.terraform:
    project_path: '{{ project_dir }}'
    state: present
    from_module: terraform-iaac/nginx-controller/helm  # this should download https://registry.terraform.io/modules/terraform-iaac/nginx-controller/helm/latest
@gravesm
Copy link
Member

gravesm commented Jan 8, 2024

@samerbahri98 Thanks for opening on issue. My understanding is that this feature is primarily intended for use with Terragrunt (see hashicorp/terraform#33276 (comment)), and I'm not sure it's something we would want to support. What's the use case for this?

@DaviPtrs
Copy link

DaviPtrs commented Apr 5, 2024

I also have interest on this feature

@samerbahri98
Copy link
Author

ah sorry @gravesm I forgot to reply.
The use case here is that I use ansible to perform system integration tests. I used the example of the official terraform registry in the issue description, but the actual modules are in different git repositories and s3 buckets, and I would like to skip the steps of downloading the modules and putting them in a wrapper module to test them.

@gravesm gravesm added the type/enhancement New feature or request label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants