base Flashcards

(19 cards)

1
Q

Name all provisioner types

A
  1. Creation-time provisioner
  2. Destroy-time provisioner
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where would you use a provisioner?

A

In a resource block

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

What is state?

A

Maps real-world resources to terraform configuration

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

How is dependency metadata tracked?

A

State file track dependency metadata

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

Name 3 terraform state commands:

A
  1. terraform state list
  2. terraform state show <resource></resource>
  3. terraform state rm <resource></resource>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Name advantages of storing state remotely:

A
  • enables distributed teams
  • security rules -> granular access
  • allows locking state so parallel executions don’t coincide
  • enables sharing “output” values with other Terraform configuration or code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

terraform init fails with remote state (S3). Why?

A

S3 bucket does not exist (must exist before init execution)

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

What is a module?

A

a module is a container for multiple resources that are used together

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

How can you download a module?

A
  1. Terraform Public Registry
  2. private registry
  3. local system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

modules can optionally take input and provide outputs to plug back into your main code. True?

A

True

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

the outputs declared inside Terraform module code can be fed back into the root module or your main code. True?

A

True

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

Name all primitive types:

A
  1. string
  2. number
  3. bool
    (4. any)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What complex types are there?

A
  1. Collection type
  2. Structural type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define collection type

A

Collection types allow multiple values of one primitive type to be grouped together

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

Define structural type

A

A structured type allows multiple values of different types

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

Name all collection types:

17
Q

Name all structural types

A
  1. object(type)
  2. tuple(type)
18
Q

Name all block types that support dynamic blocks:

A
  • resource
  • data
  • provider
  • provisioner
19
Q

Where can dynamic blocks not be used?

A

Dynamic blocks CANNOT be used with lifecycle blocks