查询terraform命令的含义(apply/console/destroy/env/fmt…)
我只需要一种中文的选项,来改写以下内容:
Terraform版本号0.12.26.
命令
Common commands:
apply Builds or changes infrastructure
console Interactive console for Terraform interpolations
destroy Destroy Terraform-managed infrastructure
env Workspace management
fmt Rewrites config files to canonical format
get Download and install modules for the configuration
graph Create a visual graph of Terraform resources
import Import existing infrastructure into Terraform
init Initialize a Terraform working directory
login Obtain and save credentials for a remote host
logout Remove locally-stored credentials for a remote host
output Read an output from a state file
plan Generate and show an execution plan
providers Prints a tree of the providers used in the configuration
refresh Update local state file against real resources
show Inspect Terraform state or plan
taint Manually mark a resource for recreation
untaint Manually unmark a resource as tainted
validate Validates the Terraform files
version Prints the Terraform version
workspace Workspace management
All other commands:
0.12upgrade Rewrites pre-0.12 module source code for v0.12
debug Debug output management (experimental)
force-unlock Manually unlock the terraform state
push Obsolete command for Terraform Enterprise legacy (v1)
state Advanced state management
官方網站:哈希公司的Terraform命令
大致解释
command動きapply*.tfで記載した内容で構築を行うconsoleterraformで使える関数のテストが行えるインタラクティブなコマンドdestroy*.tfで記載した内容の削除を行うenv現在非推奨。workspaceを使うこと。fmt*.tfファイルの整形を行うgetterraform moduleのダウンロードgraphterraformのコードをgraph化するimport既存のリソースをterraformに入れるinitterraformの環境を用意する時に最初に叩くコマンドloginterraform cloudやenterpriseにログインするときlogout上記からログアウトするときoutputstateファイルから出力変数の値を抽出するために使用plandry-run(実行したときの変更サれるものを表示する)providersterraformのproviderを操作するときのコマンドrefreshリソースの実体を正としてtfstateの状態を最新化してくれるshowstateやplanファイルを人間が見やすいように表示するtaint手動で操作されたりなどでterraformの管理外となったリソースにタグをつける(汚染する)plan→applyすると初めて削除されるuntaint付けたタグを削除するvalidate作成した*.tfファイルが正しいかをチェックするversionterraformのバージョン表示workspaceworkspaceの管理(作成、参照、移動)