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 running aws cli on GH Actions/Azure, get modules dynamically #309

Merged
merged 3 commits into from
Apr 23, 2021

Conversation

mbarrien
Copy link
Contributor

@mbarrien mbarrien commented Apr 23, 2021

  • Fixes an issue where running the aws cli (specifically aws sts get-caller-identity) would exit with error 255, and fail the build. It turns out that since we use ubuntu-latest (which recently upgraded to ubuntu 20.04 with aws cli v2) we were running into Executable breaks GitHub action - python version works aws/aws-cli#5262. When run on a machine that is running on Azure cloud (as Github Actions does), since the Azure metadata service runs on the same 169.254.169.254 location that AWS metadata service does. We disable using the metadata service by globally setting AWS_EC2_METADATA_DISABLED environment variable.
  • Instead of having enumerate every single module and have to remember to change .github/workflows/ci.yml to add new modules/remove deprecated modules, we use a feature added by Github Actions in April 2020 (https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/) to take in the matrix via a JSON variable, and calculate the modules list dynamically. You can see this working in some previous Github Actions CI runs in this repo while I was testing this.
  • Fixes tests that were committed in a broken state. Mostly cases where the module requires project/env/service/owner inputs but are not using tftest.Options which provides them, or the opposite case of modules that don't need those fields but used tftest.Options which thus gave extra arguments.

@mbarrien mbarrien force-pushed the mbarrien/fix-tests branch 2 times, most recently from 2a2611b to c42f1ed Compare April 23, 2021 07:05
@mbarrien mbarrien force-pushed the mbarrien/fix-tests branch 4 times, most recently from 49c5583 to 34dcfc1 Compare April 23, 2021 19:35
@mbarrien mbarrien enabled auto-merge (squash) April 23, 2021 19:35
@mbarrien mbarrien requested a review from cziie April 23, 2021 19:36
@mbarrien mbarrien merged commit 98fca6f into main Apr 23, 2021
@mbarrien mbarrien deleted the mbarrien/fix-tests branch April 23, 2021 20:24
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.

3 participants