Deck 1 Flashcards
What does a Terraform backend do?
Gives Terraform somewhere to store the state file
What are Terraform’s main supported backends?
Local [Generic] Remote S3 Artifactory Consul Kubernetes
What is the command to get the Terraform console open?
terraform console
How do you enable Terraform debugging?
Set the environment variable TF_DEBUG to one of Trace, Debug, Info, Warn or Error.
Which debug level is the most verbose?
Trace
What is a Terraform install that doesn’t have internet access generally known as?
Air gapped
What does the index function do?
Give you the position number for a value in a list
How would you find the index of “B” in a list “A, B, C”?
index([“a”, “b”, “c”], “b”)
What does the lookup function do?
Find the value for a given key, or return a default value if it can’t be found.
How do you set a variable from the CLI, using an environment variable?
Export the variable with TF_VAR_ in front of it
When does Terraform’s Vault provider go and get its information from vault?
When Terraform Plan is run
How can you access the output of one module from another?
Add an output from the first module, and retrieve the output in the second module.
How do you remove the lock on a state for your current configuration?
terraform force-unlock
Where are plugins stored by default?
.terraform/providers, in the current working directory
What are the general variable types?
String
Number
Boolean