Terraform Flashcards
what is HCL?
hashicor configuration langua
ge, files end in .tf
what is the config syntax for a resource?
resource “<PROVIDER>_<TYPE>" "<NAME whatever you want"> {</TYPE></PROVIDER>
key = “value”
key2= “value2”
}
what does terraform init
do?
it will read files and download need providers and initialize plugins
what does terraform plan
do?
it will do a dry run of your code to see what it is about to do, always do this just to make you’re not going to break anything, ie. confirm output is expected.
is terraform impertive?
no it’s declaratrive, your tf files are defining an end-state.
what does terraform destroy
do by default?
destroys entire infrastructure, everything created w/ terraform.
how do you delete a resource?
simply delete it in the tf file and terraform will understand that you want to destroy it.