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

terragrunt python testing helper? #23

Closed
marshall7m opened this issue Jan 28, 2021 · 8 comments
Closed

terragrunt python testing helper? #23

marshall7m opened this issue Jan 28, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@marshall7m
Copy link
Contributor

Just wondering if there's anything brewing in regards to incorporating a wrapper for running Terragrunt commands. Something like:

tg = tftest.TerragruntTest(fixtures_dir)
tg.plan_all(output=True)
@marshall7m marshall7m changed the title terragrunt python helper? terragrunt python testing helper? Jan 28, 2021
@ludoo
Copy link
Collaborator

ludoo commented Jan 28, 2021

Not planned, but looks like a nice addition. I'm not really familiar with Terragrunt, if you have the time to sketch an initial implementation, I can give it a shot as soon as I have some time. Or feel free of course to send a PR if you prefer.

@ludoo ludoo added the enhancement New feature or request label Jan 28, 2021
@marshall7m
Copy link
Contributor Author

marshall7m commented Jan 29, 2021

Great I'll try to get rough an implementation sometime next week. And great job on it so far, I've been using it as a workaround for my inexperience with writing Terratests in Go.

@DavidTamLloyds
Copy link

hello I saw there was a branch https://github.com/GoogleCloudPlatform/terraform-python-testing-helper/tree/terragrunt-support with terragrunt stuff in there but this is it. how far is it from general availability? I looked at the branch and there isnt doc. ? is there a quick way I could try that out (or it really isnt ready yet and still WIP?)

@ludoo
Copy link
Collaborator

ludoo commented Apr 28, 2021

David, I unfortunately fell behind on integrating that into the master branch due to regular workload. Going from memory, we were still unsure on how to integrate documentation for the myriad new args into the code, but the branch might be usable as is. Can you give it a try, and I'll make an effort to find some time and finish the work in the meantime.

@davidtam
Copy link
Collaborator

davidtam commented May 24, 2021

@marshall7m @ludoo ok I have just got round to take a look. 2 things:

if kw.get('tg_config'):

I think it would be better to just have command flag starts with terragrunt to just delegated to tg (without hardcode remap)? This saves a bit of code but also nothing to maintain when tg decided to change their cli options. Plus there is less tests to write if you were to write them


Are you guys happy with me commiting tests to this branch?

Otherwise I ran the test test_tg_all.py with a few modifications and it has convinced me enough it would work.

@ludoo
Copy link
Collaborator

ludoo commented Jun 1, 2021

David, sorry for the huge lag in replying. I planned on setting aside some time for this, but it did not happen (yet). How do you prefer to proceed? Are you ok working on a branch in this repo?

@davidtam
Copy link
Collaborator

davidtam commented Jun 1, 2021

ok yes a branch is fine I will do that and start with adding some test. we let you know when I have got something

@davidtam
Copy link
Collaborator

davidtam commented Jun 8, 2021

Thanks @ludoo for merging in #29 #32 !
This could probably closed?

@ludoo ludoo closed this as completed Jun 9, 2021
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

4 participants