05 - Terraform Other

 

目錄

  • graph
  • Use remote state

graph

 

The output is in the DOT format.

查看它的 Software

https://www.graphviz.org/

yum install graphviz    # Installed size: 95 M

Opts

-type=plan

Type of graph to output.

type: plan, plan-destroy, apply, validate, input, refresh.

使用

terraform graph > graph.dot

# -Txxx'' (where xxx is an unlikely format)

dot -Tpng graph.dot > graph.png

graph.dot

digraph {
    ...
}

graph.png

 


Use remote state

 

terraform {
  backend "s3" {
    key = "medium-terraform/stage/terraform.tfstate"
    # ...
  }
}

 

Creative Commons license icon Creative Commons license icon