Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
各種アクションや利用ツールのバージョンアップ。
OIDCがモジュールのバージョンアップと同時に設定の互換性が無くなって動かなくなっていたので修正。
あとシェルのシェバンを気分で変更。
作業手順
1. terraformコマンドのバージョンアップ
2. 各種ファイルに記載されたバージョンをアップ
バージョンアップしたファイルに関連するツールが正しく動くかを確認するために、scriptsディレクトリ内のシェルを実行して正常系、異常系どちらも反応することを確認。
あとREADME.mdにも各ツールのバージョン書いてるので、それらを最新に変更する必要がある。
3. OPAのメジャーバージョンアップ対応
ついにOPA1.0がリリースされたので対応。
まずリリースノートとマイグレーションのドキュメント読む。
https://github.com/open-policy-agent/opa/releases
https://www.openpolicyagent.org/docs/latest/v0-upgrade/
コードを
opa
,regal
,conftest
で検索。そして
opa fmt --v1-compatible --rego-v1 $OPT policies/
から--v1-compatible --rego-v1
オプションを削除。そもそもOPA1.0.0がリリースから3日しか経過していない状態であるため、Regalはv0.69.0を使用している。
Regalは0.70.0でも動くので.regal/config.yamlのcapabilities.from.versionはv0.70.0になる。
他はすでにv1のオプトイン行っていたため修正の必要はなかった。
4. test環境のtier1、tier2ディレクトリ内にある.terraform.lock.hclを更新(しないとCIが落ちる)
stg環境と本番環境では不要。