Terraform Associate Certification Q21-Q30

  1. Terraform Associate Certification Q1-Q10
  2. Terraform Associate Certification Q11-Q20
  3. Terraform Associate Certification Q21-Q30
  4. Terraform Associate Certification Q31-Q40
  5. Terraform Associate Certification Q41-Q50
  6. Terraform Associate Certification Q51-Q60
  7. Terraform Associate Certification Q61-Q70
  8. Terraform Associate Certification Q71-Q80
  9. Terraform Associate Certification Q81-Q90
  10. Terraform Associate Certification Q91-Q100
  11. Terraform Associate Certification Q101-Q110
  12. Terraform Associate Certification Q111-Q120
  13. Terraform Associate Certification Q121-Q130
  14. Terraform Associate Certification Q131-Q140
  15. Terraform Associate Certification Q141-Q151

21. In an HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs automatically when you merge or commit change to version control.

A. True
B. False

Answer

A


22. A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?


resource "goole_compute_instance" "main" {
    name = "test"
} 

A. test
B. main
C. google
D. compute_instance

Answer

B


23. 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?


module "consul" {
    source = "hashicorp/consul/aws"
} 

A. You cannot. Modules stored on the public Terraform Registry do not support versioning.
B. Add a version = “1.0.0” attribute to the module block.
C. Nothing. Modules stored on the public Terraform module Registry always default to version 1.0.0.
D. Append ?ref=v1.0.0 argument to the source path.

Answer

B


24. Which syntax check errors when you run terraform validate?

A. The code contains tabs for indentation instead of spaces.
B. There is a missing value for a variable.
C. The state file does not match the current infrastructure.
D. None of the above.

Answer

D


25. Terraform encrypts sensitive values stored in your state file.

A. True
B. False

Answer

B


26. When should you run terraform init?

A. Every time you run terraform apply
B. After you run terraform plan for the first time in a new Terraform project and before you run terraform apply
C. After you start coding a new Terraform project and before you run terraform plan for the first time
D. Before you start coding a new Terraform project

Answer

C


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

A. After you run terraform plan so you can validate that your state file is consistent with your infrastructure
B. Before you run terraform plan so you can validate your code syntax
C. Before you run terraform apply so you can validate your infrastructure
D. After you run terraform apply so you can validate your provider credentials

Answer

B


28. Which of these commands makes your code more human readable?

A. terraform validate
B. terraform output
C. terraform show
D. terraform fmt

Answer

D


29. What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?

A. terraform plan -refresh-only
B. terraform show -json
C. terraform apply -lock-false
D. terraform plan -target-state

Answer

A


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

A. terraform plan
B. terraform workspace
C. terraform init
D. terraform import

Answer

C

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top