Spring Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

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?

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

Which method for sharing Terraform configurations fulfills the following criteria:

1. Keeps the configurations confidential within your organization

2. Support Terraform’s semantic version constrains

3. Provides a browsable directory

A.

Subfolder within a workspace

B.

Generic git repository

C.

Terraform Cloud private registry

D.

Public Terraform module registry

Which is a benefit of the Terraform state file?

A.

A state file can schedule recurring infrastructure tasks.

B.

A state file is the desired state expressed by the Terraform code files.

C.

A state file is a source of truth for resources provisioned with Terraform.

D.

A state file is a source of truth for resources provisioned with a public cloud console.

When you initialize Terraform, where does it cache modules from the public Terraform Registry?

A.

In the /tmp directory.

B.

In the .terraform sub-directory.

C.

In memory.

D.

They are not cached.

Which situation will return an error when you run terraform validate?

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.

Your team is using version 3.1.4 of a module from the public Terraform Registry, and they are worried about possible breaking changes in future versions of the module. Which version argument should you add to the module block to prevent newer versions from being used?

A.

version = " < 3.2 "

B.

version = " > = 3.1.5 "

C.

version = " 3.1.4 "

D.

version = " ~ > 3.1.4 "

Which command add existing resources into Terraform state?

A.

Terraform init

B.

Terraform plan

C.

Terraform refresh

D.

Terraform import

E.

All of these

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

A.

True

B.

False

If you don’t use the local Terraform backend, where else can Terraform save resource state?

A.

In a remote location configured in the terraform block, such as HCP Terraform or a cloud storage system.

B.

In a remote location configured in the -terraformrc file, such as HCP Terraform or a cloud storage system.

C.

In memory.

D.

In an environment variable.

Which command(s) adds existing resources in a public cloud into Terraform state?

A.

terraform init

B.

terraform plan

C.

terraform refresh

D.

terraform import

E.

All of these