Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
You have to initialize a Terraform backend before it can be configured.
When does Sentinel enforce policy logic during a Terraform Cloud run?
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
Which of the following are advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.
_______backends support state locking.
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?
A module can always refer to all variables declared in its parent module.
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.
Terraform variable names are saved in the state file.
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.
How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?
Your root module contains a variable namednum_servers. Which is the correct way to pass its value to a child module with an input namedservers?
How does Terraform manage most dependencies between resources?
Which of the following statements about Terraform modules is not true?
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?
Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?
How can terraform plan aid in the development process?
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 these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
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?
Which task does terraform init not perform?
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
Which statement describes a goal of Infrastructure as Code (IaC)?
A Terraform provider is NOT responsible for:
You must use different Terraform commands depending on the cloud provider you use.
A provider configuration block is required in every Terraform configuration.
Example:
Which provider authentication method prevents credentials from being stored in the state file?
Variables declared within a module are accessible outside of the module.
terraform validate reports syntax check errors for which of the following?
What command can you run to generateDOT (Graphviz)formatted data to visualize Terraform dependencies?
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?
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)
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
Terraformrequiresthe Go runtime as a prerequisite for installation.
Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?
Before you can use a remote backend, you must first execute terra-form init.
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?
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
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.
Which command lets you experiment with terraform expressions?
What feature stops multiple users from operating on the Terraform state at the same time?
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
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 is not a valid source path for specifying a module?
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.
You can access state stored with the local backend by using terraform_remote_state data source.
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?
Which of the following is not a key principle of infrastructure as code?
You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?
A)
B)
C)
D)
A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?
When do changes invoked by terraform apply take effect?
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?
You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?
You're writing a Terraform configuration that needs to read input from a local file called id_rsa.pub . Which built-in Terraform function can you use to import the file's contents as a string?
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
terraform validate uses provider APIs to verify your infrastructure settings.
Terraform configuration (including any module references) can contain only one Terraform provider type.
Terraform providers are part of the Terraform core binary.
While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow 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?
Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example.
Which of these commands makes your code more human readable?