100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Terraform Associate Exam 2024 | Over 300 Questions And Correct Answers $8.99   Add to cart

Exam (elaborations)

Terraform Associate Exam 2024 | Over 300 Questions And Correct Answers

 3 views  0 purchase
  • Course
  • Institution

Terraform Associate Exam 2024 | Over 300 Questions And Correct Answers Which of the following commands will launch the Interactive console for Terraform interpolations? terraform console When using providers that require the retrieval of data, such as the HashiCorp Vault provider, in what phas...

[Show more]

Preview 4 out of 32  pages

  • January 19, 2024
  • 32
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
avatar-seller
Terraform Associate Exam 2024 | Over 300
Questions And Correct Answers
Which of the following commands will launch the Interactive console for
Terraform interpolations?
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?
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?
Add explicit dependency using depends_on . This will ensure the correct order of
resource creation.
Which of the below backends support state locking?
- S3
- consul
- azurerm
Which of the following value will be accepted for my_var?

variable "my_var"
{
type = string
}
- 15
- '15'
After creating a new workspace "PROD" you need to run the command terraform
select PROD to switch to it.
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?
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.

,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}"
}
aws_instance.web[1].name
Terraform providers are always installed from the Internet?
False
Terraform provisioners can be added to any resource block?
True
Complete the following sentence:For local state, the workspaces are stored
directly in a ___________.
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"
}
test
A variable az has the following default value.
What will be the datatype of the variable?
az=["us-west-1a","us-east-1a"]
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?
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.
True
The terraform.tfstate file always matches your currently built infrastructure.
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?
- 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?
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?
provisioner "local-exec" { on_failure = "continue" }
You should store secret data in the same version control repository as your
Terraform configuration.
False
What is the default backend for Terraform?
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?
- 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?
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" }
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?
Local Values
Terraform provisioner must be nested inside a resource configuration block.
True
ABC Enterprise has recently tied up with multiple small organizations for
exchanging database information. Due to this, the firewall rules are increasing
and are more than 100 rules. This is leading firewall configuration file that is

, difficult to manage. What is the way this type of configuration can be managed
easily?
Dynamic Blocks
What are some of the problems of how infrastructure was traditionally managed
before Infrastructure as Code?
- Traditional deployment methods are not able to meet the demands of the modern
business where resources tend to live days to weeks, rather than months to years
- Traditionally managed infrastructure can't keep up with cyclic or elastic applications
- Requests for infrastructure or hardware required a ticket, increasing the time required
to deploy applications
You have configured an Auto Scaling group in AWS to automatically scale the
number of instances behind a load balancer based on the instances CPU
utilization. The instances are configured using a Launch Configuration. You have
observed that the Auto Scaling group doesn't successfully scale when you apply
changes that require replacing the Launch Configuration. Why is this happening?
You need to configure the Launch Configuration's create_before_destroy meta-
parameter.
The terraform init command is always safe to run multiple times, to bring the
working directory up to date with changes in the configuration. Though
subsequent runs may give errors, this command will never delete your existing
configuration or state.
True
Terraform Enterprise currently supports running under which the following
operating systems?
- Ubuntu
- Amazon Linux
- Debian
- CentOS
- Red Hat Enterprise Linux
- Oracle Linux
You need to deploy resources into two different cloud regions in the same
Terraform configuration. To do that, you declare multiple provider configurations
as follows:
provider "aws" {
region = "us-east-1"
}

provider "aws" {
alias = "west"
region = "us-west-2"
}

What meta-argument do you need to configure in a resource block to deploy the
resource to the "us-west-2" AWS region?
alias = west
Which of the following clouds does not have a provider maintained by Hashicorp

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 LectDan. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67866 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
$8.99
  • (0)
  Add to cart