Terraform Flashcards

1
Q

What relationship does “infrastructure as code” have to source control?

A

Infrastructure code should be checked into a source control system, and each time the source control system is updated the infrastructure should be updated too.

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

What does “HCL” stand for?

A

Hashicorp Configuration Language

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

Describe how Terraform is idempotent

A

Terraform commands are aware of the state of the target system, and if it matches the configuration they won’t re-deploy services. This means you do not need to guard new check-ins to the terraform configuration.

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

What are the four fundamental parts of terraform?

A
  • The executable (written in go, available on all platforms)
  • Terraform files
  • Plugins
  • Terraform state files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would you manage credentials used in terraform configuration? Where would they be stored?

A

In variables, which are specific to the running machine. That would not be stored inside the terraform files as this is insecure.

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

What is a “provider” in the context of terraform?

A

A cloud-infrastructure provider, such as Azure or AWS

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

What is “data” in the context of a terraform deployment

A

Each provider can provide lists of resources that are specific to its functioning, such as availability zones in Azure and AWS.

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

What is a “resource” in the context of a terraform deployment

A

This is one of the infrastructure entities that the provider permits a user to requisition

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

What is an “output” in the context of a terraform deployment

A

This is a variable from the deployment which will be output once the deployment is finished. IP addresses and hostnames are common outputs

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

What type of resource do you require if you want a lambda resource to receive events from Kinesis, DynamoDB, SQS or MSK?

A

An aws_lambda_event_source_mapping

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