Skip to content

katademy-decks/terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Questions to refresh your memory of Terraform (WIP)


Do resources usually have defined relationships with each other? Not unless the depends_on meta-argument is set.
The _____ meta-argument selects non-default configuration inside a provider block. alias
Resources may require a program to be run before Terraform finishes operations on them. The _____ and _____ meta-arguments take extra non-declarative actions after resource creation 
provisioner and connection
A resource must be associated with one _____ configuration, defined in the same module, or in the parent module (either through _____ or via the _____ argument) provider inheritance providers
Can remote state use GCS? Yes
Can remote state use Amazon S3? Yes
The boolean _____ lifecycle meta-argument changes resource update behavior so that the new replacement object is created first, and then the prior object is destroyed only once the replacement is created.  This is an opt-in behavior because many remote object types have unique name requirements or other constraints that must be accommodated for both a new and an old object to exist concurrently. Some resource types offer special options to append a random suffix onto each object name to avoid collisions, for example. Terraform CLI cannot automatically activate such features, so you must understand the constraints for each resource type before using _____ with it. create_before_destroy 
The _____ lifecycle meta-argument makes Terraform reject any plan/command that would destroy the object associated with the resource. However, this makes some configuration changes impossible to apply. prevent_destroy
Settings of a remote object might be modified outside of Terraform, which it would attempt to "fix" on the next run. The _____ lifecycle meta-argument specifies resource attributes that Terraform should ignore when planning updates to the associated remote object. ignore_changes 
What is special about files using the *.auto.tfvars filename structure? They get loaded automatically
The command terraform _____ selects a workspace. terraform workspace select
When uploading with the file provisioner, the presence of a trailing slash makes the source dir _____ with destination dir. merge
A resource spec addresses a specific resource in the config using the fields resource______, resource______, and an optional .resource_____ type, name, index
When Terraform must make a change to a resource argument that cannot be updated in-place due to remote API limitations, Terraform will replace the existing object with a new one. This can be changed with the _____ lifecycle meta-argument. create_before_destroy
_____ configure where to store state and where/how to perform operations. Backends 
When an often-changed value is used in many places in the configuration, you can use _____ values. local
Local state workspaces can be found inside the _____/ directory. terraform.tfstate.d/
What arguments does the local-exec provisioner take? command, [interpreter], [environment], [working_dir]
Terraform logs are sent to stderr by default, but only if _____ is set. TF_LOG 
The _____ function convert a list to a set
toset

the command terraform _____ views the specified version constraints for all providers in the configuration. terraform providers
What is the default local state filename? terraform.tfstate
Is terraform.tfvars always automatically loaded? Yes
When using remote state, you access root module outputs using the _____ data source. terraform_remote_state
What arguments does the file provisioner take? source, destination, content
After a resource is created, a binary must be executed on your local host. The _____ provisioner does this. local-exec
Terraform log levels (TRACE, DEBUG, INFO, WARN, ERROR) are set via the _____ environment variable. TF_LOG 
Input Variables are accessible ONLY from the same module via the ____.<NAME> keyword. var.
The _____ tracks real world instances of your configuration and their metadata. state
Are workspaces equivalent to renaming your state file? Yes - with added support for remote state
A provider block can appear in any module down the line, but should ideally be kept inside the _____ module for reusability. root
The syntax of a resource is:  resource "_____" "_____"  {_____} <type> <local_name> configuration arguments
Are count and for_each meta-arguments mutually exclusive? Yes
Customize a resource's CRUD behaviour using meta-arguments inside the _____ block. lifecycle
Variables can be passed to terraform plan or terraform apply via the _____ flag. -var
The _____ provisioner copies files from localhost to the resource via ssh or winrm. file
Where do resource types come from? Providers
How to use the same provider with different configurations for different resources? alias
Variable files (.tfvars) are loaded in the CLI via the _____ flag. -var-file
The names of Terraform-specific environment variables have the prefix _____ TF_VAR_
Terraform configurations consist of a _____ module where evaluation begins and _____ modules, created when modules call each other. root child
A resource can have an inner _____ block defined, to customize how long different CRUD operations are allowed to take before they fail. Timeouts
Is .tfvars syntax just some  variable name assignments? Yes
Can remote state use HashiCorp Cloud / HashiCorp Consul? Yes
The _____ meta-argument replicates a resources into indexed, identical clones.
count
The state locks down for every state-_____ operation. state-writing
What do credential helpers do? Program custom ways to fetch credentials
_____-arguments aren't specific to any one resource type. meta-arguments
Using the file provisioner via ssh, the remote directory must already _____ exist
You can download the remote state with the terraform _____ command. terraform state pull
What's the root module? The files in the working directory
The _____ meta-argument is used to replicate infrastructure where some arguments need specific values. for_each
Every each Object has a _____ and a ____ corresponding to its particular instance. .key .value
_____ resources exist only within the local Terraform state and glue together other resources by generating random idsgenerating private keysissuing self-signed TLS certificates. local-only
A module's output values are defined via named _____ resources. output
Does Terraform local state automatically back up? Yes
Resource _____ settings have consequences - they modify the dependency graph and its traversal. Only literal values can be used because the processing happens too early.
lifecycle
Local values are defined in the _____ block. locals
The command terraform _____ creates a new workspace. terraform workspace new
Terraform logs can be sent to a desired file if its path is defined in the _____ environment variable. TF_LOG_PATH
What's a module? A container of related resources
An output value with the _____ argument set won't be shown after terraform apply (but is still visible in the state) sensitive
How to define multiple configurations for the same provider? alias
Do you work in a Workspace by default? Yes, called default
How to have multiple states? Use Workspaces
Can local values be expressions? Yes
The current workspace be inferred and used inside Terraform code logic via the _____ variable. terraform.workspace
To prevent conflicts from multiple users applying different plans on the same resources, you should _____. lock the state
What uniquely identifies a resource? Its type + name
Can empty provider blocks be omitted? Yes
You should constrain a provider's allowed versions in production via the _____ block. required_providers
Which file should you store your CLI variables in? .tfvars
Referencing a local value is done via the ____.<VALUE_NAME> keyword. local