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

Fix terraform validate test #11

Merged
merged 3 commits into from
May 7, 2020
Merged

Fix terraform validate test #11

merged 3 commits into from
May 7, 2020

Conversation

Gowiem
Copy link
Member

@Gowiem Gowiem commented Apr 24, 2020

what

  • Adds a "Prerequisites" header to README to mention Bash v5+ and bats-core requirements. These threw me for a while, so I figured adding them here would help others when running locally.
  • Fixes validate.bats failing for independent modules due to the "The argument 'region' is required" error. This is the same underlying issue as Fixes #207, supplying AWS_DEFAULT_REGION fixes v0.12 tf validate build-harness#208.
  • Fixes what I believe is just a simple typo: TF_CLI_ARGS_init is set in setup but then isn't unset in teardown. TF_CLI_ARGS_plan is unset instead. I updated teardown to unset TF_CLI_ARGS_init instead as that just makes sense.

why

  • Fixes running validate.bats locally.
  • Informs others of prereqs so they don't run into trying to find these dependencies themselves.

references

This is the same issue as 
cloudposse/build-harness#208. Without a default 
region, `terraform validate` fails when running against independent 
modules as they do not have a provider/region supplied.
I believe this was just a mistake but I may be wrong. setup() sets 
TF_CLI_ARGS_init, but teardown unsets TF_CLI_ARGS_plan. That seemed like 
a small typo to me, so I figured I would include this.
README.yaml Show resolved Hide resolved
@osterman osterman merged commit 237e8e2 into cloudposse:master May 7, 2020
@Gowiem Gowiem deleted the fix-terraform-validate-test branch May 7, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants