Which command add existing resources into Terraform state?
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?
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
Terraform configuration (including any module references) can contain only one Terraform provider type.
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
A)
B)
C)
D)
terraform plan updates your state file.
Define the purpose of state in Terraform.
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?
Which of these commands makes your code more human readable?
Which of the following is not true of Terraform providers?
Terraform configuration can only call modules from the public registry.
Which of the following is not a valid source path for specifying a module?
You can reference a resource created with for_each using a Splat ( *) expression.
Which are examples of infrastructure as code? Choose two correct answers.
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.
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?
When do changes invoked by terraform apply take effect?
Which of the following is not a valid siring function in Terraform?
A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you specify version 1.0.0 of the module?
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
You much initialize your working directory before running terraform validate.
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
If a module declares a variable with a default, that variable must also be defined within the module.
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
Which provider authentication method prevents credentials from being stored in the state file?
How do you specify a module’s version when publishing it to the public terraform Module Registry?
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.
It is best practice to store secret data in the same version control repository as your Terraform configuration.
What is a key benefit of the Terraform state file?
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
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.
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
You can develop a custom provider to manage its resources using Terraform.
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
Infrastructure as Code (laC) can be stored in a version control system along with application code.
What does Terraform not reference when running a terraform apply -refresh-only ?
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
Which of the following arguments are required when declaring a Terraform output?
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Which backend does the Terraform CU use by default?
You have to initialize a Terraform backend before it can be configured.
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 the following command would be use to access all of the attributes and details of a resource managed by Terraform?
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
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.
Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
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 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 does terraform apply change after you approve the execution plan? (Choose two.)
Only the user that generated a plan may apply it.
If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?
Which of the following module source paths does not specify a remote module?
A provider configuration block is required in every Terraform configuration.
Example: