You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
Which command(s) adds existing resources in a public cloud into Terraform state?
What does Terraform not reference when running a terraform apply -refresh-only ?
Before you can use a remote backend, you must first execute terra-form init.
You can access state stored with the local backend by using terraform_remote_state data source.
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.
You can develop a custom provider to manage its resources using Terraform.
What information does the public Terraform Module Registry automatically expose about published modules?
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.
Which of the following can you do with terraform plan? (Pick 2 correct responses)
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.
You have used Terraform lo create an ephemeral development environment in the (loud 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 of the resources that mil be deleted? Choose two correct answers.
You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
How do you specify a module’s version when publishing it to the public terraform Module Registry?
When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of that resource block?
Infrastructure as Code (laC) can be stored in a version control system along with application code.
You can configure multiple cloud blocks in your Terraform configuration to connect your workspace to both HCP Terraform and your Terraform Enterprise instance.
What command can you run to generateDOT (Graphviz)formatted data to visualize Terraform dependencies?
terraform init retrieves and caches the configuration for all remote modules.
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?
Which of the following should you add in the required_providers block to define a provider version constraint?
A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.
Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?
Exhibit:
data "vsphere_datacenter" "dc" {}
resource "vsphere_folder" "parent" {
path = "Production"
type = "vm"
datacenter_id = _________
}
You want to pass the id of the vsphere_datacenter data source to the datacenter_id argument of the vsphere_folder resource. Which reference would you use?
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
How would you output returned values from a child module in the Terraform CLI output?
Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.
You need to destroy all of the resources in your Terraform workspace, except for aws_instance.ubuntu[1], which you want to keep. How can you tell Terraform to stop managing that specific resource without destroying it?
Which method for sharing Terraform modules fulfills the following criteria:
Keeps the module configurations confidential within your organization.
Supports Terraform's semantic version constraints.
Provides a browsable directory of your modules.
It is best practice to store secret data in the same version control repository as your Terraform configuration.
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
Terraform configuration (including any module references) can contain only one Terraform provider type.
You can reference a resource created with for_each using a Splat ( *) expression.
Exhibit:
Root module configuration:
output "vnet_id" {
value = module.my_network.vnet_id
}
Error:
Error: Reference to undeclared output value
on main.tf line 12, in output "vnet_id":
12: value = module.my_network.vnet_id
You are using a networking module in your Terraform configuration with the name my_network. Your root module includes the configuration shown. When you run terraform validate, you get the error shown. Which option would successfully retrieve this value from your networking module?
Where in your Terraform configuration do you specify remote state storage settings?
A developer launched a VM outside of the Terraform workflow and ended up with two servers with the same name. They are unsure which VM is managed with Terraform, but they do have a list of all active VM IDs. Which method could you use to determine which instance Terraform manages?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
Your team adopts AWS CloudFormation as the standardized method for provisioning public cloud resources. Which scenario presents a challenge for your team?
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
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?
Which of the following is not a valid source path for specifying a module?
You’ve updated your Terraform configuration, and you need to preview the proposed changes to your infrastructure. Which command should you run?
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?
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
A resource block is shown in the Exhibit space of this page. How would you reference the name value of the second instance of this resource?
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?
If a module declares a variable with a default, that variable must also be defined within the module.
Which of the following does terraform apply change after you approve the execution plan? (Choose two.)
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
Which two steps are required to provision new infrastructure in the Terraform workflow? (Pick the 2 correct responses below.)
Which is a benefit of using infrastructure as code (IaC) tools compared to native platform APIs?
Exhibit:
data "aws_ami" "web" {
most_recent = true
owners = ["self"]
tags = {
Name = "web-server"
}
}
A data source is shown in the exhibit. How do you reference the id attribute of this data source?