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

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

Viewing page 3 out of 12 pages
Viewing questions 21-30 out of questions
Questions # 21:

The -refresh-only parameter will update your state file when used with terraform plan.

Options:

A.

True


B.

False


Expert Solution
Questions # 22:

Which argument can you use toprevent unexpected updatesto a module ' s configuration when calling Terraform Registry modules?

Options:

A.

source


B.

count


C.

version


D.

lifecycle


Expert Solution
Questions # 23:

A Terraform provider is NOT responsible for:

Options:

A.

Exposing resources and data sources based on an APUI


B.

Managing actions to take based on resources differences


C.

Understanding API interactions with some service


D.

Provisioning infrastructure in multiple


Expert Solution
Questions # 24:

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?

Options:

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.


Expert Solution
Questions # 25:

You ' re building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?

Options:

A.

Copy the sensitive variables into your Terraform code


B.

Store the sensitive variables in a secure_varS.tf file


C.

Store the sensitive variables as plain text in a source code repository


D.

Pass variables to Terraform with a -var flag


Expert Solution
Questions # 26:

Which command must you run before you run a plan or apply for the first time?

Options:

A.

terraform init


B.

terraform workspace


C.

terraform validate


D.

terraform import


Expert Solution
Questions # 27:

Which of the following is true about terraform apply?(Pick 2 correct responses)

Options:

A.

You must pass the output of a terraform plan command to it.


B.

By default, it does not refresh your state file to reflect the current infrastructure configuration.


C.

Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources.


D.

You cannot target specific resources for the operation.


E.

It only operates on infrastructure defined in the current working directory or workspace.


Expert Solution
Questions # 28:

Only the user that generated a terraform plan may apply it.

Options:

A.

True


B.

False


Expert Solution
Questions # 29:

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

Options:

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.


Expert Solution
Questions # 30:

A data source is shown in the exhibit below.

How do you reference the id attribute of this data source?

}

}

Options:

A.

data.aws_ami.web.id


B.

aws_ami.web.id


C.

web.id


D.

data.web.id


Expert Solution
Viewing page 3 out of 12 pages
Viewing questions 21-30 out of questions