Created
May 21, 2025 09:47
-
-
Save yuya-maemichi-synspective/c9e7f60d5da16a4b7b61520375a788d7 to your computer and use it in GitHub Desktop.
Terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # init | |
| set --local modules | |
| set --erase modules | |
| terraform state list | | |
| grep -E '^module.mas_\w+' -o | | |
| sort -u | | |
| while read m | |
| set --append modules $m | |
| end | |
| terraform plan -out=tf.plan \ | |
| -target={$modules} | |
| terraform apply tf.plan | |
| rm tf.plan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment