Terraform
Terraform is a “Infrastructure as Code” tool for building, changing, and versioning infrastructure safely and efficiently. Terraform was developed by Hashicorp in July 2014. It uses its own langugage called Hashicorp Configuration Language (HCL) that helps you codify your infrastructure. The rich features of Terraform are inclined towards provisioning rather than the management which makes it a numero uno tool for provisioning infrastructure.
Take our Terraform assessment to check your understanding of the widely used IaC tool for infrastructure automation across organizations and earn rewards. Click the Rewards tab for eligibility requirements.
Read FAQs tab carefully for Instructions before beginning the assessment.
NYXPoints are used to generate the Leaderboard (coming soon). They are awarded for achieving a certain score.
- 200 nyxpoints for a passing score of 80% or more
- 300 nyxpoints for a perfect score of 100%
- Didn’t pass? You still get 30 nyxpoints for attempting the assesment
IMPORTANT instructions for taking the Assessment
- The timer starts when you click Start Assessment
- DO NOT refresh/reload the page or use the back button to navigate away from the page.
- Navigating away from the assessment page DOES NOT stop/pause the timer and the will restart the assessment when you come back to it. The answers are NOT saved.
General
- There are NO pre-requisites to take this assessment. Take this assessment even if you are completely new to Linux.
- The assessment is completely FREE.
- Preferably take it in a closed book mode.
- DO NOT copy/paste, share or upload questions elsewhere.
Eligible Rewards
300 NyxCoins*
* NyxCoins vary on score
Assessment Summary
0 of 30 Questions completed
Questions:
Information
You have already completed the assessment before. Hence you can not start it again.
Assessment is loading…
You must sign in or sign up to start the assessment.
You must first complete the following:
Results
Results
0 of 30 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 30
1. Question
How do you reference the Azure resource group ID from the Data Source given below?
data “azurerm_resource_group” “az_resource_group” {
name = “dev-resource-group”
}
CorrectIncorrect -
Question 2 of 30
2. Question
Which of the following is NOT a valid value type in Terraform?
CorrectIncorrect -
Question 3 of 30
3. Question
Which command is used to reformat configuration files in a standard format for easy readability and consistency?
CorrectIncorrect -
Question 4 of 30
4. Question
If you have to remove the lock on the state for your current configuration, which of the following Terraform sub-command would you use?
CorrectIncorrect -
Question 5 of 30
5. Question
Which of the following is NOT accepted as a Terraform variable name?
CorrectIncorrect -
Question 6 of 30
6. Question
terraform taint command is used to?
CorrectIncorrect -
Question 7 of 30
7. Question
What does the terraform validate command validate in the Terraform configuration files?
CorrectIncorrect -
Question 8 of 30
8. Question
Let’s say you configure two provider blocks for two different regions of AWS in your providers.tf configuration file, how would you create a VPC in each environment?
provider “aws” {
alias = “usw1”,
region = “us-west-1”
}
provider “aws” {
alias = “usw2”,
region = “us-west-2”
}
CorrectIncorrect -
Question 9 of 30
9. Question
Out of the below configuration files, which file would Terraform automatically pick to load the variable values?
CorrectIncorrect -
Question 10 of 30
10. Question
Which command would you use to prepare the Terraform working directory?
CorrectIncorrect -
Question 11 of 30
11. Question
How do you check the current state of the provisioned infrastructure?
CorrectIncorrect -
Question 12 of 30
12. Question
Name the provisioner which invokes a process on the machine running Terraform.
CorrectIncorrect -
Question 13 of 30
13. Question
Which of the following action cannot be performed by terraform apply command?
CorrectIncorrect -
Question 14 of 30
14. Question
What does the below terraform configuration block indicate?
terraform {
required_providers {
aws = {
version = “>= 2.7.0”
source = “hashicorp/aws”
}
}
}
CorrectIncorrect -
Question 15 of 30
15. Question
If an infrastructure configuration is destroyed manually on the cloud console, what is the best practice to reflect this change in Terraform?
CorrectIncorrect -
Question 16 of 30
16. Question
Terraform takes the ______________ approach to provision your infrastructure.
CorrectIncorrect -
Question 17 of 30
17. Question
Which of the following block would you use to construct a collection of nested configuration blocks?
CorrectIncorrect -
Question 18 of 30
18. Question
A terraform variable named availability_zone_names is declared as given below, but which of the following variable arguments are mandatory to declare the variable?
variable “availability_zone_names” {
type = list(string)
default = [“us-west-1a”]
description = “A list of availability zone names”
}
CorrectIncorrect -
Question 19 of 30
19. Question
Where does Terraform store the state of the configuration by default?
CorrectIncorrect -
Question 20 of 30
20. Question
Which parameter would you use to declare a variable if you don’t want to expose the variable value while performing terraform apply?
CorrectIncorrect -
Question 21 of 30
21. Question
What is the name of the terraform file which stores the state of the infrastructure?
CorrectIncorrect -
Question 22 of 30
22. Question
What would be the value of local.name as per the following Terraform locals block?
locals {
name = lookup({a=”Thinknyx”, b=”Technologies”}, “c”, “TAP”)
}
CorrectIncorrect -
Question 23 of 30
23. Question
What is the extension of the Terraform configuration files?
CorrectIncorrect -
Question 24 of 30
24. Question
What would the terraform refresh command do if there are any manual changes in your infrastructure?
CorrectIncorrect -
Question 25 of 30
25. Question
Which of the following file formats are supported by Terraform?
CorrectIncorrect -
Question 26 of 30
26. Question
Which VCS providers are supported by Terraform cloud other than Git?
CorrectIncorrect -
Question 27 of 30
27. Question
How would you declare a Terraform variable named default_region as environment variable?
CorrectIncorrect -
Question 28 of 30
28. Question
In which of the following scenarios, we can NOT use dynamic blocks in Terraform?
CorrectIncorrect -
Question 29 of 30
29. Question
What is the output of the command ‘$ echo var.name | terraform console ‘ as per the below Terraform variable block?
variable “name” {
type = string
sensitive = false
default = “non_sensitive_name”
}
CorrectIncorrect -
Question 30 of 30
30. Question
How to enable detailed logging in Terraform?
CorrectIncorrect