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

Add terraform execution condition #436

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

semnil
Copy link

@semnil semnil commented Aug 1, 2022

I had an incident where I forgot to add a skip label and the resource was deleted. 😢
I don't think it is necessary to run terraform as long as the goal is to run tfmigrate.
Also, I believe the following issues can be resolved.

ref: #386

Please let me know if additional action is needed and I will respond. 😄

Comment on lines 160 to 163
core.setOutput('terraform_targets', terraformTargetObjs);
if (tfmigrateObjs.length == 0) {
// Running terraform when tfmigrate has nothing to do
core.setOutput('terraform_targets', terraformTargetObjs);
}
Copy link
Author

Choose a reason for hiding this comment

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

The differences other than these changes are the result of running npm run build.

@suzuki-shunsuke suzuki-shunsuke self-requested a review August 2, 2022 06:33
Copy link
Owner

@suzuki-shunsuke suzuki-shunsuke left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.
I think this change has a problem.

tfaction supports Monorepo, and doesn't restrict the use case that Terraform and tfmigrate are run in multiple working directories.

This change restricts those use cases and includes a breaking change.

#386 intends to prevent both terraform and tfmigrate from being run in the same working directory (I fixed the issue title).

@semnil
Copy link
Author

semnil commented Aug 3, 2022

I'm sorry that I misunderstood the content of the issue. 🙇
I have made the change again, does this resolve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants