100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Terraform Associate Exam Guide Questions and CORRECT Answers $9.99   Add to cart

Exam (elaborations)

Terraform Associate Exam Guide Questions and CORRECT Answers

 6 views  0 purchase
  • Course
  • Terraform Associate
  • Institution
  • Terraform Associate

Terraform Associate Exam Guide Questions and CORRECT Answers Which of the following commands will launch the Interactive console for Terraform interpolations? - CORRECT ANSWER- terraform console When using providers that require the retrieval of data, such as the HashiCorp Vault provider, i...

[Show more]

Preview 4 out of 46  pages

  • August 19, 2024
  • 46
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Terraform Associate
  • Terraform Associate
avatar-seller
MGRADES
Terraform Associate Exam Guide Questions
and CORRECT Answers

Which of the following commands will launch the Interactive console for Terraform
interpolations? - CORRECT ANSWER- terraform console


When using providers that require the retrieval of data, such as the HashiCorp Vault provider,
in what phase does Terraform actually retrieve the data required? - CORRECT ANSWER-
terraform init


resource "aws_s3_bucket" "example" {
bucket = "my-test-s3-terraform-bucket" ...
}
resource "aws_iam_role" "test_role" {
name = "test_role" ...
}


Due to the way that the application code is written , the s3 bucket must be created before the
test role is created , otherwise there will be a problem.
How can you ensure that? - CORRECT ANSWER- Add explicit dependency using
depends_on . This will ensure the correct order of resource creation.


Which of the below backends support state locking? - CORRECT ANSWER- - S3
- consul
- azurerm


Which of the following value will be accepted for my_var?


variable "my_var"
{
type = string

,} - CORRECT ANSWER- - 15
- '15'


After creating a new workspace "PROD" you need to run the command terraform select
PROD to switch to it. - CORRECT ANSWER- False


Your manager has instructed you to start using terraform for your day-to-day operations, but
your security team is concerned about the terraform state files.
They have heard it contains confidential information, and are worried that it will not be
securely protected.
What should be your response to the security team in this regard? - CORRECT ANSWER-
Ensure that the state is managed in a remote backend, preferably an enterprise grade state
management system like Terraform Cloud.


Terraform can run on Windows or Linux, but it requires a Server version of the Windows
operating system. - CORRECT ANSWER- False


How would you reference the "name" value of the second instance of this fictitious resource?
resource "aws_instance" "web" {
count = 2
name = "terraform-${count.index}"
} - CORRECT ANSWER- aws_instance.web[1].name


Terraform providers are always installed from the Internet? - CORRECT ANSWER- False


Terraform provisioners can be added to any resource block? - CORRECT ANSWER- True


Complete the following sentence:For local state, the workspaces are stored directly in a
___________. - CORRECT ANSWER- directory called terraform.tfstate.d


What is the name assigned by Terraform to reference this resource?
resource "azurerm_resource_group" "dev" {
name = "test"

,location = "westus"
} - CORRECT ANSWER- test


A variable az has the following default value.
What will be the datatype of the variable?
az=["us-west-1a","us-east-1a"] - CORRECT ANSWER- List


Your developers are facing a lot of problem while writing complex expressions involving
difficult interpolations . They have to run the terraform plan every time and check whether
there are errors , and also check terraform apply to print the value as a temporary output for
debugging purposes.


What should be done to avoid this? - CORRECT ANSWER- Use terraform console
command to have an interactive UI with full access to the underlying terraform state to run
your interpolations , and debug at real-time.


Provisioners should only be used as a last resort. - CORRECT ANSWER- True


The terraform.tfstate file always matches your currently built infrastructure. - CORRECT
ANSWER- False


You have provisioned some aws resources in your test environment through Terraform for a
POC work. After the POC, now you want to destroy the resources but before destroying them
you want to check what resources will be getting destroyed through terraform. what are the
options of doing that? - CORRECT ANSWER- - Use terraform plan -destroy command.
- Use terraform destroy command


You have a simple Terraform configuration containing one virtual machine (VM) in a cloud
provider. You run terraform apply and the VM is created successfully.
What will happen if you delete the VM using the cloud provider console, and run terraform
apply again without changing any Terraform code? - CORRECT ANSWER- Terraform will
not make any changes

, By default, provisioners that fail will also cause the Terraform apply itself to error. How can
you change this default behavior within a provisioner? - CORRECT ANSWER- provisioner
"local-exec" { on_failure = "continue" }


You should store secret data in the same version control repository as your Terraform
configuration. - CORRECT ANSWER- False


What is the default backend for Terraform? - CORRECT ANSWER- local


Talal is a DevOps engineer and he has deployed the production infrastructure using
Terraform. He is using a very large configuration file to maintain and update the actual
infrastructure.
As the infrastructure have grown to a very complex and large, he has started experiencing
slowness when he run runs terraform plan. What are the options for him to resolve this
slowness? - CORRECT ANSWER- - Use -refresh=false flag as well as the -target flag with
terraform plan in order to work around this.
- Break large configurations into several smaller configurations that can each be
independently applied.


Which of the following represents a feature of Terraform Cloud that is NOT free to
customers? - CORRECT ANSWER- Roles and Team Management


Your team has started using terraform OSS in a big way, and now wants to deploy multi
region deployments (DR) in aws using the same terraform files.
You want to deploy the same infra (VPC,EC2 ...) in both us-east-1 ,and us-west-2 using the
same script , and then peer the VPCs across both the regions to enable DR traffic. But , when
you run your script , all resources are getting created in only the default provider region.
What should you do? Your provider setting is as below -
# The default provider configuration provider "aws" { region = "us-east-1" } - CORRECT
ANSWER- Use provider alias functionality , and add another provider for us-west region .
While creating the resources using the tf script , reference the appropriate provider (using the
alias).


John is writing a module and within the module, there are multiple places where he has to use
the same conditional expression but he wants to avoid repeating the same values or
expressions multiple times in a configuration,. What is a better approach to dealing with this?
- CORRECT ANSWER- Local Values

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller MGRADES. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

83507 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.99
  • (0)
  Add to cart