HashiCorp Terraform-Associate-004 - HashiCorp Certified: Terraform Associate (004) (HCTA0-004)
Total 359 questions
What is the purpose of the terraform.lock.hcl file in Terraform?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
Which of these workflows is only enabled by the use of Infrastructure as Code?
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)
What command can you run to generateDOT (Graphviz)formatted data to visualize Terraform dependencies?
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?
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new 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?
Where does the Terraform local backend store its state?
You can configure multiple cloud blocks in your Terraform configuration to connect your workspace to both HCP Terraform and your Terraform Enterprise instance.
