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

fork先からのPRだとterraform planが走らない #33

Closed
sksat opened this issue Dec 26, 2021 · 15 comments
Closed

fork先からのPRだとterraform planが走らない #33

sksat opened this issue Dec 26, 2021 · 15 comments

Comments

@sksat
Copy link
Contributor

sksat commented Dec 26, 2021

非常に正しい挙動だが,今回は困る

@sksat
Copy link
Contributor Author

sksat commented Dec 26, 2021

無の認証情報を撒いてterraform validateまではGitHub Actionsでやるのはアリかもしれん

@sksat
Copy link
Contributor Author

sksat commented Dec 26, 2021

https://www.terraform.io/cli/commands/validate

The terraform validate command validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc.

そうよね

@sksat
Copy link
Contributor Author

sksat commented Dec 26, 2021

が,しかしその場合でもterraform planはしたいので,一旦別ブランチにマージして様子を見る,みたいなかんじになるなあ(main自動applyはやりたいので)

@sksat
Copy link
Contributor Author

sksat commented Dec 26, 2021

これはできるが,1人増える度に僕がマージボタン2回押さなきゃいけないのはちょっと嫌だな

@sksat
Copy link
Contributor Author

sksat commented Dec 26, 2021

どうにかしてTerraform Cloud氏が毎回approve and runみたいなやつ生やしてくれればいいんだけどなあ

@sksat
Copy link
Contributor Author

sksat commented Dec 26, 2021

2段階マージはあくまで許容するものとして,僕のポチポチの手間を減らす方向で行くのはアリかもしれない

@sksat
Copy link
Contributor Author

sksat commented Dec 27, 2021

とりあえずterraform validateは入れられるんで入れるか

@sksat
Copy link
Contributor Author

sksat commented Dec 27, 2021

@sksat
Copy link
Contributor Author

sksat commented Dec 27, 2021

mainのon: pushで確実にmainにrebaseされたブランチを切るなどはあるな

@sksat
Copy link
Contributor Author

sksat commented Dec 27, 2021

GitHub Actionsでやるのはダルい上にログが出て渋いなどがあるので,planだけ発射して実行結果のリンクがPR commentで生えればいい説もある

@sksat
Copy link
Contributor Author

sksat commented Dec 28, 2021

on: pull_request_targetにした上でlabelを付けたら走るようにしてAPI経由でplan,かなあ

@sksat
Copy link
Contributor Author

sksat commented Dec 28, 2021

よく考えたらVCS-driven workflowだからterraform loginしてしまってplanするのでそんなに問題無いな

@sksat
Copy link
Contributor Author

sksat commented Dec 28, 2021

@sksat
Copy link
Contributor Author

sksat commented Dec 29, 2021

ミスってたんで直した

@sksat
Copy link
Contributor Author

sksat commented Dec 29, 2021

いいかんじになったので閉じ

@sksat sksat closed this as completed Dec 29, 2021
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

No branches or pull requests

1 participant