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 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 never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?
What type of information can be found on the Terraform Registry when using published modules?
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?
You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? 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?
Which command must you first run before performing further Terraform operations in a working directory?
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?
terraform validate confirms that your infrastructure matches the Terraform state file.
Which of the following should you add in the required_providers block to define a provider version constraint?
What does Terraform not reference when running a terraform apply -refresh-only ?
How would you output returned values from a child module in the Terraform CLI output?
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.
You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if you terraform apply again immediately afterward without changing any Terraform code?
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?
What feature stops multiple users from operating on the Terraform state at the same time?
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)?
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
Terraform configuration (including any module references) can contain only one Terraform provider type.
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
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?
You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.
Which Terraform command should you runfirst?
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?
You have a list of numbers that represents the number of free CPU cores on each virtual cluster:
numcpus = [ 18, 3, 7, 11, 2 ]
What Terraform function could you use to select the largest number from the list?
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Which command(s) adds existing resources in a public cloud into Terraform state?
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
The Terraform binary version and provider versions must match each other in a single configuration.
Module version is required to reference a module on the Terraform Module Registry.
What kind of configuration block will create an infrastructure object with settings specified within the block?
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?
A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don't know which VM Terraform manages but do have a list of all active VM IDs.
Which of the following methods could you use to discover which instance Terraform manages?
Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)