Summer Sale Discount Flat 70% Offer - Ends in 0d 00h 00m 00s - Coupon code: 70diswrap

HashiCorp Terraform-Associate-004 Dumps

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

Question 1

When using multiple configurations of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Options:

A.

depends_on

B.

alias

C.

name

D.

id

Question 2

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.

Question 3

You cannot install third party plugins using terraform init.

Options:

A.

True

B.

False

Question 4

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.

Question 5

Which syntax check returns an error when you run terraform validate?

Options:

A.

The state file does not match the current infrastructure.

B.

The code contains tabs for indentation instead of spaces.

C.

There is a missing variable block.

D.

None of these will return an error.

Question 6

Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.

Options:

A.

A variable file

B.

Defined in Environment variables

C.

Inside the backend block within the Terraform configuration

D.

Defined in a connection configuration outside of Terraform

Question 7

What is the name of the default file where Terraform stores the state?

Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

Options:

Question 8

Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

Options:

A.

data

B.

local

C.

resource

D.

provider

Question 9

You corrected a typo in a resource name, changing it from aws_s3_bucket.photoes to aws_s3_bucket.photos. You want to update the Terraform state so that the existing resource is recognized under the new name, without destroying and recreating it. Which configuration should you use?

Options:

A.

Remove the old resource from your configuration and re-import it.

B.

Run terraform apply -refresh-only.

C.

Do nothing — Terraform will automatically update the state.

D.

Add a moved block to your configuration.

Question 10

Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?

Options:

A.

Artifactory

B.

Amazon S3

C.

Terraform Cloud

D.

Git

Question 11

How does Terraform manage most dependencies between resources?

Options:

A.

Terraform will automatically manage most resource dependencies

B.

Using the depends_on parameter

C.

By defining dependencies as modules and including them in a particular order

D.

The order that resources appear in Terraform configuration indicates dependencies

Question 12

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

Options:

A.

True

B.

False

Question 13

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

Options:

A.

True

B.

False

Question 14

Which of these statements about Terraform Cloud workspaces is false?

Options:

A.

They have role-based access controls

B.

You must use the CLI to switch between workspaces

C.

Plans and applies can be triggered via version control system integrations

D.

They can securely store cloud credentials

Question 15

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

Question 16

Where in your Terraform configuration do you specify remote state storage settings?

Options:

A.

The resource block

B.

The provider block

C.

The data block

D.

The terraform block

Question 17

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

Question 18

Which of these workflows is only enabled by the use of Infrastructure as Code?

Options:

A.

Automatic scaling of resources based on application load.

B.

Role-based access control of cloud resources.

C.

Cost optimization of infrastructure deployment.

D.

Reviewing the proposed changes for potential security issues.

Question 19

Infrastructure as Code (laC) can be stored in a version control system along with application code.

Options:

A.

True

B.

False

Question 20

When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.

Options:

A.

True

B.

False

Question 21

Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.

Options:

A.

True

B.

False

Question 22

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.

Question 23

What information does the public Terraform Module Registry automatically expose about published modules?

Options:

A.

Required input variables

B.

Optional inputs variables and default values

C.

Outputs

D.

All of the above

E.

None of the above

Question 24

As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

Options:

A.

Make the change via the public cloud API endpoint

B.

Clone the repository containing your infrastructure code and then run the code

C.

Use the public cloud console to make the change after a database record has been approved

D.

Make the change programmatically via the public cloud CLI

E.

Submit a pull request and wait for an approved merge of the proposed changes

Question 25

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

Options:

A.

Tree

B.

Map

C.

List

D.

set

Question 26

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.

Question 27

You’ve updated your Terraform configuration, and you need to preview the proposed changes to your infrastructure. Which command should you run?

Options:

A.

terraform show

B.

terraform plan

C.

terraform validate

D.

terraform get

Question 28

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

Question 29

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

Question 30

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

Question 31

Terraform encrypts sensitive values stored in your state file.

Options:

A.

True

B.

False

Question 32

You ' re writing a Terraform configuration that needs to read input from a local file called id_rsa.pub. Which built-in Terraform function can you use to import the file ' s contents as a string?

Options:

A.

fileset( " id_rsa.pub " )

B.

file( " id_rsa.pub " )

C.

filebase64( " id_rsa.pub " )

D.

templatefile( " id_rsa.pub " )

Question 33

After creating a new Terraform configuration, your configuration passes terraform validate but returns an “Access Denied” error from the cloud provider when running terraform plan.

Why did terraform validate not catch this issue?

Options:

A.

Variables are only applied and validated during terraform plan, so terraform validate assumed defaults and returned a success message.

B.

The working directory was not initialized, so the cloud provider plugin was unavailable when running the terraform validate command.

C.

terraform validate only checks whether a configuration is syntactically correct and internally consistent, and it does not communicate with providers.

D.

The remote backend was not configured, so terraform validate could not load the state and detect the missing credentials.

Question 34

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

Question 35

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

Question 36

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

Question 37

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

Options:

A.

True

B.

False

Question 38

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.

Question 39

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.

Question 40

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

Question 41

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

Options:

A.

Set

B.

Map

C.

Tuple

D.

list

Question 42

Why would you use the -replace flag for terraform apply?

Options:

A.

You want to force Terraform to destroy a resource on the next apply.

B.

You want Terraform to ignore a resource on the next apply.

C.

You want to force Terraform to destroy and recreate a resource on the next apply.

D.

You want Terraform to destroy all the infrastructure in your workspace.

Question 43

Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?

Options:

A.

Auditing cloud storage buckets with a vulnerability scanning tool

B.

By adding variables to each Terraform Cloud workspace to ensure these settings are always enabled

C.

With an S3 module with proper settings for buckets

D.

With a Sentinel policy, which runs before every apply

Question 44

Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?

Options:

A.

Self-service infrastructure deployment.

B.

Modify a count parameter to scale resources.

C.

API-driven workflows.

D.

Troubleshoot via a Linux diff command.

E.

Public cloud console configuration workflows.

Question 45

You ' re writing a Terraform configuration that needs to read input from a local file called id_rsa.pub . Which built-in Terraform function can you use to import the file ' s contents as a string?

Options:

A.

file( " id_rsa.pub " )

B.

templaTefil( " id_rsa.pub " )

C.

filebase64( " id_rsa.pub " )

D.

fileset < " id_rsa.pub " )

Question 46

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.

Question 47

When does Terraform create the .terraform.lock.hc1 file?

Options:

A.

After your first terraform plan

B.

After your first terraform apply

C.

After your first terraform init

D.

When you enable state locking

Question 48

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.

Question 49

Which of the following arguments are required when declaring a Terraform output?

Options:

A.

value

B.

description

C.

default

D.

sensitive

Question 50

Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.

Options:

A.

Automated infrastructure deployment visualization.

B.

A web-based user interface (UI).

C.

Automatic backups of configuration and state.

D.

Remote state storage.

Question 51

Terraform variables and outputs that set the description argument will store that description in the state file.

Options:

A.

True

B.

False

Question 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

Question 53

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

Options:

A.

True

B.

False

Question 54

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, then run terraform apply again without changing any Terraform code?

Options:

A.

Terraform will recreate the VM.

B.

Terraform will report an error.

C.

Terraform will remove the VM from the state file.

D.

Terraform will not make any changes.

Question 55

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

Options:

A.

When you change a Terraform-managed resource via the Azure Cloud Console, Terraform updates the state file to reflect the change during the next plan or apply

B.

Changing resources via the Azure Cloud Console records the change in the current state file

C.

When you change a resource via the Azure Cloud Console, Terraform records the changes in a new state file

D.

Changing resources via the Azure Cloud Console does not update current state file

Question 56

What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.

Options:

A.

You can restrict specific resource configurations, such as disallowing the use of CIDR=0.0.0.0/0.

B.

You can check out and check in cloud access keys

C.

Sentinel Policies can be written in HashiCorp Configuration Language (HCL)

D.

Policy-as-code can enforce security best practices

E.

You can enforce a list of approved AWS AMIs

Question 57

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

Question 58

All standard backend types support state locking, and remote operations like plan, apply, and destroy.

Options:

A.

True

B.

False

Question 59

You can configure multiple cloud blocks in your Terraform configuration to connect your workspace to both HCP Terraform and your Terraform Enterprise instance.

Options:

A.

True

B.

False

Question 60

When should you run terraform init?

Options:

A.

Every time you run terraform apply

B.

Before you start coding a new Terraform project

C.

After you run terraform plan for the time in a new terraform project and before you run terraform apply

D.

After you start coding a new terraform project and before you run terraform plan for the first time.

Question 61

A module can always refer to all variables declared in its parent module.

Options:

A.

True

B.

False

Question 62

You can install community and partner plugins using terraform init.

Options:

A.

True

B.

False

Question 63

Which argument can you use toprevent unexpected updatesto a module ' s configuration when calling Terraform Registry modules?

Options:

A.

source

B.

count

C.

version

D.

lifecycle

Question 64

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.

Question 65

Which is not a benefit of adopting IaC (Infrastructure as Code)?

Options:

A.

Reusability of code

B.

Automation

C.

A GUI (Graphical User Interface)

D.

Versioning

Question 66

Which are examples of infrastructure as code? Choose two correct answers.

Options:

A.

Cloned virtual machine images

B.

Versioned configuration files

C.

Change management database records

D.

Doctor files

Question 67

What is the primary purpose of IaC (Infrastructure as Code)?

Options:

A.

To provision infrastructure cheaply.

B.

To programmatically create and configure resources.

C.

To define a vendor-agnostic API.

D.

To define a pipeline to test and deliver software.

Question 68

How can you configure a Terraform workspace to store its state remotely?

Options:

A.

Add a cloud block inside the terraform block.

B.

Add a backend block inside the terraform block.

C.

Set the TERAFORM_CLOUD environment variable.

D.

Set the TERRAFORM_BACKEND environment variable.

Question 69

What does this code do?

terraform { required_providers { aws = " > = 3.0 " }}

Options:

A.

Requires any version of the AWS provider > = 3.0 and < 4.0

B.

Requires any version of the AWS provider > = 3.0

C.

Requires any version of the AWS provider > = 3.0 major release. like 4.1

D.

Requires any version of the AWS provider > 3.0

Question 70

Which of these actions will prevent two Terraform runs from changing the same state file at the same time?

Options:

A.

Refresh the state after running Terraform

B.

Delete the state before running Terraform

C.

Configure state locking for your state backend

D.

Run Terraform with parallelism set to 1

Question 71

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

Question 72

You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? Choose two correct answers.

Options:

A.

[ var.list [ * ] , id ]

B.

[ for o in var.list : o.Id ]

C.

var.list[*].id

D.

{ for o in var.llst : o = > o.id }

Question 73

The Terraform binary version and provider versions must match each other in a single configuration.

Options:

A.

True

B.

False

Question 74

The_________determines how Terraform creates, updates, or delete resources.

Options:

A.

Terraform configuration

B.

Terraform provisioner

C.

Terraform provider

D.

Terraform core

Question 75

If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

Options:

A.

Run terraform refresh

B.

It will happen automatically

C.

Manually update the state fire

D.

Run terraform import

Question 76

A Terraform local value can reference other Terraform local values.

Options:

A.

True

B.

False

Question 77

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

Options:

A.

True

B.

False

Question 78

Your configuration contains a module block that references a module from the Terraform Registry and sets the version argument to 1.0. You just published a new version of the module and updated your configuration to point to version 1.1.

Which command must be run to install the new version?

Options:

A.

terraform init

B.

terraform modules

C.

terraform plan

D.

terraform apply

Question 79

Only the user that generated a plan may apply it.

Options:

A.

True

B.

False

Question 80

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.

Question 81

Variables declared within a module are accessible outside of the module.

Options:

A.

True

B.

False

Question 82

Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example.

Options:

A.

Append pref=v1.0.0 argument to the source path

B.

Add version = “1.0.0” parameter to module block

C.

Nothing modules stored on GitHub always default to version 1.0.0

Question 83

What functionality do providers offer in Terraform?(Pick 3 correct responses)

Options:

A.

Interact with cloud provider APIs.

B.

Provision resources for on-premises infrastructure services.

C.

Group a collection of Terraform configuration files that map to a single state file.

D.

Provision resources for public cloud infrastructure services.

E.

Enforce security and compliance policies.

Question 84

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

Question 85

Your team often uses API calls to create and manage cloud infrastructure. In what ways does Terraform differ from conventional infrastructure management approaches?

Options:

A.

Terraform describes infrastructure with version-controlled, repeatable configurations that specify the desired state.

B.

Terraform is merely a wrapper for cloud provider APIs, so there is little to no difference in calling the API directly.

C.

Terraform replaces cloud provider APIs with its own protocols, enabling automated deployments.

D.

Terraform enforces infrastructure through imperative scripts to ensure tasks are completed in the proper order.

Question 86

You want to bring an existing database under Terraform management. What information is required to create a new import block for the database?

Pick the 2 correct responses below:

Options:

A.

The destination resource address of the block that will manage the database.

B.

The path to the .tf file that contains the database resource block.

C.

The ID associated with the current database on the cloud provider.

D.

The database platform and version that the existing resource is running.

E.

The connection string that Terraform will use to connect and manage the database.

Question 87

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

Question 88

The public Terraform Module Registry is free to use.

Options:

A.

True

B.

False

Question 89

Exhibit:

resource " aws_instance " " example " {

ami = " ami-0a123456789abcdef "

instance_type = " t3.micro "

}

You are updating a child module with the resource block shown in the exhibit. The public_ip attribute of the resource needs to be accessible to the parent module. How do you meet this requirement?

Options:

A.

Create an output in the child module.

B.

Add a data source to the parent module.

C.

Add an import block to the parent module.

D.

Create a local value in the child module.

Question 90

Terraform stores the value of an output in its state file, even if the sensitive argument is set to true.

Options:

A.

True

B.

False

Question 91

What does the default " local " Terraform backend store?

Options:

A.

tfplan files

B.

State file

C.

Provider plugins

D.

Terraform binary

Question 92

terraform validate uses provider APIs to verify your infrastructure settings.

Options:

A.

True

B.

False

Question 93

The exhibit below shows part of a Terraform configuration you have been asked to update. The name of the Azure Virtual Network should be set to the name of the resource group followed by a dash and the word vnet.

Exhibit:

data " azurerm_resource_group " " example " {

name = var.resource_group_name

}

resource " azurerm_virtual_network " " example " {

name = ______________________

}

Which expression fulfills this requirement?

Options:

A.

" ${data.azurerm_resource_group.example.name}-vnet "

B.

concat(data.azurerm_resource_group.example.name, " - " , " vnet " )

C.

join( " - " , var.resource_group_name, " vnet " )

D.

" ${azurerm_resource_group.example.name}-vnet "

Question 94

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

Options:

A.

True

B.

False

Question 95

Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)

Options:

A.

You can enforce a list of approved AWS AMIs.

B.

Sentinel Policies can be written in HashiCorp Configuration Language (HCL).

C.

You can check out and check in cloud access keys.

D.

Policy-as-code can enforce security best practices.

Question 96

What does Terraform not reference when running a terraform apply -refresh-only ?

Options:

A.

State file

B.

Credentials

C.

Cloud provider

D.

Terraform resource definitions in configuration files

Question 97

The terraform output command shows outputs from child modules.

Options:

A.

True

B.

False

Question 98

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

Options:

A.

Run all Terraform commands on a shared server or container.

B.

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

C.

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

D.

None of the above.

Question 99

Terraform requires using a different provider for each cloud provider where you want to deploy resources.

Options:

A.

True

B.

False

Question 100

Module version is required to reference a module on the Terraform Module Registry.

Options:

A.

True

B.

False

Question 101

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

Options:

A.

Terraform test execution

B.

Check block validation

C.

Infrastructure cost estimation

D.

Resource drift detection

E.

Sentinel policy checks

Question 102

Which task does terraform init not perform?

Options:

A.

Validates all required variables are present

B.

Sources any modules and copies the configuration locally

C.

Connects to the backend

D.

Sources all providers used in the configuration and downloads them

Question 103

Exhibit:

Root module configuration:

output " vnet_id " {

value = module.my_network.vnet_id

}

Error:

Error: Reference to undeclared output value

on main.tf line 12, in output " vnet_id " :

12: value = module.my_network.vnet_id

You are using a networking module in your Terraform configuration with the name my_network. Your root module includes the configuration shown. When you run terraform validate, you get the error shown. Which option would successfully retrieve this value from your networking module?

Options:

A.

Change the referenced value to module.my_network.outputs.vnet_id.

B.

Define the attribute vnet_id as a variable in the networking module.

C.

Change the referenced value to my_network.outputs.vnet_id.

D.

Define the attribute vnet_id as an output in the networking module.

Question 104

Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?

Options:

A.

Dry runs with terraform plan.

B.

Secure variable storage.

C.

Using one workspace ' s state as a data source for another.

D.

Support for multiple cloud providers.

Question 105

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?

as

Options:

A.

Option A

B.

Option B

C.

Option C

Question 106

What is an advantage of immutable infrastructure?

Options:

A.

In-place infrastructure upgrades

B.

Quicker infrastructure upgrades

C.

Automatic infrastructure upgrades

D.

Less complex infrastructure upgrades

Page: 1 / 36
Total 359 questions