Get Mar-2024 Dumps to Pass your TA-002-P Exam with 100% Real Questions and Answers
Updated Exam TA-002-P Dumps with New Questions
NEW QUESTION # 54
In Terraform Enterprise, a workspace can be mapped to how many VCS repos?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
Explanation:
Explanation
A workspace can only be configured to a single VCS repo, however, multiple workspaces can use the same repo.
https://www.terraform.io/docs/cloud/workspaces/vcs.html
NEW QUESTION # 55
True or False? By default, Terraform destroy will prompt for confirmation before proceeding.
- A. False
- B. True
Answer: B
NEW QUESTION # 56
Eric needs to make use of module within his terraform code. Should the module always be public and open-source to be able to be used?
- A. False
- B. True
Answer: A
Explanation:
Explanation
Terraform module need not be public and open-source. Module can be placed in -
* Local paths
* Terraform Registry
* GitHub
* Bitbucket
* Generic Git, Mercurial repositories
* HTTP URLs
* S3 buckets
* GCS buckets
https://www.terraform.io/docs/modules/sources.html
NEW QUESTION # 57
What is the workflow for deploying new infrastructure with Terraform?
- A. terraform plan to import the current infrastructure to the state file, make code changes, and terraform apply to update the infrastructure
- B. Write a Terraform configuration, run terraform init, run terraform plan to view planned infrastructure
- C. Write a Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure.
- D. terraform plan to import the current infrastructure to the state file, make code changes, and terraform apply to update the infrastructure
Answer: A
Explanation:
changes, and terraform apply to create new infrastructure.
Reference:
+run+terraform+plan+to+view+planned+infrastructure+changes%2C+and+terraform+apply+to+create+new
+infrastructure.&oq=Write+a+Terraform+configuration%2C+run+terraform+init%2C+run+terraform+plan+to
+view+planned+infrastructure+changes%2C+and+terraform+apply+to+create+new
+infrastructure.&aqs=chrome..69i57.556j0j7&sourceid=chrome&ie=UTF-8
NEW QUESTION # 58
Which of the following allows Terraform users to apply policy as code to enforce standardized configurations for resources being deployed via infrastructure as code?
- A. Workspaces
- B. Sentinel
- C. Module registry
- D. Functions
Answer: B
Explanation:
Explanation
Sentinel is a language and framework for policy built to be embedded in existing software to enable fine-grained, logic-based policy decisions. A policy describes under what circumstances certain behaviors are allowed. Sentinel is an enterprise-only feature.
https://www.youtube.com/watch?v=Vy8s7AAvU6g&feature=emb_title
NEW QUESTION # 59
Your manager has instructed you to start using terraform for your day-to-day operations, but your security team is concerned about the terraform state files. They have heard it contains confidential information, and are worried that it will not be securely protected. What should be your response to the security team in this regard?
- A. Inform the security team that using terraform state is optional . There are ways to avoid it , and you will do the same.
- B. Ensure that the state is managed in a remote backend , preferably an enterprise grade state management system like Terraform Cloud.
- C. Keep the state file locally on each developer machine , and ensure that there is a local protection software like KeyPass protecting it.
- D. Mask the confidential entries in the terraform state file , using Vault Enterprise, another Hashicorp product , while keeping it locally.
Answer: B
Explanation:
https://www.terraform.io/docs/state/index.html
State is very important topic for exam. Please read all of the below subtopics Purpose Import Existing Resources Locking Workspaces Remote State Sensitive Data
NEW QUESTION # 60
What allows you to conveniently switch between multiple instances of a single configuration within its single backend?
- A. Remote backends
- B. Workspaces
- C. Providers
- D. Local backends
Answer: B
Explanation:
Named workspaces allow conveniently switching between multiple instances of a single configuration within its single backend. ... A common use for multiple workspaces is to create a parallel, distinct copy of a set of infrastructure in order to test a set of changes before modifying the main production infrastructure.
Workspaces, allowing multiple states to be associated with a single configuration. The configuration still has only one backend, but multiple distinct instances of that configuration to be deployed without configuring a new backend or changing authentication credentials.
https://www.terraform.io/docs/state/workspaces.html
NEW QUESTION # 61
Which of the below options is a valid interpolation syntax for retrieving a data source?
- A. ${google_storage_bucket.backend}
- B. ${data.google_dns_keys.foo_dns_keys.key_signing_keys[0].ds_record}
- C. ${azurerm_resource_group.test.data}
- D. ${aws_instance.web.id.data}
Answer: B
Explanation:
Explanation
Data source attributes are interpolated with the general syntax data.TYPE.NAME.ATTRIBUTE. The
interpolation for a resource is the same but without the data. prefix (TYPE.NAME.ATTRIBUTE).
https://www.terraform.io/docs/configuration-0-11/interpolation.html#attributes-of-a-data-source
NEW QUESTION # 62
What command should you run to display all workspaces for the current configuration?
- A. terraform workspace list
- B. terraform show workspace
- C. terraform workspace
- D. terraform workspace show
Answer: A
Explanation:
Explanation
terraform workspace list
The command will list all existing workspaces.
Reference: https://www.terraform.io/docs/cli/commands/workspace/list.html
NEW QUESTION # 63
The_________determines how Terraform creates, updates, or delete resources.
- A. Terraform provisioner
- B. Terraform core
- C. Terraform provider
- D. Terraform configuration
Answer: C
Explanation:
This is what determines how Terraform creates, updates, or deletes resources, as it is responsible for understanding API interactions with some service and exposing resources and data sources based on that API.
NEW QUESTION # 64
Refer to the below code where developer is outputting the value of the database password but has used sensitive parameter to hide the output value in the CLI.
output "db_password" { value = aws_db_instance.db.password description = "The password for logging in to the database." sensitive = true} Since sensitive is set to true, the value associated with db password will not be present in state file as plain-text?
- A. False
- B. True
Answer: A
Explanation:
Sensitive output values are still recorded in the state, and so will be visible to anyone who is able to access the state data.
NEW QUESTION # 65
Select all features which are exclusive to Terraform Enterprise. (Select Three)
- A. Sentinel
- B. Clustering
- C. Audit Logs
- D. SAML/SSO
- E. Cost Estimation
Answer: B,C,D
Explanation:
Sentinel and Cost Estimation are also available in Terraform Cloud
https://www.hashicorp.com/products/terraform/pricing/
NEW QUESTION # 66
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. {
3. required_providers
4. {
5. aws = "~> 1.2.0"
6. }
7. }
- A. 1.2.3
- B. 1.3.0
- C. 1.3.1
- D. 1.2.9
Answer: A,D
Explanation:
Explanation
As your Terraform usage becomes more advanced, there are some cases where you may need to modify the
Terraform state. Rather than modify the state directly, the terraform state commands can be used in many
cases instead. This command is a nested subcommand, meaning that it has further subcommands.
https://www.terraform.io/docs/commands/state/index.html
NEW QUESTION # 67
Valarie has created a database instance in AWS and for ease of use is outputting the value of the database password with the following code. Valarie wants to hide the output value in the CLI after terraform apply that's why she has used sensitive parameter.
1. output "db_password" {
2. value = local.db_password
3. sensitive = true
4. }
Since sensitive is set to true, will the value associated with db password be available in plain-text in the state file for everyone to read?
- A. No
- B. Yes
Answer: B
Explanation:
Outputs can be marked as containing sensitive material by setting the sensitive attribute to true, like this:
output "sensitive" {
sensitive = true
value = VALUE
}
When outputs are displayed on-screen following a terraform apply or terraform refresh, sensitive outputs are redacted, with <sensitive> displayed in place of their value.
Limitations of Sensitive Outputs
The values of sensitive outputs are still stored in the Terraform state, and available using the terraform output command, so cannot be relied on as a sole means of protecting values.
Sensitivity is not tracked internally, so if the output is interpolated in another module into a resource, the value will be displayed.
NEW QUESTION # 68
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
- A. False
- B. True
Answer: A
Explanation:
Explanation
TF_LOG_PATH IS NOT REQUIRED, in the docs, they do not mention HAVE TO SET TF_LOG_PATH, it
is optional, therefore without TF_LOG_PATH will cause detailed logs to appear on stderr.
https://www.computerhope.com/jargon/s/stderr.htm#:~:text=Stderr%2C%20also%20known%20as%20standard,d
NEW QUESTION # 69
Which of the below command will upgrade the provider version to the latest acceptable one?
- A. terraform provider -upgrade
- B. terraform init -update
- C. terraform init -upgrade
- D. terraform plan upgrade
Answer: C
Explanation:
To upgrade to the latest acceptable version of each provider, run terraform init -upgrade. This command also upgrades to the latest versions of all Terraform modules.
https://www.terraform.io/docs/configuration/providers.html
NEW QUESTION # 70
When using a module block to reference a module stored on the public Terraform Module Registry such as:
How do you specify version 1.0.0?
- A. Append ?ref=v1.0.0 argument to the source path
- B. Modules stored on the public Terraform Module Registry do not support versioning
- C. Nothing - modules stored on the public Terraform Module Registry always default to version 1.0.0
- D. Add version = "1.0.0" attribute to module block
Answer: B
Explanation:
Reference: https://www.terraform.io/docs/language/modules/sources.html
NEW QUESTION # 71
Most Terraform providers interact with ____________.
- A. Shell scripts
- B. VCS Systems
- C. None of the above
- D. API
Answer: D
Explanation:
Explanation
Terraform relies on plugins called "providers" to interact with cloud providers, SaaS providers, and other
APIs, as per: https://www.terraform.io/language/providers
NEW QUESTION # 72
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
Explanation
The terraform workspace select command is used to choose a different workspace to use for further operations. https://www.terraform.io/docs/commands/workspace/select.html
Answer: B
NEW QUESTION # 73
You would like to reuse the same Terraform configuration for your development and production environments
with a different state file for each.
Which command would you use?
- A. terraform import
- B. terraform init
- C. terraform state
- D. terraform workspace
Answer: D
Explanation:
Explanation
https://www.terraform.io/language/state/workspaces#when-to-use-multiple-workspaces
NEW QUESTION # 74
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
- A. Run terraform refresh
- B. Run terraform import
- C. Manually update the state fire
- D. It will happen automatically
Answer: A
NEW QUESTION # 75
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
Answer: B
Explanation:
Explanation
https://www.terraform.io/docs/commands/force-unlock.html
NEW QUESTION # 76
......
100% Pass Guarantee for TA-002-P Exam Dumps with Actual Exam Questions: https://www.testsdumps.com/TA-002-P_real-exam-dumps.html
Today Updated TA-002-P Exam Dumps Actual Questions: https://drive.google.com/open?id=1tevd3oo7ty_i_0kMv1YDc5Q-U0BGMCN4
