Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.
How should they ensure the code satisfies conventions?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?
A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?
You can configure Terraform to log to a file using the TF_LOG environment variable.
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
terraform apply will fail if you have not run terraform plan first to update the plan output.
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
What information does the public Terraform Module Registry automatically expose about published modules?
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
Which of the following is not a benefit of adopting infrastructure as code?
You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?
A)
B)
C)
D)
Which method for sharing Terraform configurations fulfills the following criteria:
1. Keeps the configurations confidential within your organization
2. Support Terraform’s semantic version constrains
3. Provides a browsable directory
You are writing a child Terraform module that provisions an AWS instance. You want to reference the IP address returned by the child module in the root configuration. You name the instance resource "main'.
Which of these is the correct way to define the output value?
Which of the following can you do with terraform plan? (Pick 2 correct responses)
You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?
You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.
How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?
You have developed a new cloud-based service that uses proprietary APIs and want to use Terraform to create, manage, and delete users from the service. How can Terraform interact with the service?
Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?
It is best practice to store secret data in the same version control repository as your Terraform configuration.
You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?
You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that Terraform will delete.
Which command should you use to show all the resources that will be deleted? (Pick the 2 correct responses)
A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
Which option cannot be used to keep secrets out of Terraform configuration files?
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
You must use different Terraform commands depending on the cloud provider you use.
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
Which of the following module source paths does not specify a remote module?
In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.
Which of these ate features of Terraform Cloud? Choose two correct answers.
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
You can access state stored with the local backend by using terraform_remote_state data source.
Which command must you first run before performing further Terraform operations in a working directory?
Which of the following should you add in the required_providers block to define a provider version constraint?
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?
One remote backend configuration always maps to a single remote workspace.
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.