Which of the following is not a valid source path for specifying a module?
A. source - "github.com/hashicorp/examplePref-ul.0.8M B. source = "./module?version=vl.6.0" C. source - "hashicorp/consul/aws" D. source - "./module"
B. source = "./module?version=vl.6.0"
Explanation
Terraform modules are referenced by specifying a source location. This location can be a URL or a file path. However, specifying query parameters such as version=vl.6.0 directly within the source path is not a valid or supported method for specifying a module version in Terraform. Instead, version constraints are specified using the version argument within the module block, not as part of the source string.
References: This clarification is based on Terraform's official documentation regarding module usage, which outlines the correct methods for specifying module sources and versions.
Question 452:
You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability. How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?
A. Run the terraform fmt command during the code linting phase of your CI/CD process B. Designate one person in each team to review and format everyone's code C. Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf) D. Write a shell script to transform Terraform files using tools such as AWK, Python, and sed
A. Run the terraform fmt command during the code linting phase of your CI/CD process
Explanation
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terraform language style conventions, along with other minor adjustments for readability. Running this command on your configuration files before committing them to source control can help ensure consistency of style between different Terraform codebases, and can also make diffs easier to read. You can also use the -check and -diff options to check if the files are formatted and display the formatting changes respectively2. Running the terraform fmt command during the code linting phase of your CI/CD process can help automate this process and enforce the formatting standards for your team.
Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.
A. True B. False
B. False
Explanation
https://www.terraform.io/downloads
Question 454:
What does Terraform not reference when running a terraform apply -refresh-only ?
A. State file B. Credentials C. Cloud provider D. Terraform resource definitions in configuration files
D. Terraform resource definitions in configuration files
Explanation
When running a terraform apply -refresh-only, Terraform does not reference the configuration files, but only the state file, credentials, and cloud provider. The purpose of this command is to update the state file with the current status of the real resources, without making any changes to them1.
Question 455:
Terraform configuration can only call modules from the public registry.
A. True B. False
B. False
Explanation
Terraform can call modules from various sources including the public Terraform Registry, private registries, local file paths, or version control systems like GitHub.
References:
Terraform Modules
Question 456:
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.workspaces.tfstate C. a file called terraform.tfstate D. directory called terraform.tfstate.d
D. directory called terraform.tfstate.d
Explanation
For local state, Terraform stores the workspace states in a directory called terraform.tfstate.d. https://www.terraform.io/docs/state/workspaces.html#workspace-internals
Question 457:
Please identify the offerings which are unique to Terraform Enterprise, and not available in either Terraform OSS, or Terraform Cloud. Select four.
A. Audit Logs B. Private Network Connectivity C. VCS Integration D. Sentinel E. Clustering
A. Audit Logs B. Private Network Connectivity E. Clustering
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. Yes B. No
A. Yes
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 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.
Question 459:
What is the command you can use to set an environment variable named "var1"of type String?
A. export TF_VAR_VAR1 B. set TF_VAR_var1 C. variable "var1" { type = "string"} D. export TF_VAR_var1
D. export TF_VAR_var1
Explanation
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
Question 460:
You are using a terraform operation that writes state. Unfortunately automatic state unlocking has failed for that operation. Which of the below commands can be used to remove the already acquired lock on the state?
A. terraform unlock B. terraform force-unlock C. terraform state unlock D. None of the above
B. terraform force-unlock
Explanation
Command: force-unlock
Manually unlock the state for the defined configuration. This will not modify your infrastructure. This command removes the lock on the state for the current configuration. The behavior of this lock is dependent on the backend being used.
Local state files cannot be unlocked by another process. https://www.terraform.io/docs/commands/force-unlock.html https://www.terraform.io/docs/state/locking.html Terraform has a force-unlock command to manually unlock the state if
unlocking failed. If you unlock the state when someone else is holding the lock it could cause multiple writers. Force unlock should only be used to unlock your own lock in the situation where automatic unlocking failed.
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.