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

Reduce the number of times we run apply #233

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

raykrueger
Copy link
Contributor

What does this PR do?

The current implementation of the install scripts runs terraform apply 2 times per terraform module using -target. Additionally apply is run again 2 more times at the end of the script.

This means that we are running terraform apply twice as much as required.

This commit adds | tee /dev/tty to all the apply steps so that the output can be captured and evaluated, as well as having the output print to screen. ${PIPESTATUS[0]} is used to check the return code of the first command.

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Mandatory for new blueprints. Yes, I have added a example to support my blueprint PR
  • Mandatory for new blueprints. Yes, I have updated the website/docs or website/blog section for this feature
  • Yes, I ran pre-commit run -a with this PR. Link for installing pre-commit locally

For Moderators

  • E2E Test successfully complete before merge?

The current implementation of the install scripts runs `terraform apply`
2 times per terraform module using -target. Additionally apply is run
  again 2 more times at the end of the script.

This means that we are running terraform apply twice as much as
required.

This commit adds ` | tee /dev/tty` to all the apply steps so that the
output can be captured and evaluated, as well as having the output print
to screen.
Copy link
Collaborator

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @raykrueger 🚀

@vara-bonthu vara-bonthu merged commit f05d172 into awslabs:main Jun 30, 2023
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