Which parameters does terraform import require? Choose two correct answers.
What is the primary purpose of IaC (Infrastructure as Code)?
Running terraform fmt without any flags in a directory with Terraform configuration files will check the formatting of those files, but will never change their contents.
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?
Which command must you run before you run a plan or apply for the first time?
Define the purpose of state in Terraform.
What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
What does terraform destroy do?
When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.
All standard backend types support state locking, and remote operations like plan, apply, and destroy.