Try Before You Buy

Download a free sample of any of our exam questions and answers

  • 24/7 customer support, Secure shopping site
  • Free One year updates to match real exam scenarios
  • If you failed your exam after buying our products we will refund the full amount back to you.

[Nov-2024] Get 100% Real Terraform-Associate-003 Exam Questions, Accurate & Verified BraindumpsIT Dumps in the Real Exam! [Q65-Q85]

Share

[Nov-2024] Get 100% Real Terraform-Associate-003 Exam Questions, Accurate & Verified BraindumpsIT Dumps in the Real Exam!

Pass Your Terraform Associate Exams Fast. All Top Terraform-Associate-003 Exam Questions Are Covered.


HashiCorp Terraform-Associate-003 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Manage resource lifecycle: The section covers topics such as Initializing a configuration using terraform init and its options and generating an execution plan using terraform plan and its options. It also covers the configuration changes using Terraform Apply and its options.
Topic 2
  • Collaborate on infrastructure as code using HCP Terraform: In this section, the topics covered include analyzing the HCP Terraform run workflow, the role of HCP Terraform workspaces and their configuration options, and the management of provider credentials in HCP Terraform.
Topic 3
  • Configure and use Terraform providers: In this section, topics covered include understanding Terraform's plugin-based architecture and configuring providers. It also covers aliasing, sourcing, and versioning functions.
Topic 4
  • Create, maintain, and use Terraform modules: In this section of the exam, candidates are tested for creating a module, using a module in configuration, and topics such as refactoring an existing configuration into modules.

 

NEW QUESTION # 65
Which of the following is not a key principle of infrastructure as code?

  • A. Golden images
  • B. Versioned infrastructure
  • C. Self-describing infrastructure
  • D. Idempotence

Answer: A

Explanation:
Explanation
The key principle of infrastructure as code that is not listed among the options is golden images. Golden images are pre-configured, ready-to-use virtual machine images that contain a specific set of software and configuration. They are often used to create multiple identical instances of the same environment, such as for testing or production. However, golden images are not a principle of infrastructure as code, but rather a technique that can be used with or without infrastructure as code. The other options are all key principles of infrastructure as code, as explained below:
Self-describing infrastructure: This means that the infrastructure is defined in code that describes its desired state, rather than in scripts that describe the steps to create it. This makes the infrastructure easier to understand, maintain, and reproduce.
Idempotence: This means that applying the same infrastructure code multiple times will always result in the same state, regardless of the initial state. This makes the infrastructure consistent and predictable, and avoids errors or conflicts caused by repeated actions.
Versioned infrastructure: This means that the infrastructure code is stored in a version control system, such as Git, that tracks the changes and history of the code. This makes the infrastructure code reusable, auditable, and collaborative, and enables practices such as branching, merging, and rollback. References
= [Introduction to Infrastructure as Code with Terraform], [Infrastructure as Code in a Private or Public Cloud]


NEW QUESTION # 66
When does Terraform create the .terraform.lock.hc1 file?

  • A. After your first terraform apply
  • B. After your first terraform init
  • C. After your first terraform plan
  • D. When you enable state locking

Answer: B

Explanation:
Terraform creates the .terraform.lock.hcl file after the first terraform init command. This lock file ensures that the dependencies for your project are consistent across different runs by locking the versions of the providers and modules used.


NEW QUESTION # 67
How is terraform import run?

  • A. As a part of terraform init
  • B. As a part of terraform plan
  • C. As a part of terraform refresh
  • D. By an explicit call
  • E. All of the above

Answer: D

Explanation:
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. References = [Importing Infrastructure]


NEW QUESTION # 68
You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

  • A. True
  • B. False

Answer: B

Explanation:
Explanation
The execution plan for terraform apply will not be the same as the one you ran locally with terraform plan, if your teammate manually modified the infrastructure component you are working on. This is because Terraform will refresh the state file before applying any changes, and will detect any differences between the state and the real resources.


NEW QUESTION # 69
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?

  • A. Use the terraform taint command targeting the VMs then run terraform plan and terraform apply
  • B. Use the terraform state rm command to remove the VM from state file
  • C. Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply
  • D. Use the terraform apply command targeting the VM resources only

Answer: A

Explanation:
The terraform taint command marks a resource as tainted, which means it will be destroyed and recreated on the next apply. This way, you can replace the VM instance without affecting the database or other resources. Reference = [Terraform Taint]


NEW QUESTION # 70
Variables declared within a module are accessible outside of the module.

  • A. True
  • B. False

Answer: B

Explanation:
Explanation
Variables declared within a module are only accessible within that module, unless they are explicitly exposed as output values1.


NEW QUESTION # 71
Which of the following is not a benefit of adopting infrastructure as code?

  • A. Automation
  • B. Versioning
  • C. A Graphical User Interface
  • D. Reusability of code

Answer: C

Explanation:
Infrastructure as Code (IaC) provides several benefits, including the ability to version control infrastructure, reuse code, and automate infrastructure management. However, IaC is typically associated with declarative configuration files and does not inherently provide a graphical user interface (GUI). A GUI is a feature that may be provided by specific tools or platforms built on top of IaC principles but is not a direct benefit of IaC itself1.
References = The benefits of IaC can be verified from the official HashiCorp documentation on "What is Infrastructure as Code with Terraform?" provided by HashiCorp Developer1.


NEW QUESTION # 72
HashiCorp Configuration Language (HCL) supports user-denned functions.

  • A. True
  • B. False

Answer: B

Explanation:
HashiCorp Configuration Language (HCL) does not support user-defined functions. You can only use the built-in functions that are provided by the language. The built-in functions allow you to perform various operations and transformations on values within expressions. The general syntax for function calls is a function name followed by comma-separated arguments in parentheses, such as max(5, 12, 9). You can find the documentation for all of the available built-in functions in the Terraform Registry or the Packer Documentation, depending on which tool you are using. Reference = : Functions - Configuration Language | Terraform : Functions - Configuration Language | Packer


NEW QUESTION # 73
Which of the following is not true of Terraform providers?

  • A. A community of users can maintain a provider
  • B. An individual person can write a Terraform Provider
  • C. providers
  • D. HashiCorp maintains some providers
  • E. None of the above
  • F. Cloud providers and infrastructure vendors can write, maintain, or collaborate on Terraform

Answer: E

Explanation:
All of the statements are true of Terraform providers. Terraform providers are plugins that enable Terraform to interact with various APIs and services1. Anyone can write a Terraform provider, either as an individual or as part of a community2. HashiCorp maintains some providers, such as the AWS, Azure, and Google Cloud providers3. Cloud providers and infrastructure vendors can also write, maintain, or collaborate on Terraform providers, such as the VMware, Oracle, and Alibaba Cloud providers. References =
*1: Providers - Configuration Language | Terraform | HashiCorp Developer
*2: Plugin Development - How Terraform Works With Plugins | Terraform | HashiCorp Developer
*3: Terraform Registry
*: Terraform Registry


NEW QUESTION # 74
What is the Terraform style convention for indenting a nesting level compared to the one above it?

  • A. With four spaces
  • B. With a tab
  • C. With two spaces
  • D. With three spaces

Answer: C

Explanation:
This is the Terraform style convention for indenting a nesting level compared to the one above it. The other options are not consistent with the Terraform style guide.


NEW QUESTION # 75
Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?

  • A. Terraform Cloud
  • B. Amazon S3
  • C. Git
  • D. Artifactory

Answer: C

Explanation:
This is not a valid backend for Terraform, as it does not support locking or versioning of state files4. The other options are valid backends that can store state files in a central location.


NEW QUESTION # 76
You can reference a resource created with for_each using a Splat ( *) expression.

  • A. True
  • B. False

Answer: B

Explanation:
You cannot reference a resource created with for_each using a splat (*) expression, as it will not work with resources that have non-numeric keys. You need to use a for expression instead to iterate over the resource instances.


NEW QUESTION # 77
You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?

  • A. Run terraform output ip_address to view the result
  • B. In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file
  • C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
  • D. Run terraform destroy then terraform apply and look for the IP address in stdout

Answer: C

Explanation:
This is a quick way to inspect the state file and find the information you need without modifying anything5. The other options are either incorrect or inefficient.


NEW QUESTION # 78
What does this code do?

  • A. Requires any version of the AWS provider >= 3.0
  • B. Requires any version of the AWS provider > = 3.0 major release. like 4.1
  • C. Requires any version of the AWS provider > 3.0
  • D. Requires any version of the AWS provider > = 3.0 and <4.0

Answer: D

Explanation:
Explanation
This is what this code does, by using the pessimistic constraint operator (~>), which specifies an acceptable range of versions for a provider or module.


NEW QUESTION # 79
When do changes invoked by terraform apply take effect?

  • A. None of the above are correct
  • B. Immediately
  • C. Once the resource provider has fulfilled the request
  • D. After Terraform has updated the state file

Answer: C


NEW QUESTION # 80
You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?

  • A. Terraform will use the version recorded in your lock file
  • B. Terraform will use the latest version of the provider available at the time you provision your new resource
  • C. Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources
  • D. Terraform will check your state file to determine the provider version to use

Answer: A

Explanation:
Explanation
This is how Terraform chooses which version of the provider to use, when you add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The lock file records the exact version of each provider that was installed in your working directory, and ensures that Terraform will always use the same provider versions until you run terraform init -upgrade to update them.


NEW QUESTION # 81
How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

  • A. Data.vsphere_datacenter,dc
  • B. Vsphere_datacenter.dc.id
  • C. Data,dc,id
  • D. Data.vsphere_datacenter.DC.id

Answer: D

Explanation:
Explanation
The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which is data.TYPE.NAME.ATTRIBUTE. In this case, the data source type is vsphere_datacenter, the data source name is dc, and the attribute we want to access is id. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or the wrong case. References = [Data Source: vsphere_datacenter],
[Data Source: vsphere_folder], [Expressions: Data Source References]


NEW QUESTION # 82
Which of the following is not a valid siring function in Terraform?

  • A. choaf
  • B. join
  • C. slice
  • D. Split

Answer: A

Explanation:
This is not a valid string function in Terraform. The other options are valid string functions that can manipulate strings in various ways2.


NEW QUESTION # 83
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:

  • A. Mandatory
  • B. Discouraged
  • C. Impossible
  • D. Optional

Answer: B

Explanation:
Changing the Terraform backend after performing the initial terraform apply is technically possible but strongly discouraged. This is because changing backends can lead to complexities in state management, requiring manual intervention such as state migration to ensure consistency. Terraform's documentation and best practices advise planning the backend configuration carefully before applying Terraform configurations to avoid such changes.
Reference = This guidance is consistent with Terraform's official documentation, which recommends careful consideration and planning of backend configurations to avoid the need for changes.


NEW QUESTION # 84
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

  • A. apply
  • B. Plan
  • C. Init
  • D. Import
  • E. Alidate

Answer: A,C

Explanation:
The two steps that are required to provision new infrastructure in the Terraform workflow are init and apply. The terraform init command initializes a working directory containing Terraform configuration files. It downloads and installs the provider plugins that are needed for the configuration, and prepares the backend for storing the state. The terraform apply command applies the changes required to reach the desired state of the configuration, as described by the resource definitions in the configuration files. It shows a plan of the proposed changes and asks for confirmation before making any changes to the infrastructure. Reference = [The Core Terraform Workflow], [Initialize a Terraform working directory with init], [Apply Terraform Configuration with apply]


NEW QUESTION # 85
......

Penetration testers simulate Terraform-Associate-003 exam: https://examtorrent.braindumpsit.com/Terraform-Associate-003-latest-dumps.html