Terraform Flashcards
What relationship does “infrastructure as code” have to source control?
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.
What does “HCL” stand for?
Hashicorp Configuration Language
Describe how Terraform is idempotent
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.
What are the four fundamental parts of terraform?
- The executable (written in go, available on all platforms)
- Terraform files
- Plugins
- Terraform state files
How would you manage credentials used in terraform configuration? Where would they be stored?
In variables, which are specific to the running machine. That would not be stored inside the terraform files as this is insecure.
What is a “provider” in the context of terraform?
A cloud-infrastructure provider, such as Azure or AWS
What is “data” in the context of a terraform deployment
Each provider can provide lists of resources that are specific to its functioning, such as availability zones in Azure and AWS.
What is a “resource” in the context of a terraform deployment
This is one of the infrastructure entities that the provider permits a user to requisition
What is an “output” in the context of a terraform deployment
This is a variable from the deployment which will be output once the deployment is finished. IP addresses and hostnames are common outputs
What type of resource do you require if you want a lambda resource to receive events from Kinesis, DynamoDB, SQS or MSK?
An aws_lambda_event_source_mapping