Created
February 18, 2022 19:35
-
-
Save sairamkrish/5ea71f923fe6c5c0a1926ed07f1eea7d to your computer and use it in GitHub Desktop.
This file contains 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
docker-compose run --rm terraform init | |
docker-compose run --rm terraform fmt | |
docker-compose run --rm terraform validate | |
docker-compose run --rm terraform plan | |
docker-compose run --rm terraform apply | |
# useful terraform sub commands | |
terraform state list | |
terraform state show <resource> | |
terraform output #shows last output | |
terraform refresh #without applying, fetches values for output variables | |
terraform destroy -target <resource> #delete only a particular resource. | |
terraform apply -target <resource> #apply individual resource | |
terraform plan -var 'environment=stg' # passing variables | |
terraform graph -type=plan | dot -Tpng -o graph.png # outputs the plan as DOT (graphviz) diagram |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment