コマンド一覧
コマンド処理内容
terraform initTerraform を初期化する
terraform init -reconfigurebackend.tf の設定を再読込する
(キャッシュクリア)
terraform init -migrate-stateバックエンドを変更する
terraform fmt
terraform fmt -recursive
コードを整形する
terraform planリソースの変更を確認する(追加・変更・削除)
terraform plan -target=module.<モジュール名>モジュール単位
リソースの変更を確認する(追加・変更・削除)
terraform applyリソースを適用する
terraform destroyりすーすを削除する
terraform showリソースの状態を確認する
terraform outputoutputの内容を確認する
terraform state listtfstate管理のリソースを確認する
terraform state rm ${リソース名}tfstate管理のリソースを削除する
terraform import ${tfstateの管理名} ${リソース名}tfstate管理のリソースを追加する