Pre-Summer Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: cramtick70

Terraform-Associate-004 HashiCorp Certified: Terraform Associate (004) (HCTA0-004) Questions and Answers

Questions 4

Which parameters does the import block require? (Pick the 2 correct responses below.)

Options:

A.

The resource ID

B.

Provider

C.

The target resource address

D.

Backend

Buy Now
Questions 5

Which of the following is not a valid Terraform collection type?

Options:

A.

Tree

B.

Map

C.

List

D.

set

Buy Now
Questions 6

Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

Options:

A.

Terraform state show ‘ provider_type_name

B.

Terraform state list

C.

Terraform get provider_type_name

D.

Terraform state list provider_type_name

Buy Now
Questions 7

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 terraform apply again immediately afterward without changing any Terraform code?

Options:

A.

Terraform will terminate and recreate the VM.

B.

Terraform will create another duplicate VM.

C.

Terraform will apply the VM to the state file.

D.

Nothing

Buy Now
Questions 8

What does terraform destroy do?

Options:

A.

Destroys all infrastructure in the Terraform state file.

B.

Destroys all Terraform code files in the current directory, leaving the state file intact.

C.

Destroys all infrastructure in the configured Terraform provider.

D.

Destroys the Terraform state file, leaving the infrastructure intact.

Buy Now
Questions 9

You want to use API tokens and other secrets within your team ' s Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick 3)

Options:

A.

In a plaintext document on a shared drive.

B.

In a terraform.tfvars file, checked into version control.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

E.

In HashiCorp Vault.

Buy Now
Questions 10

You manage two workspaces in your HCP Terraform organization. The first workspace manages your network configuration. The second workspace manages your compute resources and retrieves values from the networking workspace.

What HCP Terraform feature lets you run an apply operation on the compute workspace every time you update the networking workspace?

Options:

A.

Run triggers

B.

Policy

C.

Run tasks

D.

Projects

Buy Now
Questions 11

Which statements are true about terraform apply ? (Choose TWO correct answers)

Options:

A.

Depending on the provider specification, Terraform may need to destroy and recreate your infrastructure resources.

B.

It only operates on infrastructure defined in the current working directory or workspace.

C.

You must pass the output of a terraform plan command to it.

D.

By default, it does not refresh your state file to reflect the current infrastructure configuration.

E.

You cannot target specific resources for the operation.

Buy Now
Questions 12

Which statement describes a goal of Infrastructure as Code (IaC)?

Options:

A.

A pipeline process to test and deliver software.

B.

Write once, run anywhere.

C.

The programmatic configuration of resources.

D.

Defining a vendor-agnostic API.

Buy Now
Questions 13

Why does this backend configuration not follow best practices?

Options:

A.

An alias meta-argument should be included in backend blocks whenever possible

B.

You should use the local enhanced storage backend whenever possible

C.

You should not store credentials in Terraform configuration

D.

The backend configuration should contain multiple credentials so that more than one user can execute terraform plan and terraform apply

Buy Now
Questions 14

All modules published on the official Terraform Module Registry have been verified by HasihCorp.

Options:

A.

True

B.

False

Buy Now
Questions 15

You can define multiple backend blocks in your Terraform configuration to store your state in multiple locations.

Options:

A.

True

B.

False

Buy Now
Questions 16

Which option cannot be used to keep secrets out of Terraform configuration files?

Options:

A.

A Terraform provider

B.

Environment variables

C.

A -var flag

D.

secure string

Buy Now
Questions 17

Outside of the required_providers block, Terraform configurations always refer to providers by their local names.

Options:

A.

True

B.

False

Buy Now
Questions 18

When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?

Options:

A.

You can import infrastructure without corresponding Terraform code

B.

Terraform will generate the corresponding configuration files for you

C.

Before you run terraform Import

D.

After you run terraform import

Buy Now
Questions 19

Terraform providers are always installed from the Internet.

Options:

A.

True

B.

False

Buy Now
Questions 20

What is the provider for the resource shown in the Exhibit?

resource " aws_vpc " " main " {

name = " test "

}

Options:

A.

VPC

B.

test

C.

main

D.

aws

Buy Now
Questions 21

You want to use API tokens and other secrets within your team ' s Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick the 3 correct responses)

Options:

A.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

B.

In HashiCorp Vault.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In a terraform.tfvars file, checked into your version control system.

E.

In a plaintext document on a shared drive.

Buy Now
Questions 22

Which of the following does HCP Terraform perform during a health assessment for a workspace?

Pick the 2 correct responses below:

Options:

A.

Terraform test execution

B.

Check block validation

C.

Estimate infrastructure cost

D.

Resource drift detection

E.

Sentinel policy checks

Buy Now
Questions 23

_______backends support state locking.

Options:

A.

All

B.

No

C.

Some

D.

Only local

Buy Now
Questions 24

Your team adopts AWS CloudFormation as the standardized method for provisioning public cloud resources.

Which scenario presents a challenge for your team?

Options:

A.

Building a reusable codebase that can deploy resources into any AWS region.

B.

Managing a new application stack built on AWS-native services.

C.

Deploying new infrastructure into Microsoft Azure.

D.

Automating a manual, web console-based provisioning process.

Buy Now
Questions 25

Terraform encrypts sensitive values stored in your state file.

Options:

A.

True

B.

False

Buy Now
Questions 26

How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?

Options:

A.

aws_instance.example.ebs_block_device[sda2,sda3).volume_id

B.

aws_lnstance.example.ebs_block_device.[*].volume_id

C.

aws_lnstance.example.ebs_block_device.volume_ids

D.

aws_instance.example-ebs_block_device.*.volume_id

Buy Now
Questions 27

How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?

Options:

A.

It can execute Terraform runs on dedicated infrastructure in Terraform Cloud

B.

It doesn ' t show the output of a terraform apply locally

C.

It is only arable lo paying customers

D.

All of the above

Buy Now
Questions 28

Terraform configuration (including any module references) can contain only one Terraform provider type.

Options:

A.

True

B.

False

Buy Now
Questions 29

terraform apply will fail if you have not run terraform plan first to update the plan output.

Options:

A.

True

B.

False

Buy Now
Questions 30

Which command must you first run before performing further Terraform operations in a working directory?

Options:

A.

terraform import

B.

terraform workspace

C.

terraform plan

D.

terraform init

Buy Now
Questions 31

Which of these are features of Terraform Cloud? Choose two correct answers.

Options:

A.

A web-based user interface (Ul)

B.

Automated infrastructure deployment visualization

C.

Automatic backups

D.

Remote state storage

Buy Now
Questions 32

Exhibit:

resource " kubernetes_namespace " " example " {

name = " test "

}

A resource block is shown in the exhibit. How would you reference the name attribute of this resource in HCL?

Options:

A.

kubernetes_namespace.example,name

B.

kubernetes_namespace.test.name

C.

data.kubernetes_namespace.name

D.

resource.kubernetes_namespace.example.name

Buy Now
Questions 33

You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

Options:

A.

True

B.

False

Buy Now
Questions 34

You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes, you updated the Terraform code to change the port to 443.

You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended and step away to grab some coffee.

In the meantime, another team member manually changes the load balancer port to 443 through the cloud provider console before you get back to your desk.

What will happen when you run terraform apply upon returning to your desk?

Options:

A.

Terraform will recreate the load balancer.

B.

Terraform will fail with an error because the state file is no longer accurate.

C.

Terraform will change the load balancer port to 80, and then change it back to 443.

D.

Terraform will not make any changes to the load balancer and will update the state file to reflect the manual change.

Buy Now
Questions 35

You have to initialize a Terraform backend before it can be configured.

Options:

A.

True

B.

False

Buy Now
Questions 36

Exhibit.

You need to deploy resources into two different regions in the same Terraform configuration. To do this, you declare multiple provider configurations as shown in the Exhibit space on this page.

What meta-argument do you need to configure in a resource block to deploy the resource to the us-west-2 AWS region?

Options:

A.

provider = aws.west

B.

alias = aws.west

C.

provider = west

D.

alias = west

Buy Now
Questions 37

Before you can use a remote backend, you must first execute terra-form init.

Options:

A.

True

B.

False

Buy Now
Questions 38

What is one disadvantage of using dynamic blocks in Terraform?

Options:

A.

Dynamic blocks can construct repeatable nested blocks

B.

Terraform will run more slowly

C.

They cannot be used to loop through a list of values

D.

They make configuration harder to read and understand

Buy Now
Questions 39

You’ve just finished refactoring part of your Terraform workspace’s configuration to use a module to manage some of your resources. When you plan your changes, you notice that Terraform will destroy and recreate the affected resources. Doing so could cause unintended downtime in the application your workspace manages. What supported approach should you take to complete the refactor without destroying and recreating your resources?

Options:

A.

Add moved blocks to your configuration to let Terraform know the new resource addresses for the affected resources.

B.

Run the terraform console command to edit your workspace ' s state and update the resource names.

C.

Manually edit your terraform.tfstate file and update the resource names.

D.

Open your cloud provider ' s console and rename the affected resources.

Buy Now
Questions 40

You much initialize your working directory before running terraform validate.

Options:

A.

True

B.

False

Buy Now
Questions 41

A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?

Options:

A.

resource.kubernetes_namespace.example.name

B.

kubernetes_namespace.example.name

C.

data.kubernetes.namespace.name

D.

kubernetes_namespace.test.name

Buy Now
Questions 42

You need to destroy all of the resources in your Terraform workspace, except for aws_instance.ubuntu[1], which you want to keep. How can you tell Terraform to stop managing that specific resource without destroying it?

Options:

A.

Remove the resource block from your configuration.

B.

Change the value of the count argument on the resource.

C.

Run terraform state rm aws_instance.ubuntu[1].

D.

Use a moved block.

Buy Now
Questions 43

What task does the terraform import command perform?

Options:

A.

Imports resources from one Terraform state file to another.

B.

Imports existing resources into Terraform ' s state file.

C.

Imports a new Terraform module into Terraform ' s state file.

D.

Imports all infrastructure from the configured cloud provider.

E.

Imports provider configuration from one state file to another.

Buy Now
Questions 44

Changing the Terraform backend from the default " local " backend to a different one after performing your first terrafom apply is:

Options:

A.

Optional

B.

Impossible

C.

Mandatory

D.

Discouraged

Buy Now
Questions 45

The public Terraform Module Registry is free to use.

Options:

A.

True

B.

False

Buy Now
Questions 46

Which of the following should you put into the required_providers block?

Options:

A.

version > = 3.1

B.

version = “ > = 3.1”

C.

version ~ > 3.1

Buy Now
Questions 47

As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?

Options:

A.

terraform refresh -upgrade

B.

terraform apply -upgrade

C.

terraform init -upgrade

D.

terraform providers -upgrade

Buy Now
Questions 48

While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform ' s logging more verbose?

Options:

A.

TF_LOG_PAIH

B.

TF_LOG

C.

TF_VAR_log_path

D.

TF_VAR_log_level

Buy Now
Questions 49

You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?

Options:

A.

terraform get

B.

terraform refresh

C.

terraform import

D.

terraform init

Buy Now
Questions 50

Which of the following should you add in the required_providers block to define a provider version constraint?

Options:

A.

version ~ > 3.1

B.

version > = 3.1

C.

version = " > = 3.1 "

Buy Now
Questions 51

Define the purpose of state in Terraform.

Options:

A.

State maps real world resources to your configuration and keeps track of metadata

B.

State lets you enforce resource configurations that relate to compliance policies

C.

State stores variables and lets you quickly reuse existing code

D.

State codifies the dependencies of related resources

Buy Now
Questions 52

If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

Options:

A.

True

B.

False

Buy Now
Questions 53

You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?

Options:

A.

Run terraform refresh.

B.

Run terraform init -upgrade.

C.

Run terraform apply -upgrade.

D.

Upgrade your version of Terraform.

Buy Now
Questions 54

Which provider authentication method prevents credentials from being stored in the state file?

Options:

A.

Using environment variables

B.

Specifying the login credentials in the provider block

C.

Setting credentials as Terraform variables

D.

None of the above

Buy Now
Questions 55

You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.

Which variable type could you use for this input?

Options:

A.

List

B.

Object

C.

Map

D.

Terraform does not support complex input variables of different types

Buy Now
Questions 56

terraform init creates an example main.tf file in the current directory.

Options:

A.

True

B.

False

Buy Now
Questions 57

What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?

Options:

A.

The ability to share modules publicly with any user of Terraform

B.

The ability to restrict modules to members of Terraform Cloud or Enterprise organizations

C.

The ability to tag modules by version or release

D.

The ability to share modules with public Terraform users and members of Terraform Cloud Organizations

Buy Now
Questions 58

Terraform providers are part of the Terraform core binary.

Options:

A.

True

B.

False

Buy Now
Questions 59

Where can Terraform not load a provider from?

Options:

A.

Plugins directory

B.

Provider plugin chance

C.

Official HashCrop Distribution on releases.hashcrop.com

D.

Source code

Buy Now
Questions 60

You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running the command terraform apply my.tfplan , you receive the error shown in the exhibit below.

Exhibit:

Error: Saved plan is stale

The given plan file can no longer be applied because the state was changed by another operation after the plan was created.

How can you apply the desired changes? (Choose TWO correct answers)

Options:

A.

Update the current plan file using the terraform state push command.

B.

Refresh the current state data using the -refresh-only flag.

C.

Force the apply command by adding the flag -lock=false .

D.

Generate a new execution plan file with terraform plan , and apply the new plan.

E.

Run terraform apply without the saved execution plan.

Buy Now
Questions 61

Any user can publish modules to the public Terraform Module Registry.

Options:

A.

True

B.

False

Buy Now
Questions 62

You are writing a child Terraform module that provisions an AWS instance. You want to reference the IP address returned by the child module in the root configuration. You name the instance resource " main ' .

Which of these is the correct way to define the output value?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 63

What is terraform plan -refresh-only intended to detect?

Options:

A.

Terraform configuration code changes

B.

Corrupt state files

C.

State file drift

D.

Empty state files

Buy Now
Questions 64

Only the user that generated a plan may apply it.

Options:

A.

True

B.

False

Buy Now
Questions 65

What is modified when executing Terraform inrefresh-only mode?

Options:

A.

Your Terraform configuration.

B.

Your Terraform plan.

C.

Your state file.

D.

Your cloud infrastructure.

Buy Now
Questions 66

You ' ve used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?

Options:

A.

Use the terraform state rm command to remove the VM from state file

B.

Use the terraform taint command targeting the VMs then run terraform plan and terraform apply

C.

Use the terraform apply command targeting the VM resources only

D.

Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply

Buy Now
Questions 67

Which of the following is not an action performed by terraform init?

Options:

A.

Initialize a configured backend.

B.

Create template configuration files.

C.

Load required provider plugins.

D.

Retrieve the source code for all referenced modules.

Buy Now
Questions 68

If a module declares a variable with a default, that variable must also be defined within the module.

Options:

A.

True

B.

False

Buy Now
Questions 69

Module variable assignments are inherited from the parent module and you do not need to explicitly set them.

Options:

A.

True

B.

False

Buy Now
Questions 70

You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 71

You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?

Options:

A.

Local values

B.

Count arguments

C.

Collection functions

D.

Dynamic blocks

Buy Now
Questions 72

You’ve enabled DEBUG-level logging for Terraform, and you’d like to send the log data to a file. Which action should you take?

Options:

A.

Set the TF_LOG_PATH environment variable.

B.

Update the Terraform CLI configuration file.

C.

Add a path argument to the terraform block.

D.

Run the terraform output command.

Buy Now
Questions 73

When you use a backend that requires authentication, it is best practice to:

Options:

A.

Run all of your Terraform commands on a shared server or container.

B.

Configure the authentication credentials in your Terraform configuration files, and store them in a private version control system.

C.

Use environment variables to configure authentication credentials outside of your Terraform configuration.

D.

None of the above.

Buy Now
Questions 74

Your root module contains a variable namednum_servers. Which is the correct way to pass its value to a child module with an input namedservers?

Options:

A.

servers = num_servers

B.

servers = var(num_servers)

C.

servers = var.num_servers

D.

servers = ${var.num_servers}

Buy Now
Questions 75

You have used Terraform lo create an ephemeral development environment in the (loud and are now ready to destroy all the Infrastructure described by your Terraform configuration To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all of the resources that mil be deleted? Choose two correct answers.

Options:

A.

Run terraform state rm ‘

B.

Run terraform show :destroy

C.

Run terraform destroy and it will first output all the resource that will be deleted before prompting for approval

D.

Run terraform plan .destory

Buy Now
Questions 76

Exhibit:

variable " sizes " {

type = list(string)

description = " Valid server sizes "

default = [ " small " , " medium " , " large " ]

}

A variable declaration is shown in the exhibit. Which is the correct way to get the value of medium from this variable?

Options:

A.

var.sizes[0]

B.

var.sizes[1]

C.

var.sizes[2]

D.

var.sizes[3]

Buy Now
Questions 77

What kind of configuration block will manage an infrastructure object with settings specified within the block?

Options:

A.

resource

B.

provider

C.

data

D.

locals

Buy Now
Questions 78

Which Terraform collection type should you use to store key/value pairs?

Options:

A.

Set

B.

Map

C.

Tuple

D.

list

Buy Now
Questions 79

You are updating a child module with the resource block shown in the exhibit below. The public_ip attribute of the resource needs to be accessible to the parent module.

Exhibit:

resource " aws_instance " " example " {

ami = " ami-0a123456789abcdef "

instance_type = " t3.micro "

}

How do you meet this requirement?

Options:

A.

Create a local value in the child module.

B.

Create an output in the child module.

C.

Add a data source to the parent module.

D.

Add an import block to the parent module.

Buy Now
Questions 80

You have a list of numbers that represents the number of free CPU cores on each virtual cluster:

numcpus = [ 18, 3, 7, 11, 2 ]

What Terraform function could you use to select the largest number from the list?

Options:

A.

top(numcpus)

B.

max(numcpus)

C.

ceil (numcpus)

D.

hight[numcpus]

Buy Now
Questions 81

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?

Options:

A.

In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file

B.

Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address

C.

Run terraform output ip_address to view the result

D.

Run terraform destroy then terraform apply and look for the IP address in stdout

Buy Now
Questions 82

Which are benefits of migrating from a local state backend to a remote backend? (Pick the 2 correct responses below.)

Options:

A.

Guarantees that configuration drift cannot occur for the managed infrastructure.

B.

Eliminates the need to manage credentials when deploying infrastructure to multiple cloud providers.

C.

Faster plan and apply execution because the state is cached locally on the cloud provider.

D.

State locking that allows multiple team members to safely work on the same infrastructure.

E.

The ability to enable server-side encryption at rest.

Buy Now
Questions 83

What does terraform import do?

Options:

A.

Imports existing resources into the state file

B.

Imports all infrastructure from a given cloud provider

C.

Imports a new Terraform module

D.

Imports clean copies of tainted resources

E.

None of the above

Buy Now
Questions 84

You are responsible for a set of infrastructure that is managed by two workspaces: example-network and example-compute . The example-compute workspace uses data from output values configured in the example-network workspace and must be deployed afterward. Currently, this is a manual process:

    An operator deploys changes to the example-network workspace.

    They manually copy the output values from the example-network workspace to input variables configured for the example-compute workspace.

    They deploy the example-compute workspace.

Which HCP Terraform features can you use to automate this process?

Pick the two correct responses below.

Options:

A.

A health check configured on the example-network workspace to create a plan on the example-compute workspace when HCP Terraform applies changes to it.

B.

A health check configured on the example-compute workspace to create a plan when HCP Terraform applies changes to the example-network workspace.

C.

A tfe_outputs data source configured in the example-compute workspace to automatically load output values from the example-network workspace.

D.

A run trigger configured on the example-network workspace to automatically plan changes to the example-compute workspace after every apply.

E.

A run trigger configured on the example-compute workspace to automatically plan changes after HCP Terraform applies changes to the example-network workspace.

Buy Now
Questions 85

What is the Terraform style convention for indenting a nesting level compared to the one above it?

Options:

A.

With two spaces.

B.

With four spaces.

C.

With three spaces.

D.

With a tab.

Buy Now
Questions 86

HashiCorp Configuration Language (HCL) supports user-denned functions.

Options:

A.

True

B.

False

Buy Now
Questions 87

You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.

Options:

A.

True

B.

False

Buy Now
Questions 88

A Terraform backend determines how Terraform loads state and stores updates when you execute which command?

Options:

A.

apply

B.

destroy

C.

Both of these are correct.

D.

Neither of these are correct.

Buy Now
Questions 89

Which of the following statements about Terraform modules is not true?

Options:

A.

Modules can call other modules

B.

A module is a container for one or more resources

C.

Modules must be publicly accessible

D.

You can call the same module multiple times

Buy Now
Questions 90

How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

Options:

A.

Data.vsphere_datacenter.DC.id

B.

Vsphere_datacenter.dc.id

C.

Data,dc,id

D.

Data.vsphere_datacenter,dc

Buy Now
Questions 91

Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)

Options:

A.

Public repository on GitHub.

B.

Public Terraform Registry.

C.

Internally hosted VCS (Version Control System) platform.

D.

Private repository on GitHub.

Buy Now
Questions 92

You need to deploy resources into two different regions in the same Terraform configuration using the block shown in the exhibit below.

What do you need to add to the provider configuration to deploy the resource to the us-west-2 AWS region?

A

B.

C.

D.

Options:

Buy Now
Questions 93

Using the terraform state rm command against a resource will destroy it.

Options:

A.

True

B.

False

Buy Now
Questions 94

Which parameters does terraform import require? Choose two correct answers.

Options:

A.

Provider

B.

Resource ID

C.

Resource address

D.

Path

Buy Now
Questions 95

You can execute terraform fmt to standardize all Terraform configurations within the current working directory to Terraform’s canonical format and style.

Options:

A.

True

B.

False

Buy Now
Questions 96

terraform init retrieves and caches the configuration for all remote modules.

Options:

A.

True

B.

False

Buy Now
Questions 97

Which features do HCP Terraform workspaces provide that are not available in Terraform Community Edition? (Pick the 3 correct responses below.)

Options:

A.

State versions and run history.

B.

Automatic detection of common security issues.

C.

Store Terraform and environment variables in variable sets.

D.

Remote execution of Terraform operations.

E.

Store your configuration in a Version Control System (VCS).

F.

Support for multiple cloud providers.

Buy Now
Questions 98

You can develop a custom provider to manage its resources using Terraform.

Options:

A.

True

B.

False

Buy Now
Questions 99

You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?

Options:

A.

After you run terraform apply so you can validate your infrastructure

B.

Before you run terraform apply so you can validate your provider credentials

C.

Before you run terraform plan so you can validate your code syntax

D.

After you run terraform plan so you can validate that your state file is consistent with your infrastructure

Buy Now
Questions 100

Does terraform init create an example main.tf file in the current directory?

Options:

A.

True

B.

False

Buy Now
Questions 101

Which of the following is not a way to trigger terraform destroy?

Options:

A.

terraform destroy

B.

All of these will trigger terraform destroy

C.

terraform plan -destroy

D.

terraform destroy -auto-approve

Buy Now
Questions 102

A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?

Options:

A.

Tear down the entire workspace ' s infrastructure and rebuild it.

B.

Build a completely brand new set of infrastructure.

C.

Rebuild only the instances that were deleted.

D.

Stop and generate an error message about the missing instances.

Buy Now
Exam Name: HashiCorp Certified: Terraform Associate (004) (HCTA0-004)
Last Update: May 17, 2026
Questions: 318
Terraform-Associate-004 pdf

Terraform-Associate-004 PDF

$25.5  $84.99
Terraform-Associate-004 Engine

Terraform-Associate-004 Testing Engine

$30  $99.99
Terraform-Associate-004 PDF + Engine

Terraform-Associate-004 PDF + Testing Engine

$40.5  $134.99