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

Viewing page 1 out of 8 pages
Viewing questions 1-10 out of questions
Questions # 1:

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.


Expert Solution
Questions # 2:

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?

Options:

A.

In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file


B.

Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address


C.

Run terraform output ip_address to view the result


D.

Run terraform destroy then terraform apply and look for the IP address in stdout


Expert Solution
Questions # 3:

terraform validate confirms thesyntaxof Terraform files.

Options:

A.

True


B.

False


Expert Solution
Questions # 4:

You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?

Original configuration:

resource "aws_s3_bucket" "photoes" {

bucket_prefix = "images"

}

Updated configuration:

resource "aws_s3_bucket" "photos" {

bucket_prefix = "images"

}

Options:

A.

moved {

from = aws_s3_bucket.photoes

to = aws_s3_bucket.photos

}


B.

moved {

bucket.photoes = aws_s3_bucket.photos

}


C.

moved {

aws_s3_bucket.photoes = aws_s3_bucket.photos

}


D.

None. Terraform will automatically update the resource ID.


Expert Solution
Questions # 5:

You cannot install third party plugins using terraform init.

Options:

A.

True


B.

False


Expert Solution
Questions # 6:

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 # 7:

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

Options:

A.

value


B.

description


C.

default


D.

sensitive


Expert Solution
Questions # 8:

Which Terraform command checks that your configuration syntax is correct?

Options:

A.

terraform validate


B.

terraform init


C.

terraform show


D.

terraform fmt


Expert Solution
Questions # 9:

What does Terraform use the .terraform.lock.hc1 file for?

Options:

A.

There is no such file


B.

Tracking specific provider dependencies


C.

Preventing Terraform runs from occurring


D.

Storing references to workspaces which are locked


Expert Solution
Questions # 10:

A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?

Options:

A.

Tear down the entire workspace's infrastructure and rebuild it.


B.

Build a completely brand new set of infrastructure.


C.

Rebuild only the instances that were deleted.


D.

Stop and generate an error message about the missing instances.


Expert Solution
Viewing page 1 out of 8 pages
Viewing questions 1-10 out of questions