Free Terraform-Associate-003 Exam Braindumps (page: 25)

Page 25 of 45

A terraform apply can not _________ infrastructure.

  1. change
  2. destroy
  3. provision
  4. import

Answer(s): D

Explanation:

The terraform import command is used to import existing infrastructure into Terraform's state. This allows Terraform to manage and destroy the imported infrastructure as part of the configuration. The terraform import command does not modify the configuration, so the imported resources must be manually added to the configuration after the import. Reference = [Importing Infrastructure]



How is terraform import run?

  1. As a part of terraform init
  2. As a part of terraform plan
  3. As a part of terraform refresh
  4. By an explicit call
  5. All of the above

Answer(s): D

Explanation:

The terraform import command is not part of any other Terraform workflow. It must be explicitly invoked by the user with the appropriate arguments, such as the resource address and the ID of the existing infrastructure to import. Reference = [Importing Infrastructure]



A provider configuration block is required in every Terraform configuration.
Example:

  1. True
  2. False

Answer(s): B

Explanation:

A provider configuration block is not required in every Terraform configuration. A provider configuration block can be omitted if its contents would otherwise be empty. Terraform assumes an empty default configuration for any provider that is not explicitly configured. However, some providers may require some configuration arguments (such as endpoint URLs or cloud regions) before they can be used. A provider's documentation should list which configuration arguments it expects. For providers distributed on the Terraform Registry, versioned documentation is available on each provider's page, via the "Documentation" link in the provider's header. Reference = [Provider Configuration]1



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?

  1. Run the terraform fmt command during the code linting phase of your CI/CD process Most Voted
  2. Designate one person in each team to review and format everyone's code
  3. Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)
  4. Write a shell script to transform Terraform files using tools such as AWK, Python, and sed

Answer(s): A

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 respectively. 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. Reference = [Command: fmt]2



Page 25 of 45



Post your Comments and Discuss HashiCorp Terraform-Associate-003 exam with other Community members:

Marc commented on October 18, 2024
What the best way to learn terraform?
UNITED STATES
upvote

Chandra commented on October 09, 2024
This is the best and only way of passing this exam as it is extremely hard. Good questions and valid dump.
INDIA
upvote

Madhan commented on September 26, 2024
Useful questions
INDIA
upvote

Abu commented on September 22, 2024
I did not know these questions were available online. I did not believe and trust them and studied quite a lot and just used these questions for practice. But most of the questions turned out to be in the exam.
UNITED STATES
upvote

Sahin commented on July 04, 2024
Need que to learn new things
UNITED STATES
upvote