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

HashiCorp Terraform-Associate-004 - HashiCorp Certified: Terraform Associate (004) (HCTA0-004)

Page: 5 / 9
Total 299 questions

When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.

A.

True

B.

False

Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?

A.

Self-service infrastructure deployment.

B.

Modify a count parameter to scale resources.

C.

API-driven workflows.

D.

Troubleshoot via a Linux diff command.

E.

Public cloud console configuration workflows.

How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?

A.

Only Terraform Cloud organization owners can set workspace variables on VCS connected workspaces

B.

Commit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to

C.

Only Terraform Cloud organization owners can approve plans in VCS connected workspaces

D.

Only members of a VCS organization can open a pull request against repositories that are connected to Terraform Cloud workspaces

What is the Terraform style convention for indenting a nesting level compared to the one above it?

A.

With two spaces.

B.

With four spaces.

C.

With three spaces.

D.

With a tab.

You are tasked with making a change to an infrastructure stack running in a public cloud using HCP Terraform/Terraform Cloud. Which pattern follows IaC best practices?

A.

Make the change via the public cloud API endpoint.

B.

Submit a pull request and wait for an approved merge of the proposed changes.

C.

Clone the repository containing your infrastructure code and then run the code.

D.

Use the public cloud console to make the change after approval.

E.

Make the change programmatically via the cloud CLI.

Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

A.

curl commands manually run from a terminal

B.

A sequence of REST requests you pass to a public cloud API endpoint Most Voted

C.

A script that contains a series of public cloud CLI commands

D.

A series of commands you enter into a public cloud console

Which of these are features of Terraform Cloud? Choose two correct answers.

A.

A web-based user interface (Ul)

B.

Automated infrastructure deployment visualization

C.

Automatic backups

D.

Remote state storage

You want to use API tokens and other secrets within your team's Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick 3)

A.

In a plaintext document on a shared drive.

B.

In a terraform.tfvars file, checked into version control.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

E.

In HashiCorp Vault.

Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

A.

data

B.

local

C.

resource

D.

provider

Exhibit:

resource "azurerm_linux_web_app" "app" {

name = "example-app"

resource_group_name = azurerm_resource_group.rg.name

location = azurerm_resource_group.rg.location

service_plan_id = azurerm_service_plan.plan.id

identity {

type = "UserAssigned"

identity_ids = [azurerm_user_assigned_identity.app.id]

}

}

resource "azurerm_role_assignment" "kv_access" {

scope = azurerm_key_vault.kv.id

role_definition_name = "Key Vault Secrets User"

principal_id = azurerm_user_assigned_identity.app.principal_id

}

Two resource blocks are shown: azurerm_linux_web_app and azurerm_role_assignment. When provisioned, the web app will use the role assignment during creation, so the role assignment must be created first. How do you ensure the azurerm_role_assignment resource is created first?

A.

Add a depends_on argument to the azurerm_linux_web_app.

B.

Add a create_before_destroy argument to the azurerm_role_assignment.

C.

Change the order of the azurerm_linux_web_app and azurerm_role_assignment blocks.

D.

Add a count argument to both resources.