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?
You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend, what open source Terraform feature would allow you create multiple states but still be associated with your current code?
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)
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?
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
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?
You must use different Terraform commands depending on the cloud provider you use.
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?
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
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.
What information does the public Terraform Module Registry automatically expose about published modules?
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.
You are writing a child Terraform module that provisions an AWS instance. You want to reference the IP address returned by the child module in the root configuration. You name the instance resource "main'.
Which of these is the correct way to define the output value?
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?
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
Terraform configuration (including any module references) can contain only one Terraform provider type.
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?
The Terraform binary version and provider versions must match each other in a single configuration.
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?
Which provider authentication method prevents credentials from being stored in the state file?
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
What feature stops multiple users from operating on the Terraform state at the same time?
Which command(s) adds existing resources in a public cloud into Terraform state?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.
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 command must you first run before performing further Terraform operations in a working directory?
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?
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
All modules published on the official Terraform Registry are maintained and tested by HashiCorp.
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.
Which of the following is true about terraform apply?(Pick 2 correct responses)
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
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 3)
Which of the following should you add in the required_providers block to define a provider version constraint?
When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?
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.
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?
You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.