Given the below resource configuration - resource "aws_instance" "web" { # ... count = 4 } What does the terraform resource address aws_instance.web refer to?
Correct Answer: A
A Resource Address is a string that references a specific resource in a larger infrastructure. An address is made up of two parts: [module path][resource spec] Module path: A module path addresses a module within the tree of modules. It takes the form: module.A.module.B.module.C... Multiple modules in a path indicate nesting. If a module path is specified without a resource spec, the address applies to every resource within the module. If the module path is omitted, this addresses the root module. Given a Terraform config that includes: resource "aws_instance" "web" { # ... count = 4 } An address like this: aws_instance.web[3] Refers to only the last instance in the config, and an address like this: aws_instance.web Refers to all four "web" instances. https://www.terraform.io/docs/internals/resource-addressing.html
Question 62
Which parameters does terraform import require? Choose two correct answers.
Correct Answer: B,D
Question 63
Which of these options is the most secure place to store secrets foe connecting to a Terraform remote backend?
Correct Answer: D
Question 64
What are the benefits of using Infrastructure as Code? (select five)
Correct Answer: A,C,D,F
If you are new to infrastructure as code as a concept, it is the process of managing infrastructure in a file or files rather than manually configuring resources in a user interface. A resource in this instance is any piece of infrastructure in a given environment, such as a virtual machine, security group, network interface, etc. At a high level, Terraform allows operators to use HCL to author files containing definitions of their desired resources on almost any provider (AWS, GCP, GitHub, Docker, etc) and automates the creation of those resources at the time of application.
Question 65
How can you ensure that the engineering team who has access to git repo will not create any non-compliant resources that might lead to a security audit failure in future. your team is using Hashicorp Terraform Enterprise Edition.