Questions
ayuda
option
My Daypo

ERASED TEST, YOU MAY BE INTERESTED ONHashiCorp Terraform TA-002-P Questions & Answer Part1/3

COMMENTS STATISTICS RECORDS
TAKE THE TEST
Title of test:
HashiCorp Terraform TA-002-P Questions & Answer Part1/3

Description:
HASHICORP TERRAFORM ASSOCIATE Practice Questions Advanced

Author:
AVATAR

Creation Date:
14/02/2022

Category:
Computers

Number of questions: 50
Share the Test:
Facebook
Twitter
Whatsapp
Share the Test:
Facebook
Twitter
Whatsapp
Last comments
No comments about this test.
Content:
True or False? terraform init cannot automatically download Community providers? A. False B. True.
Which of the following terraform subcommands could be used to remove the lock on the state for the current configuration? A. Unlock B. force-unlock C. Removing the lock on a state file is not possible D. state-unlock.
A user has created a module called "my_test_module" and committed it to GitHub. Over time, several commits have been made with updates to the module, each tagged in GitHub with an incremental version number. Which of the following lines would be required in a module configuration block in terraform to select tagged version v1.0.4? A. source = "git::https://example.com/my_test_module.git@tag=v1.0.4" B. source = "git::https://example.com/my_test_module.git&ref=v1.0.4" C. source = "git::https://example.com/my_test_module.git#tag=v1.0.4" D. source = "git::https://example.com/my_test_module.git?ref=v1.0.4".
In the example below, the depends_on argument creates what type of dependency? 1. resource "aws_instance" "example" { 2. ami = "ami-2757f631" 3. instance_type = "t2.micro" 4. depends_on = [aws_s3_bucket.company_data] 5. } A. implicit dependency B. internal dependency C. explicit dependency D. non-dependency resource.
Terraform has detailed logs which can be enabled by setting the _________ environmental variable. A. TF_LOG B. TF_TRACE C. TF_DEBUG D. TF_INFO .
What is the result of the following terraform function call? > index(["a", "b", "c"], "c") A. 1 B. True C. 0 D. 2.
Select the operating systems which are supported for a clustered Terraform Enterprise: (select four) A. Unix B. Red Hat C. CentOS Amazon Linux E. Ubuntu.
Which Terraform command will check and report errors within modules, attribute names, and value types to make sure they are syntactically valid and internally consistent? A. terraform validate B. terraform show C. terraform format D. terraform fmt.
In order to reduce the time it takes to provision resources, Terraform uses parallelism. By default, how many resources will Terraform provision concurrently? A. 5 B. 50 C. 10 D. 20 .
Provider dependencies are created in several different ways. Select the valid provider dependencies from the following list: (select three) A. Explicit use of a provider block in configuration, optionally including a version constraint. B. Use of any resource belonging to a particular provider in a resource or data block in configuration. C. Existence of any resource instance belonging to a particular provider in the current state. D. Existence of any provider plugins found locally in the working directory.
Complete the following sentence: The terraform state command can be used to ____ A. modify state B. view state C. refresh state D. There is no such command.
The following is a snippet from a Terraform configuration file: 1. provider "aws" { 2. region = "us-east-1" 3. } 4. provider "aws" { 5. region = "us-west-1" 6. } Which, when validated, results in the following error:- Error: Duplicate provider configuration on main.tf line 5: 5: provider "aws" { A default provider configuration for "aws" was already given at main.tf:1,1-15. If multiple configurations are required, set the "______" argument for alternative configurations. Fill in the blank in the error message with the correct string from the list below. A. version B. multi C. label D. alias.
True or False. The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. If drift is detected between the real-world infrastructure and the last known-state, it will modify the infrastructure to correct the drift. A. False B. True .
True or False? Each Terraform workspace uses its own state file to manage the infrastructure associated with that particular workspace. A. False B. True .
True or False? By default, Terraform destroy will prompt for confirmation before proceeding. A. False B. True .
Choose the correct answer which fixes the syntax of the following Terraform code: A. 1. resource "aws_security_group" "vault_elb" { 2. name = "${var.name_prefix}-vault-elb" 3. description = Vault ELB 4. vpc_id = var.vpc_id 5. } B. 1. resource "aws_security_group" "vault_elb" { 2. name = "${var.name_prefix}-vault-elb" 3. description = var_Vault ELB 4. vpc_id = var.vpc_id 5. } C. 1. resource "aws_security_group" "vault_elb" { 2. name = "${var.name_prefix}-vault-elb" 3. description = "Vault ELB" 4. vpc_id = var.vpc_id 5. } D. 1. resource "aws_security_group" "vault_elb" { 2. name = "${var.name_prefix}-vault-elb" 3. description = "${Vault ELB}" 4. vpc_id = var.vpc_id 5. } E. 1. resource "aws_security_group" "vault_elb" { 2. name = "${var.name_prefix}-vault-elb" 3. description = [Vault ELB] 4. vpc_id = var.vpc_id 5. }.
Which of the following commands will launch the Interactive console for Terraform interpolations? A. terraform console B. terraform cli C. terraform D. terraform cmdline.
During a terraform plan, a resource is successfully created but eventually fails during provisioning. What happens to the resource? A. Terraform attempts to provision the resource up to three times before exiting with an error B. the terraform plan is rolled back and all provisioned resources are removed C. it is automatically deleted D. the resource is marked as tainted .
Which of the following is "not" a valid Terraform "string" function? A. replace B. format C. join D. tostring .
Which of the following statements best describes the Terraform list(...) type? A. a collection of values where each is identified by a string label. B. a sequence of values identified by consecutive whole numbers starting with zero. C. a collection of unique values that do not have any secondary identifiers or ordering. D. a collection of named attributes that each have their own type. .
True or False? When using the Terraform provider for Vault, the tight integration between these HashiCorp tools provides the ability to mask secrets in the terraform plan and state files. A. False B. True .
When multiple arguments with single-line values appear on consecutive lines at the same nesting level, HashiCorp recommends that you: A. put arguments in alphabetical order 1. name = "www.example.com" 2. records = [aws_eip.lb.public_ip] 3. type = "A" 4. ttl = "300" 5. zone_id = aws_route53_zone.primary.zone_id B. place a space in between each line 1. type = "A" 2. ttl = "300" 3. zone_id = aws_route53_zone.primary.zone_id C. place all arguments using a variable at the top 4. ami = var.aws_ami 5. instance_type = var.instance_size 6. subnet_id = "subnet-0bb1c79de3EXAMPLE" 7. tags = { Name = "HelloWorld"} D. align their equals signs 8. ami = "abc123" 9. instance_type = "t2.micro" .
When writing Terraform code, HashiCorp recommends that you use how many spaces between each nesting level? A. 4 B. 2 C. 1 D. 5 .
Why might a user opt to include the following snippet in their configuration file? 1. terraform { 2. required_version = ">= 0.12" 3. } A. Terraform 0.12 introduced substantial changes to the syntax used to write Terraform configuration B. The user wants to ensure that the application being deployed is a minimum version of 0.12 C. this ensures that all Terraform providers are above a certain version to match the application being deployed D. versions before Terraform 0.12 were not approved by HashiCorp to be used in production.
Anyone can publish and share modules on the Terraform Public Module Registry, and meeting the requirements for publishing a module is extremely easy. Select from the following list all valid requirements. (select three) A. The module must be PCI/HIPPA compliant. B. Module repositories must use this three-part name format, terraform-<PROVIDER>-<NAME>. C. The registry uses tags to identify module versions. Release tag names must be for the format x.y.z, and can optionally be prefixed with a v . D. The module must be on GitHub and must be a public repo. .
A user runs terraform init on their RHEL based server and per the output, two provider plugins are downloaded: $ terraform init Initializing the backend... Initializing provider plugins... - Checking for available provider plugins... - Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0... - Downloading plugin for provider "random" (hashicorp/random) 2.2.1... : Terraform has been successfully initialized! Where are these plugins downloaded to? A. The .terraform.plugins directory in the directory terraform init was executed in. B. The .terraform/plugins directory in the directory terraform init was executed in. C. /etc/terraform/plugins D. The .terraform.d directory in the directory terraform init was executed in.
Which of the following is an invalid variable name? A. count B. web C. var1 D. instance_name.
In the following code snippet, the block type is identified by which string? 1. resource "aws_instance" "db" { 2. ami = "ami-123456" 3. instance_type = "t2.micro" 4. } A. "aws_instance" B. resource C. "db" D. instance_type .
Which statements best describes what the local variable assignment is doing in the following code snippet: 1. variable "subnet_details" { 2. type = list(object({ 3. cidr = string 4. subnet_name = string 5. route_table_name = string 6. aznum = number 7. })) 8. } 9. locals { 10. route_tables_all = distinct([for s in var.subnet_details : s.route_table_name ]) 11. } A. Create a distinct list of route table name objects B. Create a map of route table names to subnet names C. Create a map of route table names from a list of subnet names D. Create a list of route table names eliminating duplicates .
A "backend" in Terraform determines how state is loaded and how an operation such as apply is executed. Which of the following is not a supported backend type? A. consul B. terraform enterprise C. github D. artifactory E. s3 .
A user has created three workspaces using the command line - prod, dev, and test. The user wants to create a fourth workspace named stage. Which command will the user execute to accomplish this? A. terraform workspace create stage B. terraform workspace -new stage C. terraform workspace -create stage D. terraform workspace new stage .
What is the result of the following terraform function call? > lookup({a="hello", b="goodbye"}, "c", "what?") A. hello B. what? C. c D. goodbye .
In terraform, most resource dependencies are handled automatically. Which of the following statements describes best how terraform resource dependencies are handled? A. Resource dependencies are identified and maintained in a file called resource.dependencies. Each terraform provider is required to maintain a list of all resource dependencies for the provider and it's included with the plugin during initialization when terraform init is executed. The file is located in the terraform.d folder. B. The terraform binary contains a built-in reference map of all defined Terraform resource dependencies. Updates to this dependency map are reflected in terraform versions. To ensure you are working with the latest resource dependency map you much be running the latest version of Terraform. C. Resource dependencies are handled automatically by the depends_on meta_argument, which is set to true by default. D. Terraform analyses any expressions within a resource block to find references to other objects, and treats those references as implicit ordering requirements when creating, updating, or destroying resources.
From the code below, identify the implicit dependency: 1. resource "aws_eip" "public_ip" { 2. vpc = true 3. instance = aws_instance.web_server.id 4. } 5. resource "aws_instance" "web_server" { 6. ami = "ami-2757f631" 7. instance_type = "t2.micro" 8. depends_on = [aws_s3_bucket.company_data] } A. The EIP with an id of ami-2757f631 B. The AMI used for the EC2 instance C. The EC2 instance labeled web_server D. The S3 bucket labeled company_data .
Terraform Cloud is more powerful when you integrate it with your version control system (VCS) provider. Select all the supported VCS providers from the answers below. (select four) A. GitHub B. CVS Version Control C. Azure DevOps Server D. Bitbucket Cloud E. GitHub Enterprise.
When using constraint expressions to signify a version of a provider, which of the following are valid provider versions that satisfy the expression found in the following code snippet: (select two) 1. terraform { 2. required_providers { 3. aws = "~> 1.2.0" 4. } 5. } A. 1.2.9 B. 1.2.3 C. 1.3.1 D. 1.3.0 .
Terraform Enterprise (also referred to as pTFE) requires what type of backend database for a clustered deployment? A. PostgreSQL B. Cassandra C. MySQL D. MSSQL .
Select all features which are exclusive to Terraform Enterprise. (select three) A. Cost Estimation B. Sentinel C. Audit Logs D. SAML/SSO E. Clustering .
When Terraform needs to be installed in a location where it does not have internet access to download the installer and upgrades, the installation is generally known as to be __________. A. a private install B. disconnected C. air-gapped D. non-traditional .
When using providers that require the retrieval of data, such as the HashiCorp Vault provider, in what phase does Terraform actually retrieve the data required? A. terraform delete B. terraform plan C. terraform init D. terraform apply .
What feature of Terraform Cloud and/or Terraform Enterprise can you publish and maintain a set of custom modules which can be used within your organization? A. Terraform registry B. custom VCS integration C. private module registry D. remote runs.
The Terraform language supports a number of different syntaxes for comments. Select all that are supported. (select three) A. // B. /* and */ C. # D. <* and *> .
Complete the following sentence: For local state, the workspaces are stored directly in a... A. a file called terraform.tfstate.backup B. directory called terraform.tfstate.d C. a file called terraform.tfstate D. directory called terraform.workspaces.tfstate.
Environment variables can be used to set variables. The environment variables must be in the format "____"_<variablename>. Select the correct prefix string from the following list. A. TF_VAR_NAME B. TF_ENV_VAR C. TF_VAR D. TF_ENV.
Select the most accurate statement to describe the Terraform language from the following list. A. Terraform is an immutable, declarative, Infrastructure as Code provisioning language based on Hashicorp Configuration Language, or optionally JSON. B. Terraform is a mutable, declarative, Infrastructure as Code configuration management language based on Hashicorp Configuration Language, or optionally JSON. C. Terraform is an immutable, procedural, Infrastructure as Code configuration management language based on Hashicorp Configuration Language, or optionally JSON. D. Terraform is a mutable, procedural, Infrastructure as Code provisioning language based on Hashicorp Configuration Language.
A user creates three workspaces from the command line - prod, dev, and test. Which of the following commands will the user run to switch to the dev workspace? A. terraform workspace dev B. terraform workspace select dev C. terraform workspace -switch dev D. terraform workspace switch dev.
Which of the following variable declarations is going to result in an error? A. 1. variable "example" { 2. description = "This is a test" 3. type = map 4. default = {"one" = 1, "two" = 2, "Three" = "3"} 5. } B. 1. variable "example" { 2. type = object({}) 3. } C. 1. variable "example" {} D. 1. variable "example" { 2. description = "This is a variable description" 3. type = list(string) 4. default = {} 5. }.
Select all Operating Systems that Terraform is available for. (select five) A. Linux B. macOS C. Unix D. Solaris E. Windows F. FreeBSD.
While Terraform is generally written using the HashiCorp Configuration Language (HCL), what other syntax can Terraform are expressed in? A. JSON B. YAML C. TypeScript D. XML.
What is the result of the following terraform function call? > zipmap(["a", "b"], [1, 2]) A. A. { "a", "b", "1", "2", } B. { "a" = 1 "b" = 2 } C. [ "a", "b", "1", "2", ] D. [ "a" = 1 "b" = 2 ].
Report abuse Consent Terms of use