What type of block is used to construct a collection of nested configuration blocks?
How would you reference the "name’’ value of the second instance of this resource?
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
You must use different Terraform commands depending on the cloud provider you use.
Terraform configuration (including any module references) can contain only one Terraform provider type.
Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
Which of the following arguments are required when declaring a Terraform output?
You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.
While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
You are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:
When you run terraform validate, you get the following error:
What must you do to successfully retrieve this value from your networking module?
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?
Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
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 the 3 correct responses)
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
A)
B)
C)
D)
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
What feature stops multiple users from operating on the Terraform state at the same time?
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?
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?
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example.
Git::https://example.com/vpc.git)?
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?
When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?
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?
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:
What is the Terraform style convention for indenting a nesting level compared to the one above it?
You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.
Which command will migrate your current state file to the new S3 remote backend?
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
It is best practice to store secret data in the same version control repository as your Terraform configuration.
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
You can access state stored with the local backend by using terraform_remote_state data source.