Free TA-002-P Exam Dumps

Question 121

- (Exam Topic 3)
What happens when a terraform apply command is executed?

Correct Answer:B
The terraform apply command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a terraform plan execution plan.
https://www.terraform.io/docs/commands/apply.html

Question 122

- (Exam Topic 4)
Which of the following statements about local modules is incorrect:

Correct Answer:C
Version constraints are supported only for modules installed from a module registry, such as the public Terraform Registry or Terraform Cloud's private module registry. Other module sources can provide their own versioning mechanisms within the source string itself, or might not support versions at all. In particular, modules sourced from local file paths do not support version; since they're loaded from the same source repository, they always share the same version as their caller.
https://www.terraform.io/language/modules/syntax

Question 123

- (Exam Topic 4)
terraform init retrieves the source code tot all referenced modules

Correct Answer:A
Terraform installs providers, initialises source code & modules etc at this stage

Question 124

- (Exam Topic 3)
After creating a new workspace "PROD" you need to run the command terraform select PROD to switch to it.

Correct Answer:A
By default, when you create a new workspace you are automatically switched to it
To create a new workspace and switch to it, you can use terraform workspace new ; to switch to a existing workspace you can use terraform workspace select ;
Example:
$ terraform workspace new example
Created and switched to workspace "example"!
You're now on a new, empty workspace. Workspaces isolate their state, so if you run "terraform plan" Terraform will not see any existing state for this configuration.

Question 125

- (Exam Topic 2)
What is the command you can use to set an environment variable named "var1"of type String?

Correct Answer:D
The environment variable must be in the format TF_VAR_name, so for the QUESTION NO: TF_VAR_var1 is the correct choice.
https://www.terraform.io/docs/commands/environment-variables.html#tf_var_name