100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Terraform Associate Exam 2023 with complete solution;(TA-002-P HashiCorp Certified)

Beoordeling
-
Verkocht
-
Pagina's
31
Cijfer
A+
Geüpload op
21-04-2023
Geschreven in
2022/2023

Terraform Associate Exam 2023 with complete solution;(TA-002-P HashiCorp Certified) 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.

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Terraform Associate Exam 2023 with complete solution;
(TA-002-P HashiCorp Certified)
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
IBM Cloud
Which of the below terraform commands do not run terraform refresh before taking
actual action of the command
- terraform init
- terraform import

Geschreven voor

Vak

Documentinformatie

Geüpload op
21 april 2023
Aantal pagina's
31
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
magdamwikash23 Western Governers University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
112
Lid sinds
3 jaar
Aantal volgers
94
Documenten
5328
Laatst verkocht
2 maanden geleden
Magda

NURSING STUDY GUIDES/EXAMS AND NOTES ALL VERIFIED BY EXPERTS All my uploaded documents, exams and essays are verified by relevant experts.I can assure an A or at least 90% if you use any of my documents.

3.9

14 beoordelingen

5
7
4
2
3
2
2
2
1
1

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen