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

refactor: use -chdir in terraform_validate wrapper #2617

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Sep 25, 2024

  • Use Terraform's -chdir option rather than cd

@wyardley
Copy link
Contributor Author

Docs generation is another place where I think the pushd / popd might not be needed and where the code might be simpler / more readable without it.

@apeabody
Copy link
Collaborator

/gcbrun

@wyardley wyardley changed the title fix: use -chdir and -upgrade in terraform_validate wrapper fix: use -chdir in terraform_validate wrapper Sep 25, 2024
@wyardley wyardley changed the title fix: use -chdir in terraform_validate wrapper refactor: use -chdir in terraform_validate wrapper Sep 25, 2024
@wyardley
Copy link
Contributor Author

updated the commit type to refactor, since it shouldn't change the behavior (ideally)

@apeabody
Copy link
Collaborator

/gcbrun

Copy link
Collaborator

@apeabody apeabody left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @wyardley!

Just to be safe/proper, let's bump the patch here: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/blob/master/infra/build/Makefile#L59, and then this is ready to merge!

- Use Terraform's `-chdir` option rather than `cd`
@wyardley
Copy link
Contributor Author

Ok, and then bump the version in #2619 again after merge? Right now, they would both be at the same patch level.

@apeabody
Copy link
Collaborator

Ok, and then bump the version in #2619 again after merge? Right now, they would both be at the same patch level.

Exactly, a bit of extra work, but I'd like to get this PR merged/released today.

@apeabody
Copy link
Collaborator

/gcbrun

Copy link
Collaborator

@apeabody apeabody left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @wyardley!

@apeabody apeabody merged commit 9907e7f into GoogleCloudPlatform:master Sep 25, 2024
6 checks passed
apeabody added a commit that referenced this pull request Sep 25, 2024
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