terraform Flashcards Preview

DEVOPS > terraform > Flashcards

Flashcards in terraform Deck (14):
1

How do you test what infrastructure will be built, without executing the actual infrastructure provision process

terraform plan

2

Consider these 2 commands: what are the benefits

terraform plan -out changes.terraform
terraform apply changes.terraform

it is a safer way to run rather than plan and apply because it will not regenerate the plan file and therefore you know what you are deploying

3

What is the difference between a variable and a datasource?

variables are static, and datasources are dynamic

4

What is local provisioning?

a shell script that will be executed on the host where terraform apply is running

5

Where does terraform by default saves its remote state?

terraform.tfstate

6

what are the Terraform command aguments (7)

plan, apply, destroy, show - push, taint, untaint

7

what is a terraform provider

A provider is responsible for understanding API interactions and exposing resources.

8

what would you use a variable file in terraform

one location to make changes, hide secrets, and add variable file to .gitignore

9

what is a provisioner

Provisioners are used to execute scripts on a local or remote machine as part of resource creation or destruction. Provisioners can be used to bootstrap a resource, cleanup before destroy, run configuration management

10

what are the provisioner options

chef, connection, file, local-exec, remote-exec, null resource, salt masterless

11

what is a terraform module

Modules in the Terraform ecosystem are a way to organize the code to: 
• be more reusable
• avoid code duplication
• improve the code organization and its readability
If we compare them to a programming language, writing a Terraform module is the equivalent of writing a function and calling it many times with different parameters.

12

resources vs datasources

resource is used to create a resource object, data is used to gather dynamic data and populate a variable

13

command: How do you test what infrastructure will be build, without executing the actual infrastructure provision process

terraform plan

14

What is terraform not?

a software config management tool