HashiCorp Certified: Terraform Associate v1.0

Page:    1 / 22   
Exam contains 327 questions

Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?

  • A. servers = num_servers
  • B. servers = variable.num_servers
  • C. servers = var(num_servers)
  • D. servers = var.num_servers


Answer : A

A Terraform provisioner must be nested inside a resource configuration block.

  • A. True
  • B. False


Answer : A

Most provisioners require access to the remote resource via SSH or WinRM, and expect a nested connection block with details about how to connect.
Reference:
https://www.terraform.io/docs/language/resources/provisioners/connection.html

Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.

  • A. True
  • B. False


Answer : B

What does the default "local" Terraform backend store?

  • A. tfplan files
  • B. Terraform binary
  • C. Provider plugins
  • D. State file


Answer : D

The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Reference:
https://www.terraform.io/docs/language/settings/backends/local.html

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?

  • A. Run the terraform fmt command during the code linting phase of your CI/CD process
  • 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


Answer : C

✑ Indent two spaces for each nesting level.
✑ When multiple arguments with single-line values appear on consecutive lines at the same nesting level, align their equals signs.
Reference:
https://www.terraform.io/docs/language/syntax/style.html

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

  • A. The ability to share modules with public Terraform users and members of Terraform Enterprise Organizations
  • B. The ability to tag modules by version or release
  • C. The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
  • D. The ability to share modules publicly with any user of Terraform


Answer : D

Terraform Registry is an index of modules shared publicly using this protocol. This public registry is the easiest way to get started with Terraform and find modules created by others in the community.
Reference:
https://www.terraform.io/docs/language/modules/sources.html

Which task does terraform init not perform?

  • A. Sources all providers present in the configuration and ensures they are downloaded and available locally
  • B. Connects to the backend
  • C. Sources any modules and copies the configuration locally
  • D. Validates all required variables are present


Answer : D

Reference:
https://www.terraform.io/docs/cli/commands/init.html

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.)

  • A. { for o in var.list : o => o.id }
  • B. var.list[*].id
  • C. [ var.list[*].id ]
  • D. [ for o in var.list : o.id ]


Answer : AB

Which argument(s) is (are) required when declaring a Terraform variable?

  • A. type
  • B. default
  • C. description
  • D. All of the above
  • E. None of the above


Answer : B

The variable declaration can also include a default argument.
Reference:
https://www.terraform.io/docs/language/values/variables.html

When using a module block to reference a module stored on the public Terraform Module Registry such as:

How do you specify version 1.0.0?

  • A. Modules stored on the public Terraform Module Registry do not support versioning
  • B. Append ?ref=v1.0.0 argument to the source path
  • C. Add version = "1.0.0" attribute to module block
  • D. Nothing ג€" modules stored on the public Terraform Module Registry always default to version 1.0.0


Answer : C

What features does the hosted service Terraform Cloud provide? (Choose two.)

  • A. Automated infrastructure deployment visualization
  • B. Automatic backups
  • C. Remote state storage
  • D. A web-based user interface (UI)


Answer : BC

Reference:
https://www.terraform.io/docs/enterprise/admin/automated-recovery.html https://www.terraform.io/docs/language/state/remote.html

Where does the Terraform local backend store its state?

  • A. In the /tmp directory
  • B. In the terraform file
  • C. In the terraform.tfstate file
  • D. In the user's terraform.state file


Answer : C

The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Reference:
https://www.terraform.io/docs/language/settings/backends/local.html

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

  • A. A Terraform provider
  • B. Environment variables
  • C. A -var flag
  • D. secure string


Answer : C

Reference:
https://secrethub.io/blog/secret-management-for-terraform/

What is one disadvantage of using dynamic blocks in Terraform?

  • A. They cannot be used to loop through a list of values
  • B. Dynamic blocks can construct repeatable nested blocks
  • C. They make configuration harder to read and understand
  • D. Terraform will run more slowly


Answer : A

Reference:
https://github.com/hashicorp/terraform/issues/19291

Only the user that generated a plan may apply it.

  • A. True
  • B. False


Answer : B

Page:    1 / 22   
Exam contains 327 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy