Aws Terraform Flashcards

1
Q

A List data type must have all

A

Records of the same data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Eval precedence (6)

A

TF_VAR_environment variable
.tfvars || .tfvars.json
.auto.tfvars || .auto.tfvars.json
-var-file flag
-var flag
CLI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Primitive data types in terraform

A

String
Number
Boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Collection data types in terraform

A

List
Ordered
Map
Key: value
Set
Unordered

Must all have same data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Structural data type

A

Can mix data types

Tuple
Like list
Object
Like map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to Stay on major version with

A

~>4.0

Will stay on version 4 release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where are terraform tokens stored for login?

A

By default API tokens are stored in plain text in a local cli configuration called credentials.tfrc.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is infrastructure as code?

A

Written configuration script to automate creating, updating, and destroying cloud infrastructure.

Blueprint of your iac

Allows to easily share, version, inventory cloud infrastructure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are 3 declarative IsC tools?

A

Terraform
ARM Templates
Cloud Formation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which is less verbose and could end up with misconfiguration

A

Imperative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

YAML, JSON, XML

A

Is declarative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to detect drift

A

Storing expected state in terraform state file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Allows you to execute commands on a target resource after a response is provisioned

A

Remote-exec

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

3 modes of remote-exec

A

Inline: list of command strings
Script: relative or absolute local script that will be copied to a remote resource and executed
Scripts: same as above but many

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

File provisioner

A

Copy files or directories from local machine to newly created one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Null resource

A

Null_resource is a placeholder that have no specific associated provider resources.

Can use to provide a connection to triggers to a resource

Triggers is a map of values which should cause the set of providers to re run.

Values are meant to be interpolated

17
Q

Count and for_each

A

Count creates a list
For_each creates a map