Pre-Winter Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

Pass the HashiCorp Terraform Associate Terraform-Associate-003 Questions and answers with CertsForce

Viewing page 5 out of 8 pages
Viewing questions 41-50 out of questions
Questions # 41:

You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.

How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

Options:

A.

Run the terraform fmt command during the code linting phase of your CI/CD process Most Voted


B.

Designate one person in each team to review and format everyone's code


C.

Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)


D.

Write a shell script to transform Terraform files using tools such as AWK, Python, and sed


Expert Solution
Questions # 42:

How would you output returned values from a child module in the Terraform CLI output?

Options:

A.

Declare the output in the root configuration


B.

Declare the output in the child module


C.

Declare the output in both the root and child module


D.

None of the above


Expert Solution
Questions # 43:

A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you specify version 1.0.0 of the module?

Options:

A.

Append ?ref=v1.0.0 argument to the source path.


B.

You cannot. Modules stored on the public Terraform Registry do not support versioning.


C.

Add a version = "1.0.0" attribute to the module block.


D.

Nothing. Modules stored on the public Terraform module Registry always default to version 1.0.0.


Expert Solution
Questions # 44:

Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Options:

A.

Edit your state file to scrub out the sensitive data


B.

Always store your secrets in a secrets.tfvars file


C.

Delete the state file every time you run Terraform


D.

Store the state in an encrypted backend


Expert Solution
Questions # 45:

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


Expert Solution
Questions # 46:

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

Options:

A.

True


B.

False


Expert Solution
Questions # 47:

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

Options:

A.

Provider


B.

Resource ID


C.

Resource address


D.

Path


Expert Solution
Questions # 48:

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

Options:

A.

list


B.

array


C.

nap


D.

string


Expert Solution
Questions # 49:

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


Expert Solution
Questions # 50:

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

Options:

A.

True


B.

False


Expert Solution
Viewing page 5 out of 8 pages
Viewing questions 41-50 out of questions