Open source Terraform can only import publicly-accessible and open-source modules.
- ATrue
- BFalse (correct answer)
Reveal answer & explanationHide answer
The correct answer is B. Option B: False
Page 10 of 19 · 368 total questions.
Open source Terraform can only import publicly-accessible and open-source modules.
The correct answer is B. Option B: False
What does terraform destroy do?
The correct answer is A. Option A: Destroy all infrastructure in the Terraform state file
Explanation
terraform state subcommands inspect and safely modify resource bindings recorded in state. Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience sluggish 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?
The correct answer is C. Option C: TF_LOG
If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resources, which of the following scenarios poses a challenge for this team?
The correct answer is C. Option C: The organization decides to expand into Azure and wishes to deploy new infrastructure using their existing codebase
You cannot install third party plugins using terraform init.
The correct answer is B. Option B: False
Which of the following can you do with terraform plan? (Choose two.)
The correct answer is A, C. Option A: Save a generated execution plan to apply later Option C: View the execution plan and check if the changes match your expectations
Which are examples of infrastructure as code? (Choose two.)
The correct answer is C, D. Option C: Versioned configuration files Option D: Docker files
When using a module from the public Terraform Module Registry, the following parameters are required attributes in the module block. (Choose two.)
The correct answer is A, B. Option A: Each of the module’s required inputs Option B: The module’s source address
Explanation
A Terraform module packages related resources into a reusable configuration with defined inputs and outputs.
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
The correct answer is A. Option A: terraform init -upgrade
Explanation
terraform init initializes a working directory, installs required providers and modules, and configures the backend.
You can access state stored with the local backend by using the terraform_remote_state data source.
The correct answer is A. Option A: True
You have been working in a Cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that is listening on port 80. After some application changes, you updated the Terraform code to change the port to 443. You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended, and step away to grab some coffee. In the meantime, another team member manually changes the load balancer port to 443 through the Cloud provider console before you get back to your desk. What will happen when you terraform apply upon returning to your desk?
The correct answer is C. Option C: Terraform will not make any changes to the Load Balancer and will update the state file to reflect any changes made.
Explanation
Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.
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.
The correct answer is A. Option A: True
You have some Terraform code and a variable definitions file named dev.auto.tfvars that you tested successfully in the dev environment. You want to deploy the same code in the staging environment with a separate variable definition file and a separate state file. Which two actions should you perform? (Choose two.)
The correct answer is B, C. Option B: Write a new staging.auto.tfvars variable definition file and run Terraform with the var-file=”staging.auto.tfvars” flag Option C: Create a new Terraform workspace for staging
Explanation
Terraform CLI workspaces maintain separate state instances for the same configuration.
The ________ determines how Terraform creates, updates, or deletes resources.
The correct answer is C. Option C: Terraform provider
Explanation
A provider plugin implements resource types and data sources that communicate with an external API.
Terraform destroy is the only way to remove infrastructure.
The correct answer is B. Option B: False
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers in HCL2?
The correct answer is A. Option A: servers - var.num_servers
Which of the fallowing commands would you use to access all of the attributes and details of a resource managed by Terraform?
The correct answer is B. Option B: terraform state show
Explanation
terraform state subcommands inspect and safely modify resource bindings recorded in state.
How would you be able to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

The correct answer is D. Option D: data.vsphere_datacenter.dc.id
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?

The correct answer is B. Option B: terraform init
Explanation
terraform init initializes a working directory, installs required providers and modules, and configures the backend.
You want to tag multiple resources with a string that is a combination of a generated random_id and a variable. How should you use the same value in all these resources without repeating the random_id and variable in each resource?
The correct answer is A. Option A: Local values
Explanation
A local value names and reuses an expression within a module without exposing it as an input or output.
Showing questions 181–200 of 368 · Page 10 of 19