What is the provider for the resource shown in the Exhibit? resource "aws_vpc" "main" {
name = "test"
}
A. VPC B. test C. main D. aws
D. aws
Explanation
The provider for the aws_vpc resource is aws, as the resource type begins with aws_, which denotes that it is managed by the AWS provider.
References:
Terraform Providers
Question 112:
When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
A. On disk in the /tmp directory B. In memory C. On disk in the .terraform sub-directory D. They are not cached
C. On disk in the .terraform sub-directory
Explanation
"A hidden .terraform directory, which Terraform uses to manage cached provider plugins and modules, record which workspace is currently active, and record the last known backend configuration in case it needs to migrate state on the next run. This directory is automatically managed by Terraform, and is created during initialization." https://www.terraform.io/cli/init
Question 113:
How does Terraform handle working with so many providers?
A. Terraform ships with all of the plugins embedded in the Terraform binary. B. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in the configuration's working directory. C. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in a shared, system-wide plugins directory. D. Terraform allows you to select the providers you want to support during the Terraform installation process.
B. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in the configuration's working directory.
Explanation
Terraform is built on a plugin-based architecture. All providers and provisioners that are used in Terraform configurations are plugins, even the core types such as AWS and Heroku. Users of Terraform are able to write new plugins in order to support new functionality in Terraform.
Question 114:
Which Terraform collection type should you use to store key/value pairs?
A. set B. tuple C. list D. map
D. map
Explanation
Maps/objects are represented by a pair of curly braces containing a series of = pairs The Terraform collection type that should be used to store key/value pairs is map. A map is a collection of values that are accessed by arbitrary labels, called keys. The keys and values can be of any type, but the keys must be unique within a map. For example, var = { key1 = "value1", key2 = "value2" } is a map with two key/value pairs. Maps are useful for grouping related values together, such as configuration options or metadata.
References: [Collection Types], [Map Type Constraints] https://www.terraform.io/language/expressions/types
Question 115:
What is a downside to using the Vault provider to read secrets from Vault?
A. Secrets are persisted to the state file and plans. B. Terraform and Vault must be running on the same version. C. Terraform and Vault must be running on the same physical host. D. Terraform requires a unique auth method to work with Vault.
A. Secrets are persisted to the state file and plans.
Explanation
The Vault provider allows Terraform to read from, write to, and configure Hashicorp Vault. Interacting with Vault from Terraform causes any secrets that you read and write to be persisted in both Terraform's state file and in any generated plan files. For any Terraform module that reads or writes Vault secrets, these files should be treated as sensitive and protected accordingly.
Question 116:
Which of the following clouds does not have a provider maintained HashiCorp?
A. IBM Cloud B. DigitalOcean C. OpenStack D. AWS
A. IBM Cloud
Explanation
IBM Cloud does not have a provider maintained by HashiCorp, although IBM Cloud does maintain their own Terraform provider. https://www.terraform.io/docs/providers/index.html
Question 117:
Terraform variables and outputs that set the "description" argument will store that description in the state file.
You have deployed a new webapp with a public IP address on a clod 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. Run terraform output ip_address to view the result B. In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address D. Run terraform destroy then terraform apply and look for the IP address in stdout
C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
Explanation
This is a quick way to inspect the state file and find the information you need without modifying anything5. The other options are either incorrect or inefficient. https://www.terraform.io/cli/commands/state/show
Question 119:
Consider the following Terraform 0.12 configuration snippet:
1.variable "vpc_cidrs" {
2.type = map
3.default = {
4.us-east-1 = "10.0.0.0/16"
5.us-east-2 = "10.1.0.0/16"
6.us-west-1 = "10.2.0.0/16"
7.us-west-2 = "10.3.0.0/16"
8.}
9.
}
10.
11.resource "aws_vpc" "shared" {
12.cidr_block = _____________
13.}
How would you define the cidr_block for us-east-1 in the aws_vpc resource using a variable?
A. var.vpc_cidrs.0 B. vpc_cidrs["us-east-1"] C. var.vpc_cidrs["us-east-1"] D. var.vpc_cidrs[0]
C. var.vpc_cidrs["us-east-1"]
Explanation
Question 120:
Using multi-cloud and provider-agnostic tools provides which of the following benefits?
A. Operations teams only need to learn and manage a single tool to manage infrastructure, regardless of where the infrastructure is deployed. B. Increased risk due to all infrastructure relying on a single tool for management. C. Can be used across major cloud providers and VM hypervisors. D. Slower provisioning speed allows the operations team to catch mistakes before they are applied.
A. Operations teams only need to learn and manage a single tool to manage infrastructure, regardless of where the infrastructure is deployed. C. Can be used across major cloud providers and VM hypervisors.
Explanation
Using a tool like Terraform can be advantageous for organizations deploying workloads across multiple public and private cloud environments. Operations teams only need to learn a single tool, single language, and can use the same tooling to enable a DevOps-like experience and workflows.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only HashiCorp exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your TERRAFORM-ASSOCIATE-003 exam preparations
and HashiCorp certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.