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

invoke terraform directly instead of terragrunt #22

Closed
gregwebs opened this issue Aug 11, 2016 · 8 comments
Closed

invoke terraform directly instead of terragrunt #22

gregwebs opened this issue Aug 11, 2016 · 8 comments
Labels
enhancement New feature or request

Comments

@gregwebs
Copy link

I would like to use terraform directly if possible. With this layer on top it is possible for someone to just invoke terraform directly instead of using terragrunt.

Is it possible to make terragrunt a terraform plugin or possibly a data source such that I can put 1 line into a terraform file that will ensure that terragrunt is installed for terraform plan to be able to be run successfully?

@josh-padnick
Copy link
Contributor

Hi @gregwebs!

In our blog post introducing terragrunt, under the section Why not just submit Pull Requests to Terraform?, we give the specific reasons why we wrote a separate tool versus submitting a few Pull Requests to update Terraform directly. But we also clarify that while our short-term goal with Terragrunt is to get community feedback and empower our own clients, our ultimate goal is to see this functionality implemented directly in Terraform.

@gregwebs
Copy link
Author

It sounds like you are saying the way you want to achieve this is by merging the code into terraform. I have a feeling that may be a long way out from happening right now, but I am definitely supportive of that. I may take a stab at trying to create a data source that does locking when I get a little more concerned about locking.

@gregwebs gregwebs changed the title invoke terraform directly instead ot terragrunt invoke terraform directly instead of terragrunt Aug 11, 2016
@abtreece
Copy link

abtreece commented Aug 11, 2016

Some of the Terragrunt features are also features of Terraform Enterprise,
locking in particular. Thus you may find some opposition to getting them
included in Terraform.

@brikis98 brikis98 added enhancement New feature or request help wanted labels Aug 22, 2016
@dmrzzz
Copy link
Contributor

dmrzzz commented Dec 16, 2016

As an alternative lower-tech approach, how about letting terragrunt learn the location of my terraform binary from a terragrunt-specific environment variable? That way I don't have to put terraform on my PATH, which means if I accidentally type terraform instead of terragrunt it won't do anything.

@brikis98
Copy link
Member

brikis98 commented Dec 16, 2016

@dmrzzz That's a great idea. It could be done via a command-line flag, env var, or a setting in .terragrunt:

terraform = {
  path = "/foo/bar/terraform"
}

I'd happily accept a PR for that!

@dmrzzz
Copy link
Contributor

dmrzzz commented Dec 17, 2016

PR submitted (hopefully)! This is my first-ever Go code and my first-ever github pull request, so I apologize for any newbie mistakes.

I chose env var / command-line flag as opposed to a .terragrunt setting because the value is specific to your local workstation and shouldn't be checked into source control.

@brikis98
Copy link
Member

@dmrzzz PR worked just fine. Nice work and thank you for contributing :)

I chose env var / command-line flag as opposed to a .terragrunt setting because the value is specific to your local workstation and shouldn't be checked into source control.

Ah, yea, you're right.

@brikis98
Copy link
Member

brikis98 commented Jan 8, 2017

#76 Allows you to specify the path to Terraform via an env var or command-line option.

@brikis98 brikis98 closed this as completed Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants