
VA-002-P Dumps with Practice Exam Questions Answers
VA-002-P by HashiCorp Security Automation Actual Free Exam Practice Test
NEW QUESTION 114
You want to use terraform import to start managing infrastructure that was not originally provisioned through infrastructure as code. Before you can import the resource's current state, what must you do in order to prepare to manage these resources using Terraform?
- A. update the configuration file to include the new resources
- B. modify the Terraform state file to add the new resources
- C. run terraform refresh to ensure that the state file has the latest information for existing resources.
- D. shut down or stop using the resources being imported so no changes are inadvertently missed
Answer: A
Explanation:
The current implementation of Terraform import can only import resources into the state. It does not generate a configuration. Because of this, and prior to running terraform import, it is necessary to manually write a resource configuration block for the resource to which the imported object will be mapped.
First, add the resources to the configuration file:
resource "aws_instance" "example" {
# ...instance configuration...
}
Then run the following command:
$ terraform import aws_instance.example i-abcd1234
NEW QUESTION 115
Select the feature below that best completes the sentence:
The following list represents the different types of __________ available in Terraform.
1. max
2. min
3. join
4. replace
5. list
6. length
7. range
- A. backends
- B. functions
- C. named values
- D. data sources
Answer: B
Explanation:
The Terraform language includes a number of built-in functions that you can call from within expressions to transform and combine values. The Terraform language does not support user-defined functions, and only the functions built into the language are available for use.
NEW QUESTION 116
The Terraform language supports a number of different syntaxes for comments. Select all that are supported. (select three)
- A. /* and */
- B. //
- C. #
- D. <* and *>
Answer: A,B,C
Explanation:
Terraform supports the #, //, and /*..*/ for commenting Terraform configuration files. Please use them when writing Terraform so both you and others who are using your code have a full understanding of what the code is intended to do.
https://www.terraform.io/docs/configuration/syntax.html#comments
NEW QUESTION 117
Terraform Enterprise (also referred to as pTFE) requires what type of backend database for a clustered deployment?
- A. MySQL
- B. Cassandra
- C. MSSQL
- D. PostgreSQL
Answer: D
Explanation:
External Services mode stores the majority of the stateful data used by the instance in an external PostgreSQL database and an external S3-compatible endpoint or Azure blob storage. There are still critical data stored on the instance that must be managed with snapshots. Be sure to check the PostgreSQL Requirements for information that needs to be present for Terraform Enterprise to work. This option is best for users with expertise managing PostgreSQL or users that have access to managed PostgreSQL offerings like AWS RDS.
NEW QUESTION 118
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 show
- B. terraform validate
- C. terraform format
- D. terraform fmt
Answer: B
Explanation:
The terraform validate command validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc.
Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing state. It is thus primarily useful for general verification of reusable modules, including the correctness of attribute names and value types.
NEW QUESTION 119
What is the result of the following terraform function call?
lookup({a="hello", b="goodbye"}, "c", "what?")
- A. goodbye
- B. c
- C. what?
- D. hello
Answer: C
Explanation:
lookup retrieves the value of a single element from a map, given its key. If the given key does not exist, the given default value is returned instead. In this case, the function call is searching for the key "c". But since there is no key "c", the default vault "what?" is returned.
https://www.terraform.io/docs/configuration/functions/lookup.html
NEW QUESTION 120
Complete the following sentence:
The terraform state command can be used to ____
- A. there is no such command
- B. modify the current state, such as removing items
- C. refresh the existing state
- D. view the entire state file
Answer: B
Explanation:
The terraform state command is used for advanced state management. Rather than modify the state directly, the terraform state commands can be used in many cases instead.
https://www.terraform.io/docs/commands/state/index.html
NEW QUESTION 121
Terraform has detailed logs which can be enabled by setting the _________ environmental variable.
- A. TF_DEBUG
- B. TF_LOG
- C. TF_INFO
- D. TF_TRACE
Answer: B
Explanation:
Terraform has detailed logs that can be enabled by setting the TF_LOG environment variable to any value. This will cause detailed logs to appear on stderr.
You can set TF_LOG to one of the log levels TRACE, DEBUG, INFO, WARN, or ERROR to change the verbosity of the logs. TRACE is the most verbose and it is the default if TF_LOG is set to something other than a log level name.
https://www.terraform.io/docs/internals/debugging.html
NEW QUESTION 122
Select the policies below that permit you to create a new entry of foo=bar at the path /secrets/apps/my_secret (select three)
- A. path "secrets/apps/my_secret" {
capabilities = ["update"]
} - B. path "secrets/apps/my_secret" {
capabilities = ["create"]
allowed_parameters = {
"foo" = []
}
} - C. path "secrets/+/my_secret" {
capabilities = ["create"]
allowed_parameters = {
"*" = ["bar"]
}
} - D. path "secrets/apps/*" {
capabilities = ["create"]
allowed_parameters = {
"foo" = ["bar", "zip"]
}
}
Answer: B,C
Explanation:
Setting a parameter with a value of the empty list allows the parameter to contain any value.
Setting a parameter with a value of a populated list allows the parameter to contain only those values.
If any keys are specified, all non-specified parameters will be denied unless the parameter "*" is set to an empty array, which will allow all other parameters to be modified. Parameters with specific values will still be restricted to those values.
NEW QUESTION 123
Beyond encryption and decryption of data, which of the following is not a function of the Vault transit secrets engine?
- A. sign and verify data
- B. generate hashes and HMACs of data
- C. act as a source of random bytes
- D. store the encrypted data securely in Vault for retrieval
Answer: D
Explanation:
Vault doesn't store the data sent to the secrets engine.
The transit secrets engine handles cryptographic functions on data-in-transit. It can also be viewed as "cryptography as a service" or "encryption as a service". The transit secrets engine can also sign and verify data; generate hashes and HMACs of data; and act as a source of random bytes.
NEW QUESTION 124
In a Consul cluster, participating nodes can be only one of two types. Select the valid types. (select two)
- A. secondary
- B. active
- C. passive
- D. follower
- E. leader
- F. primary
Answer: D,E
Explanation:
Within each datacenter, we have a mixture of clients and servers. It is expected that there be between three to five servers. This strikes a balance between availability in the case of failure and performance, as consensus gets progressively slower as more machines are added. However, there is no limit to the number of clients, and they can easily scale into the thousands or tens of thousands.
Server or Leader - It indicates whether the agent is running in server or client mode. Server nodes participate in the consensus quorum, storing cluster state, and handling queries. At any given time, the peer set elects a single node to be the leader. The leader is responsible for ingesting new log entries, replicating to followers, and managing when an entry is considered committed.
Client or Follower - Client nodes make up the majority of the cluster, and they are very lightweight as they interface with the server nodes for most operations and maintain a very little state of their own.
Reference link:- https://www.consul.io/docs/internals/architecture.html
NEW QUESTION 125
After a client has authenticated, what security feature is used to make subsequent calls?
- A. key shard
- B. listener
- C. path
- D. ldap
- E. token
- F. pgp
Answer: E
Explanation:
After authenticating, a client is issued a security token which is associated with a policy. That token is used to make a subsequent request to Vault, such as read, write, etc.
NEW QUESTION 126
After running into issues with Terraform, you need to enable verbose logging to assist with troubleshooting the error. Which of the following values provides the MOST verbose logging?
- A. DEBUG
- B. WARN
- C. TRACE
- D. ERROR
- E. INFO
Answer: C
Explanation:
Terraform has detailed logs that can be enabled by setting the TF_LOG environment variable to any value. This will cause detailed logs to appear on stderr.
You can set TF_LOG to one of the log levels TRACE, DEBUG, INFO, WARN, or ERROR to change the verbosity of the logs. TRACE is the most verbose and it is the default if TF_LOG is set to something other than a log level name.
NEW QUESTION 127
By default, where does Terraform store its state file?
- A. current working directory
- B. shared directory
- C. Amazon S3 bucket
- D. remotely using Terraform Cloud
Answer: A
Explanation:
By default, the state file is stored in a local file named "terraform.tfstate", but it can also be stored remotely, which works better in a team environment.
NEW QUESTION 128
Using the Vault CLI, what command is used to authenticate to Vault?
- A. vault auth
- B. vault creds
- C. vault login
- D. vault user
Answer: C
Explanation:
vault login command would be issued to log in to Vault via CLI followed by the type of login.
For example, an LDAP login would use vault login method=ldap username=<user>
NEW QUESTION 129
Vault has failed to start. You inspect the log and find the error below. What needs to be changed in order to successfully start Vault?
"Error parsing config.hcl: At 1:12: illegal char"
- A. line 1 on the config file is blank
- B. the " character cannot be used in the config file
- C. fix the syntax error in the Vault configuration file
- D. you must use single quotes vs double quotes in the config file
Answer: C
Explanation:
It implies that there is a syntax error in the configuration file. The exact location of the error in the file can be identified in the error message
NEW QUESTION 130
Which of the following actions are performed during a terraform init? (select three)
- A. initializes downloaded and/or installed providers
- B. download the declared providers which are supported by HashiCorp
- C. provisions the declared resources in your configuration
- D. initializes the backend configuration
Answer: A,B,D
Explanation:
The terraform init command is used to initialize a working directory containing Terraform configuration files. This is the first command that should be run after writing a new Terraform configuration or cloning an existing one from version control. It is safe to run this command multiple times.
NEW QUESTION 131
What feature of Vault would allow you to architect a "Vault within a Vault"?
- A. control groups
- B. secrets engines
- C. namespaces
- D. sentinel
Answer: C
Explanation:
Namespaces are isolated environments that functionally exist as "Vaults within a Vault." They have separate login paths and support creating and managing data isolated to their namespace. This data includes the following:
- Secret Engines
- Auth Methods
- Policies
- Identities (Entities, Groups)
- Tokens
Reference link:- https://www.vaultproject.io/docs/enterprise/namespaces
NEW QUESTION 132
Which of the following connection types are supported by the remote-exec provisioner? (select two)
- A. ssh
- B. rdp
- C. smb
- D. winrm
Answer: A,D
Explanation:
The remote-exec provisioner invokes a script on a remote resource after it is created. The remote-exec provisioner supports both ssh and winrm type connections.
NEW QUESTION 133
In Terraform Enterprise, a workspace can be mapped to how many VCS repos?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: A
Explanation:
A workspace can only be configured to a single VCS repo, however, multiple workspaces can use the same repo, if needed. A good Explanation: of how to configure your code repositories can be found here.
NEW QUESTION 134
Which of the following Vault features is available only in the Enterprise version? (select three)
- A. MFA
- B. replication
- C. cloud auto unseal
- D. auto unseal with HSM
- E. dynamic credentials
Answer: A,B,D
Explanation:
Most of the important features of Vault are available in the open-source version, however, some of the features which are generally required by large organizations are only available in the Enterprise version such as:-
- MFA - Multi-factor Authentication
- Replication
- Auto unseal with HSM and many more.
Check all the features at the below link.
Reference link:- https://www.hashicorp.com/products/vault/pricing/
NEW QUESTION 135
What are the benefits of using Infrastructure as Code? (select five)
- A. Infrastructure as Code allows a user to turn a manual task into a simple, automated deployment
- B. Infrastructure as Code gives the user the ability to recreate an application's infrastructure for disaster recovery scenarios
- C. Infrastructure as Code provides configuration consistency and standardization among deployments
- D. Infrastructure as Code is relatively simple to learn and write, regardless of a user's prior experience with developing code
- E. Infrastructure as Code easily replaces development languages such as Go and .Net for application development
- F. Infrastructure as Code is easily repeatable, allowing the user to reuse code to deploy similar, yet different resources
Answer: A,B,C,D,F
Explanation:
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.
NEW QUESTION 136
During a terraform apply, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
- A. Terraform attempts to provide the resource up to three times before exiting with an error
- B. the resource is marked as tainted
- C. it is automatically deleted
- D. the terraform plan is rolled back and all provisioned resources are removed
Answer: B
Explanation:
If a resource successfully creates but fails during provisioning, Terraform will error and mark the resource as "tainted". A resource that is tainted has been physically created, but can't be considered safe to use since provisioning failed.
Terraform also does not automatically roll back and destroy the resource during the apply when the failure happens, because that would go against the execution plan: the execution plan would've said a resource will be created, but does not say it will ever be deleted.
NEW QUESTION 137
Which of the following cloud providers are not supported by Vault secrets engines?
- A. Oracle
- B. AliCloud
- C. GCP
- D. AWS
- E. Azure
Answer: A
Explanation:
Vault supports AWS, Azure, Google Cloud, and Alibaba Cloud out of the box for secrets engines
NEW QUESTION 138
......
HashiCorp VA-002-P Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
| Topic 7 |
|
| Topic 8 |
|
| Topic 9 |
|
| Topic 10 |
|
Free HashiCorp Security Automation VA-002-P Exam Question: https://www.examprepaway.com/HashiCorp/braindumps.VA-002-P.ete.file.html
VA-002-P dumps & HashiCorp Security Automation sure practice dumps: https://drive.google.com/open?id=1x4Ag_heqv9ze_62tSDsHwgHnYl0xuH1g