and Conceptual Actual Frequently Tested
Exam Questions With Reviewed 100% Correct
Detailed Answers
Guaranteed Pass!!Current Update!!
1. Which of the following is a valid variable name in Terraform?
1.count
2.245
3.invalid
4. module - ANSWER invalid
2. Environment variables can be used to set the value of input variables. The
environment variables must be in the format "____"_<variablename>.
Select the correct prefix string from the following list.
1.TF_ENV_VAR
2.TF_ENV
3.TF_VAR
4.TF_VAR_VALUE - ANSWER TF_VAR
3. You are adding a new variable to your configuration. Which of the following is
NOT a valid variable type in Terraform?
,1. float
2. number
3. string
4. map
5. bool - ANSWER float
4. As an example, you want to change data-bucket to now be prod-encrypted-
data-s3-bucket in the following resource block:
resource "aws_s3_bucket" "data-bucket" {
bucket = "corp-production-data-bucket"
tags = {
Name = "corp-production-data-bucket"
Environment = "prod"
}
}
After updating the resource block, what command would you run to update the
local name while ensuring Terraform does not replace the existing resource?
1. terraform apply -refresh-only
2. terraform apply -replace aws_s3_bucket.data-bucket
3. terraform state rm aws_s3_bucket.data-bucket
,4. terraform state mv aws_s3_bucket.data-bucket aws_s3_bucket.prod-encrypted-
data-s3-bucket - ANSWER 4. terraform state mv aws_s3_bucket.data-bucket
aws_s3_bucket.prod-encrypted-data-s3-bucket
Harry has deployed resources on Azure using Terraform. However, he has
discovered that his co-workers Ron and Ginny have manually created a few
resources using the Azure console. Since it is company policy to manage
production workloads using IaC, how can Harry bring these resources under
Terraform management without negatively impacting the availability of the
deployed resources?
1. use terraform import to import the existing resources under Terraform
management
2. resources created outside of Terraform cannot be managed by Terraform
3. run a terraform get to retrieve other resources that are not under Terraform
management
4. rewrite the Terraform configuration file to deploy new resources, run a
terraform apply, and migrate users to the newly deployed resources. Manually
delete the other resources created by Ron and Ginny. - ANSWER use terraform
import to import the existing resources under Terraform management
After many years of using Terraform Open Source (OSS), you decide to migrate to
Terraform Cloud. After the initial configuration, you create a workspace and
, migrate your existing state and configuration. What Terraform version would the
new workspace be configured to use after the migration?
1. the most recent version of Terraform available
2. the latest major release of Terraform
3. the same Terraform version that was used to perform the migration
4. whatever version is defined in the terraform block - ANSWER the same
Terraform version that was used to perform the migration
Henry has been working on automating his Azure infrastructure for a new
application using Terraform. His application runs successfully, but he has added a
new resource to create a DNS record using the new Infoblox provider. He has
added the new resource but gets an error when he runs a terraform plan.
What should Henry do first before running a plan and apply?
1. you can't mix resources from different providers within the same configuration
file, so Henry should create a module for the DNS resource and reference it from
the main configuration
2. Henry should run a terraform plan -refresh=true to update the state for the new
DNS resource