In Terraform HCL, an object type of object({name=string, age-number}) would match this value.
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
Terraform variables and outputs that set the description argument will store that description in the state file.
Which command must you first run before performing further Terraform operations in a working directory?
A child module can always access variables declared in its parent module.
Which of the following statements about Terraform modules is not true?
terraform validate reports syntax check errors for which of the following?
terraform init creates an example main.tf file in the current directory.
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
What does state looking accomplish?
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?
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?
When does Sentinel enforce policy logic during a Terraform Cloud run?
Which are examples of infrastructure as code? Choose two correct answers.
How does Terraform manage most dependencies between resources?
Which Terraform collection type should you use to store key/value pairs?
You cannot install third party plugins using terraform init.
What is a Terraform provider not responsible for?
Define the purpose of state in Terraform.
Terraform providers are always installed from the Internet.
When should you run terraform init?
Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)
When you use a backend that requires authentication, it is best practice to:
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
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?
When do you need to explicitly execute Terraform in refresh-only mode?
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 are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
Which task does terraform init not perform?
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.
Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?
You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?
Original configuration:
resource "aws_s3_bucket" "photoes" {
bucket_prefix = "images"
}
Updated configuration:
resource "aws_s3_bucket" "photos" {
bucket_prefix = "images"
}
Which of the following module source paths does not specify a remote module?
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 define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.
Which variable type could you use for this input?
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.
What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?
What is the purpose of the terraform.lock.hcl file in Terraform?
How can terraform plan aid in the development process?
Which of these ate features of Terraform Cloud? Choose two correct answers.
Which of the following arguments are required when declaring a Terraform output?
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 method for sharing Terraform configurations fulfills the following criteria:
1. Keeps the configurations confidential within your organization
2. Support Terraform’s semantic version constrains
3. Provides a browsable directory
What is terraform plan -refresh-only intended to detect?
terraform validate uses provider APIs to verify your infrastructure settings.
Which of the following is not a benefit of adopting infrastructure as code?
Which command(s) adds existing resources in a public cloud into Terraform state?
The_________determines how Terraform creates, updates, or delete resources.
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 you use a remote backend that needs authentication, HashiCorp recommends that you:
Select the command that doesn’t cause Terraform to refresh its state.
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?
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?
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?
You can reference a resource created with for_each using a Splat ( *) expression.
Which of the following is not a key principle of infrastructure as code?
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?
Infrastructure as Code (laC) can be stored in a version control system along with application code.
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
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?
Which option cannot be used to keep secrets out of Terraform configuration files?
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?
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.
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 are features of Terraform Cloud? Choose two correct answers.
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 provider authentication method prevents credentials from being stored in the state file?
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.