{"id":80180,"date":"2021-12-02T03:27:15","date_gmt":"2021-12-02T08:57:15","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=80180"},"modified":"2023-11-30T21:16:05","modified_gmt":"2023-12-01T02:46:05","slug":"terraform-certification-exam-questions","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/","title":{"rendered":"50 Free Terraform Certification Exam Questions"},"content":{"rendered":"<p>The Terraform Associate certification is for Cloud Engineers. You should have basic terminal skills and an understanding of on-premises and cloud architecture.<\/p>\n<p>If you are new to the Terraform environment, we recommend you to practice in the demo environment and also check our <a href=\"https:\/\/www.whizlabs.com\/hashicorp-certified-terraform-associate\/\" target=\"_blank\" rel=\"noopener\">Terraform Associate practice exam.<\/a><\/p>\n<p>This set of 50 free Terraform certification exam questions should give you a solid understanding of how Terraform associate exam is structured, the question format, and the exam pattern.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#What_will_you_learn_in_Hashicorp_Terraform_Associate_Exam\" >What will you learn in Hashicorp Terraform Associate Exam?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#HashiCorp_Certified_Terraform_Certification_Exam_Questions\" >HashiCorp Certified Terraform Certification Exam Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Use_the_Terraform_CLI_outside_of_core_workflow\" >Domain :\u00a0Use the Terraform CLI (outside of core workflow)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Use_the_Terraform_CLI_outside_of_core_workflow-2\" >Domain :\u00a0Use the Terraform CLI (outside of core workflow)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraform_Cloud_and_Enterprise_capabilities\" >Domain :\u00a0Understand Terraform Cloud and Enterprise capabilities<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraforms_purpose_vs_other_IaC\" >Domain :\u00a0Understand Terraform\u2019s purpose (vs other IaC)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraform_basics\" >Domain :\u00a0Understand Terraform basics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Interact_with_Terraform_modules\" >Domain :\u00a0Interact with Terraform modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Interact_with_Terraform_modules-2\" >Domain :\u00a0Interact with Terraform modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Navigate_Terraform_workflow\" >Domain :\u00a0Navigate Terraform workflow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Implement_and_maintain_state\" >Domain :\u00a0Implement and maintain state<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Read_generate_and_modify_configuration\" >Domain :\u00a0Read, generate, and modify configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Read_generate_and_modify_configuration-2\" >Domain :\u00a0Read, generate, and modify configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraform_Cloud_and_Enterprise_capabilities-2\" >Domain :\u00a0Understand Terraform Cloud and Enterprise capabilities<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_infrastructure_as_code_IaC_concepts\" >Domain :\u00a0Understand infrastructure as code (IaC) concepts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraforms_purpose_vs_other_IaC-2\" >Domain :\u00a0Understand Terraform\u2019s purpose (vs other IaC)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Use_the_Terraform_CLI_outside_of_core_workflow-3\" >Domain :\u00a0Use the Terraform CLI (outside of core workflow)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Interact_with_Terraform_modules-3\" >Domain :\u00a0Interact with Terraform modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Interact_with_Terraform_modules-4\" >Domain :\u00a0Interact with Terraform modules<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Implement_and_maintain_state-2\" >Domain :\u00a0Implement and maintain state<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Read_generate_and_modify_configuration-3\" >Domain :\u00a0Read, generate, and modify configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraform_basics-2\" >Domain :\u00a0Understand Terraform basics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraform_basics-3\" >Domain :\u00a0Understand Terraform basics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_Terraform_basics-4\" >Domain :\u00a0Understand Terraform basics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.whizlabs.com\/blog\/terraform-certification-exam-questions\/#Domain_Understand_infrastructure_as_code_IaC_concepts-2\" >Domain :\u00a0Understand infrastructure as code (IaC) concepts<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"What_will_you_learn_in_Hashicorp_Terraform_Associate_Exam\"><\/span><span style=\"font-weight: 400;\">What will you learn in Hashicorp Terraform Associate Exam?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The operations, IT, and DevOps professionals knowledgeable with the fundamental open-source HashiCorp Terraform concepts and abilities are the target audience for the HashiCorp Terraform Associate certification.<\/p>\n<p><span style=\"font-weight: 400;\">This certification will help you learn DevOps and cloud engineering and it focuses mainly on upgrading your skills in Infrastructure as as Code(IaC). Other than that you will learn the 9 following topics.<\/span><\/p>\n<ul>\n<li>Comprehending Infrastructure as Code (IaC)<\/li>\n<li>Assessing Terraform\u2019s purpose<\/li>\n<li>Fundamentals of Terraform<\/li>\n<li>Handling Terraform CLI (outside workflow)<\/li>\n<li>Managing Terraform Workflows<\/li>\n<li>Deploy and handle state<\/li>\n<li>Managing Terraform Modules<\/li>\n<li>Familiarity with Terraform cloud and Enterprise capabilities<\/li>\n<li>Read, produce, and alter configurations<\/li>\n<\/ul>\n<p><strong>Latest Updates 2023<\/strong><\/p>\n<p><strong>(Update as of May 19, 2023)<\/strong> The latest HashiCorp Certified: Terraform Associate (003) exam is now accessible!<\/p>\n<p><a href=\"https:\/\/www.whizlabs.com\/pricing\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone size-full wp-image-91942\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-scaled.webp\" alt=\"BF_Early_Bird_Sale_Subscription-Plans\" width=\"2560\" height=\"931\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-scaled.webp 2560w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-300x109.webp 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-1024x372.webp 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-768x279.webp 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-1536x559.webp 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-2048x745.webp 2048w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2023\/03\/BF_Early_Bird_Sale_-Blog_Featured-Images-Subscription-Plans-150x55.webp 150w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"HashiCorp_Certified_Terraform_Certification_Exam_Questions\"><\/span>HashiCorp Certified Terraform Certification Exam Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4><em>Q 1. One of your colleagues is new to Terraform and wants to add a new workspace named new-hire. What command he should execute from the following?<\/em><\/h4>\n<p>A. terraform workspace \u2013new \u2013new-hire<br \/>\nB. terraform workspace new new-hire<br \/>\nC. terraform workspace init new-hire<br \/>\nD. terraform workspace new-hire<\/p>\n<p><strong>Option B:<\/strong><br \/>\nterraform workspace new new-hire is the right syntax to be used whenever you want to create a new workspace.<br \/>\n<strong>Example :<\/strong><br \/>\nterraform workspace new new-hire<br \/>\nCreated and switched to workspace &#8220;new-hire &#8220;!<\/p>\n<h4><em>Q 2. John is a newbie to Terraform and wants to enable detailed logging to find all the details<\/em><br \/>\n<em>Which environment variable does he need to set?<\/em><\/h4>\n<p>A. TF_help<br \/>\nB. TF_LOG<br \/>\nC. TF_Debug<br \/>\nD. TF_var_log<\/p>\n<p><strong>Option: B is correct<\/strong><br \/>\nBy default, Terraform does not provide detailed logging. To enable detailed logging, we have to set the environment variable TF_LOG.<\/p>\n<p>By enabling TF_LOG, you can set to TRACE, INFO, WARN or ERROR, DEBUG Levels.<\/p>\n<h4><em>Q 3. Which option will you use to run provisioners that are not associated with any resources?<\/em><\/h4>\n<p>A. Local-exec<br \/>\nB. Null_resource<br \/>\nC. Salt-masterless<br \/>\nD. Remote-exec<\/p>\n<p><strong>Option B is correct<\/strong><br \/>\nIf you need to run provisioners that aren&#8217;t directly associated with a specific resource, you can associate them with a null_resource.<br \/>\nRefer the link below for Explanation:<\/p>\n<h4><em>Q 4. Which language does terraform support from the below list?<\/em><\/h4>\n<p>A. XML<br \/>\nB. Javascript<br \/>\nC. Hashicorp Language &amp; JSON<br \/>\nD. Plaintext<\/p>\n<p><strong>Option C is correct<\/strong><br \/>\nTerraform supports Hashicorp Language &amp; JSON, files ending in .tf and tf.json format.<\/p>\n<h4><em>Q 5. What is the provider version of Google Cloud being used in Terraform?<\/em><br \/>\n<em>Google = \u201c~&gt; 1.9.0\u201d<\/em><\/h4>\n<p>A. 1.9.1<br \/>\nB. 1.0.0<br \/>\nC. 1.8.0<br \/>\nD. 1.9.2<\/p>\n<p><strong>Options A and D are correct<\/strong><\/p>\n<p>According to the Terraform doc, the operator ~&gt;(Pessimistic Constraint Operator) means only the minor (rightmost version increase) updates are accepted. Therefore, ~&gt; 1.9.0 means the related module\/provider requirement accepts 1.9.1 to 1.9.x, but not 1.10.0, and absolutely not 1.0.0 or 1.8.0.<br \/>\nSource: expression\/version constraints in the Terraform docs.<br \/>\nIn reference to this question, terraform is looking for any update above 1.9.0, which can be either 1.9.1 or 1.9.2. Hence, both answers are correct.<\/p>\n<h4><em>Q 6. On executing terraform plan, terraform scans the code and appends any missing argument before terraform apply.<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Option: False<\/strong><br \/>\nOn executing terraform plan, terraform scans the code and checks for syntactical errors, missing arguments. Users need to fix these warnings before executing the code successfully.<\/p>\n<h4><em>Q 7. Do terraform workspaces help in adding\/allowing multiple state files for a single configuration?<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Option: True<\/strong><br \/>\nTerraform workspaces allow configuring multiple state files and associating with a single configuration file<\/p>\n<h4><em>Q 8. Does terraform standard backend type support remote management system?<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><b>Option: False<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The docs outline two <\/span><b>types of backends<\/b><span style=\"font-weight: 400;\">: enhanced and standard. Enhanced <\/span><b>backends<\/b><span style=\"font-weight: 400;\"> are local, which is the default, and remote, which generally refers to <\/span><b>Terraform<\/b><span style=\"font-weight: 400;\"> Cloud. The one major feature of an enhanced <\/span><b>backend<\/b><span style=\"font-weight: 400;\"> is the <\/span><b>support<\/b><span style=\"font-weight: 400;\"> for remote operations<\/span><\/p>\n<h4><em>Q 9. Does terraform refresh command updates the state files?<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Option: True<\/strong><br \/>\nYes, terraform refresh updates the state files to the latest unless there are any manual changes.<\/p>\n<h4><em>Q 10. Which command is used to launch terraform console?<\/em><\/h4>\n<p>A. terraform apply -config<br \/>\nB. terraform console<br \/>\nC. terrafrom plan<br \/>\nD. terrafrom consul<\/p>\n<p><strong>Answer : B<\/strong><br \/>\nterraform console [options] [dir]<br \/>\nThis command helps with an interactive command-line console for evaluating and experimenting with expressions<\/p>\n<h4><em>Q 11. Which of the following below helps users to deploy policy as a code?<\/em><\/h4>\n<p>A. Resources<br \/>\nB. Functions<br \/>\nC. Sentinel<br \/>\nD. Workspaces<\/p>\n<p><strong>Answer: C<\/strong><br \/>\nPolicy as code is the idea of writing code in a high-level language to manage and automate policies. By representing policies as code in text files, proven software development best practices can be adopted such as version control, automated testing, and automated deployment.<br \/>\nSentinel is built around the idea and provides all the benefits of policy as code.<\/p>\n<h4><em>Q 12. You have been asked to stop using static values and make code more dynamic. How can you achieve it? Select the correct option from below.<\/em><\/h4>\n<p>A. Local values<br \/>\nB. Input variables<br \/>\nC. Depends_on<br \/>\nD. Functions<\/p>\n<p><strong>Answer: B<\/strong><br \/>\nIf we compare terraform with any conventional programming language, then,<br \/>\n<strong>Input Variables<\/strong>: Input variables are equivalent to function arguments.(Correct Answer)<br \/>\n<strong>Local Values<\/strong>: Local value are like function&#8217;s temporary local variables.<br \/>\n<strong>Terraform Functions<\/strong>: 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 so only the functions built in to the language are available for use.<br \/>\n<strong>Depends_On<\/strong>: It is a meta argument to signify explicit dependencies in terraform resource creation.<\/p>\n<h4><em>Q 13. Which of the following flags can be used with terraform apply command?<\/em><\/h4>\n<p>A. Auto-approve<br \/>\nB. Init<br \/>\nC. Get<br \/>\nD. Console<\/p>\n<p><strong>Answer &#8211; A<\/strong><br \/>\nThe behavior of terraform apply differs significantly depending on whether you pass it the filename of a previously-saved plan file.<br \/>\nThe terraform apply command executes the actions proposed in a Terraform plan.<br \/>\n<strong>-auto-approve<\/strong>: Skips interactive approval of the plan before applying. This option is ignored when you pass a previously-saved plan file because Terraform considers you passing the plan file as the approval and so will never prompt in that case.<br \/>\n<strong>-compact-warnings<\/strong>: This shows any warning messages in a compact form which includes only the summary messages unless the warnings are accompanied by at least one error and thus the warning text might be useful context for the errors.<br \/>\n<strong>-input=false<\/strong>: Disables all of Terraform&#8217;s interactive prompts. Note that this also prevents Terraform from prompting for interactive approval of a plan, so Terraform will conservatively assume that you do not wish to apply the plan, causing the operation to fail. If you wish to run Terraform in a non-interactive context, see Running Terraform in Automation for some different approaches.<br \/>\n<strong>-lock=false<\/strong>: Disables Terraform&#8217;s default behavior of attempting to take a read\/write lock on the state for the duration of the operation.<br \/>\n<strong>-lock-timeout=DURATION<\/strong>: Unless locking is disabled with -lock=false, instructs Terraform to retry acquiring a lock for a period of time before returning an error. A duration syntax is a number followed by a time unit letter, such as &#8220;3s&#8221; for three seconds.<br \/>\n<strong>-no-color<\/strong>: Disables terminal formatting sequences in the output. Use this if you are running Terraform in a context where its output will be rendered by a system that cannot interpret terminal formatting.<br \/>\n<strong>-parallelism=n<\/strong>: Limit the number of concurrent operations as Terraform walks the graph. Defaults to 10.<br \/>\nFor configurations using the local backend only, terraform apply also accepts the legacy options -state, -state-out, and -backup.<\/p>\n<h4><em>Q 14. <span style=\"font-weight: 400;\">What is the default number of concurrent operations supported by <\/span><span style=\"font-weight: 400;\">terraform apply<\/span><span style=\"font-weight: 400;\"> command?<\/span><\/em><\/h4>\n<p>A. 100<br \/>\nB. 10<br \/>\nC. 5<br \/>\nD. 1<\/p>\n<p><strong>Answer &#8211; B<\/strong><br \/>\nThe default number of concurrent operations supported by Terraform apply command is 10.<br \/>\n-parallelism=n &#8211; Limit the number of concurrent operations as Terraform walks the graph and the default is 10<\/p>\n<h4><em>Q 15. You are trying to login into Terraform Enterprise. Which of the following command is used to save the API token?<\/em><\/h4>\n<p>A. terraform get<br \/>\nB. terraform API-get<br \/>\nC. terraform login<br \/>\nD. terraform cloud \u2013 get api<\/p>\n<p><strong>Answer &#8211; C<\/strong><br \/>\nterraform login command can be used to automatically obtain and save an API token for Terraform Cloud, Terraform Enterprise, or any other host that offers Terraform services.<br \/>\nBy default, Terraform will obtain an API token and save it in plain text in a local CLI configuration file called credentials.tfrc.json. When you run terraform login, it will explain specifically where it intends to save the API token and give you a chance to cancel if the current configuration is not as desired.<br \/>\nThe syntax for Terraform login:<br \/>\nterraform login [hostname]<br \/>\nIf you don&#8217;t provide an explicit hostname, Terraform will assume you want to log in to Terraform Cloud at app.terraform.io.<\/p>\n<h4><em>Q 16. What are the two supported backend types in Terraform?<\/em><\/h4>\n<p>A. Remote-backend<br \/>\nB. Enhanced<br \/>\nC. Local- backend<br \/>\nD. Standard<\/p>\n<p><strong>Answer B, D<\/strong><br \/>\nTerraform&#8217;s backends are divided into two main types, according to how they handle state and operations:<\/p>\n<ul>\n<li><strong>Enhanced<\/strong> backends can both store state and perform operations. There are only two enhanced backends: local and remote.<\/li>\n<li><strong>Standard<\/strong> backends only store state and rely on the local backend for performing operations.<\/li>\n<\/ul>\n<h4><em>Q 17. Is terraform state-unlock command used to unlock the locked state file?<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Answer: False<\/strong><br \/>\nThe correct command is given below-<br \/>\nterraform force-unlock [options] LOCK_ID [DIR]<br \/>\nThe above command is used to unlock the state file.<\/p>\n<h4><em>Q 18. SMB(Server Message Block) and RDP(Remote Desktop) are supported connection types in the remote-exec provisioner. True or False?<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Answer: False<\/strong><br \/>\nSsh and winrm are the supported connection types in remote-exec provisioner but not SMB and RDP.<\/p>\n<h4><em>Q 19. Community providers are downloaded automatically using terraform init command. True or False?<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Answer: True<\/strong><br \/>\nAny community provider can be automatically downloaded from a Terraform registry by running the terraform init command.<br \/>\nCommunity providers are installed in the same way as other providers<\/p>\n<h4><em>Q 20. By using the count meta-argument, you can scale the resources by incrementing the number.<\/em><\/h4>\n<p>A. True<br \/>\nB. False<\/p>\n<p><strong>Answer: True<\/strong><br \/>\nThe count is one of the reserved words. One can use count for scaling instead of repeating the resources again.<br \/>\nThe count meta-argument accepts a whole number and creates that many instances of the resource or module.<\/p>\n<h4><em>Q 21. A user wants to list all resources which are deployed using Terraform. How can this be done?<\/em><\/h4>\n<p>A. terraform state show<br \/>\nB. terraform state list<br \/>\nC. terraform show<br \/>\nD. terraform show list<\/p>\n<p><strong>Answer: B<\/strong><\/p>\n<ul>\n<li><strong>Option A is INCORRECT<\/strong> because this command shows the attributes of a single resource in the Terraform state file<\/li>\n<li><strong>Option B is CORRECT<\/strong> because the terraform state list command is used to list resources within a Terraform state.<\/li>\n<li><strong>Option C is INCORRECT<\/strong> because this command will output all resources and attributes in a human-readable format.<\/li>\n<li><strong>Option D is INCORRECT<\/strong> because this option will try to display all resources and attributes in the list file. This command takes the list as an input file for the show command.<br \/>\nThe command will list all resources in the state file matching the given addresses (if any). If no addresses are given, all resources are listed.<br \/>\nThe resources listed are sorted according to module depth order followed by alphabetical. This means that resources that are in your immediate configuration are listed first, and resources that are more deeply nested within modules are listed last.<br \/>\nFor complex infrastructures, the state can contain thousands of resources it can filter using the id option.<\/li>\n<\/ul>\n<h4><em>Q 22. Which among the following log command should be set to get Maximum verbosity of terraform logs?<\/em><\/h4>\n<p>A. set the TF_LOG=DEBUG in environment variable<br \/>\nB. set the TF_LOG=INFO in environment variable<br \/>\nC. set the TF_LOG=TRACE in environment variable<br \/>\nD. set the TF_LOG=WARN in environment variable<\/p>\n<p><strong>Answer: C<\/strong><\/p>\n<ul>\n<li><strong>Option A is INCORRECT<\/strong> because this command will not give detailed verbose information compared to trace<\/li>\n<li><strong>Option B is INCORRECT<\/strong> because this command will just give info but will output detailed information.<\/li>\n<li><strong>Option C is CORREC<\/strong>T because this command will output more verbose information compared all other options.<\/li>\n<li><strong>Option D is INCORRECT<\/strong> because this option will only print warn messages.<br \/>\nTerraform has detailed logs which can be enabled by setting the TF_LOG environment variable to any value. This will cause detailed logs to appear on stderr.<br \/>\nTo persist logged output you can set TF_LOG_PATH in order to force the log to always be appended to a specific file when logging is enabled. Note that even when TF_LOG_PATH is set, TF_LOG must be set in order for any logging to be enabled.<\/li>\n<\/ul>\n<h4><em>Q 23. Which among the following are not module source options?<\/em><\/h4>\n<p>A. Local Path<br \/>\nB. Terraform registry<br \/>\nC. Bit bucket<br \/>\nD. HTTP URLs<br \/>\nE. BLOB storage<\/p>\n<p><strong>Answer: E<\/strong><br \/>\n<strong>Options A, B, C, and D are INCORRECT<\/strong> because these are valid source options for a module.<br \/>\n<strong>Option E is CORRECT<\/strong> because we cannot use BLOB storage as a module source option.<br \/>\nThe source argument in a module block tells Terraform where to find the source code for the desired child module. Terraform uses this during the module installation step of terraform init to download the source code to a directory on a local disk so that it can be used by other Terraform commands.<br \/>\nCurrently following are the valid source options for a module:<\/p>\n<ul>\n<li>Local Paths<\/li>\n<li>Terraform Registry<\/li>\n<li>Github<\/li>\n<li>Bitbucket<\/li>\n<li>Generic Git, Mercurial repositories<\/li>\n<li>HTTP URLs<\/li>\n<li>S3 buckets<\/li>\n<li>GCS buckets<\/li>\n<\/ul>\n<h4><em>Q 24. Which of the following command can be used to syntactically check to terraform configuration before using apply or plan command?<\/em><\/h4>\n<p>A. terraform fmt<br \/>\nB. terraform validate<br \/>\nC. terraform show<br \/>\nD. terraform check<\/p>\n<p><strong>Answer: B<\/strong><br \/>\n<strong>Option A is INCORRECT<\/strong> because fmt is used to rewrite Terraform configuration files to a canonical format and style.<br \/>\n<strong>Option B is CORRECT<\/strong> because it is used to validate the terraform configuration.<br \/>\n<strong>Option C is INCORRECT<\/strong> because the show is used to provide human-readable output from a state or plan file.<br \/>\n<strong>Option D is INCORRECT<\/strong> because there is no command in terraform called to check.<br \/>\nterraform validate command checks whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing state.<br \/>\nValidation requires an initialized working directory with any referenced plugins and modules installed.<\/p>\n<h4><em>Q 25. When multiple team members are working on the same state file, the state file gets locked. How to remove the lock?<\/em><\/h4>\n<p>A. terraform force-unlock LOCK_ID<br \/>\nB. terraform force-unlock STATE_FILE<br \/>\nC. terraform unlock LOCK_ID<br \/>\nD. terraform force-unlock=true<\/p>\n<p><strong>Answer: A<\/strong><\/p>\n<ul>\n<li>Option A is CORRECT force-unlock with LOCK_ID is used to remove lock on state file.<\/li>\n<li>Option B is INCORRECT because we need to pass LOCK_ID as argument not STATE_FILE.<\/li>\n<li>Option C is INCORRECT because force-unlock is used not unlock is used to remove state lock.<\/li>\n<li>Option D is INCORRECT because force-unlock needs LOCK_ID as an argument.<br \/>\nforce-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.<br \/>\nLocal state files cannot be unlocked by another process. Usage: terraform force-unlock LOCK_ID [DIR]<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Use_the_Terraform_CLI_outside_of_core_workflow\"><\/span>Domain :\u00a0Use the Terraform CLI (outside of core workflow)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q26 : If you want to replace a particular object even though there are no configuration changes in the code, which command from below would be best suited.<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>terraform destroy<br \/>\n<strong>B.\u00a0<\/strong>terraform taint<br \/>\n<strong>C.\u00a0<\/strong>terraform replace<br \/>\n<strong>D.\u00a0<\/strong>terraform state rm<\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>If your intent is to force replacement of a particular object even though there are no configuration changes that would require it, we recommend instead to use the -replace option with\u00a0<a href=\"https:\/\/www.terraform.io\/docs\/cli\/commands\/apply.html\" rel=\"noopener\" target=\"_blank\">terraform apply<\/a>. For example:<\/p>\n<p>terraform apply -replace=\u201daws_instance.example[0]\u201d<\/p>\n<p>Creating a plan with the \u201creplace\u201d option is superior to using terraform taint because it will allow you to see the full effect of that change before you take any externally-visible action. When you use terraform taint to get a similar effect, you risk someone else on your team creating a new plan against your tainted object before you\u2019ve had a chance to review the consequences of that change yourself.<\/p>\n<p><b>Option A is incorrect<\/b>\u00a0as it would destroy the current resource and other resources that need to be created again.<br \/>\n<b>Option B is incorrect<\/b>\u00a0because in previous versions it used to happen but as per current version of terraform, the best suited command is terraform replace.<br \/>\n<b>Option D is incorrect<\/b>\u00a0because this command is used to manipulate the state file.<\/p>\n<p><b>Reference Link:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/docs\/cli\/commands\/taint.html\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/docs\/cli\/commands\/taint.html<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Use_the_Terraform_CLI_outside_of_core_workflow-2\"><\/span>Domain :\u00a0Use the Terraform CLI (outside of core workflow)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q27 : The data directory in terraform is used to retain data that must persist from one command to the next, so it\u2019s important to have this variable set consistently throughout all the Terraform workflow commands (starting with terraform init) or else Terraform may be unable to find providers, modules, and other artifacts. Which ENVIRONMENT VARIABLE is used from below to \u2018set\u2019 per-working-directory data?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>TF_DATA_DIR<br \/>\n<strong>B.\u00a0<\/strong>TF_WORKSPACE<br \/>\n<strong>C.\u00a0<\/strong>TF_DATA<br \/>\n<strong>D.\u00a0<\/strong>TF_DATA_WORKSPACE<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>By default per-working-directory data is written into a .terraform subdirectory of the current directory. The TF_DATA_DIR changes the path where Terraform keeps its per-working-directory data, such as the current remote backend configuration.<\/p>\n<p><b>Option B:<\/b>\u00a0For multi-environment deployment, in order to select a workspace, instead of doing \u2019<i>terraform workspace select your_workspace\u2019<\/i>, it is possible to use\u00a0<i>TF_WORKSPACE<\/i>\u00a0environment variable. It cannot be used to \u2018set\u2019 per-working-directory data.<br \/>\n<b>Option C:\u00a0<\/b>No Such ENVIRONMENT VARIABLE exists<br \/>\n<b>Option D:<\/b>\u00a0No Such ENVIRONMENT VARIABLE exists<\/p>\n<p><b>Reference Link:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/docs\/cli\/config\/environment-variables.html#tf_data_dir\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/docs\/cli\/config\/environment-variables.html#tf_data_dir<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraform_Cloud_and_Enterprise_capabilities\"><\/span>Domain :\u00a0Understand Terraform Cloud and Enterprise capabilities<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q28 : Which of the following commands can be used to logout from terraform cloud?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Terraform logout<br \/>\n<strong>B.\u00a0<\/strong>Terraform \u2013logout<br \/>\n<strong>C.\u00a0<\/strong>Terraform log out<br \/>\n<strong>D.\u00a0<\/strong>Terraform \u2013log-out<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>The terraform logout command is used to remove credentials stored by terraform login. These credentials are API tokens for Terraform Cloud, Terraform Enterprise, or any other host that offers Terraform services.<\/p>\n<p><b>Reference Link:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/docs\/cli\/commands\/logout.html\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/docs\/cli\/commands\/logout.html<\/a><\/p>\n<h4><em>Q29 : Debug is the most verbose log level in Terraform.<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>True<br \/>\n<strong>B.\u00a0<\/strong>False<\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>Trace is the most verbose log level in Terraform.<\/p>\n<p>You can set TF_LOG to one of the log levels TRACE, DEBUG, INFO, WARN or ERROR to change the verbosity of the logs.<\/p>\n<p>For more information, refer to the link below:\u00a0<a href=\"https:\/\/www.terraform.io\/docs\/internals\/debugging.html\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/docs\/internals\/debugging.html<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraforms_purpose_vs_other_IaC\"><\/span>Domain :\u00a0Understand Terraform\u2019s purpose (vs other IaC)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q30 : What is a multicloud deployment?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>The possibility to run a simple .tf into multiple cloud using a single provider to deploy into multiple cloud providers<br \/>\n<strong>B.\u00a0<\/strong>The possibility to run your Terraform code using multiple cloud providers to deploy your infrastructure into multiple cloud providers<br \/>\n<strong>C.\u00a0<\/strong>The possibility to run your Terraform code using a single-global provider to deploy your infrastructure into multiple cloud providers<br \/>\n<strong>D.\u00a0<\/strong>The possibility to run your Terraform code by other tools such as Amazon Cloudformation<\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>The idea of multi cloud deployment is to run our Terraform code, using multiple providers like AWS, GCP or Azure and deployed the infrastructure into multiple clouds in a single terraform deployment<\/p>\n<p><b>Option A is incorrect\u00a0<\/b>as you have to specify different providers to deploy into multiple cloud-providers<br \/>\n<b>Option C is incorrect\u00a0<\/b>as there isn\u2019t a single-global provider to deploy the infrastructure in multiple cloud-providers<br \/>\n<b>Option D is incorrect\u00a0<\/b>as Terraform is not designed to be used in third party applications.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/intro\/use-cases#multi-cloud-deployment\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/intro\/use-cases#multi-cloud-deployment<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraform_basics\"><\/span>Domain :\u00a0Understand Terraform basics<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q31 : You have the following provider configuration for AWS:<\/em><\/h4>\n<h4><em>provider \u201caws\u201d {<\/em><br \/>\n<em>\u00a0 region = \u201ceu-west-1\u201d<\/em><br \/>\n<em>}<\/em><br \/>\n<em>provider \u201caws\u201d {<\/em><br \/>\n<em>\u00a0\u00a0alias\u00a0 = \u201cfrankfurt\u201d<\/em><br \/>\n<em>\u00a0\u00a0region = \u201ceu-central-1\u201d<\/em><br \/>\n<em>}<\/em><\/h4>\n<h4><em>How do you specify an instance creation on eu-central-1 ?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>resource \u201caws_instance\u201d \u201cwhizlabs\u201d { \u00a0 provider = aws.central \u00a0 \u2026 }<br \/>\n<strong>B.\u00a0<\/strong>resource \u201caws_instance\u201d \u201cwhizlabs\u201d { \u00a0 provider = aws.frankfurt \u00a0 \u2026 }<br \/>\n<strong>C.\u00a0<\/strong>resource \u201caws_instance\u201d \u201cwhizlabs\u201d { \u00a0 \u2026 }<br \/>\n<strong>D.\u00a0<\/strong>resource \u201caws_instance\u201d \u201cwhizlabs\u201d { \u00a0 provider = aws.west \u2026 }<\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>The correct way to reference a provider is specifying the provider and the alias that have been configured on the provider configuration.<\/p>\n<p><b>Option A is incorrect<\/b>\u00a0as the alias assigned into the resource doesn\u2019t exist on the provider configuration.<br \/>\n<b>Option C is incorrect\u00a0<\/b>as if you specify a provider, this will be using the default one.<br \/>\n<b>Option D is incorrect<\/b>\u00a0as the alias assigned into the resource doesn\u2019t exist on the provider.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/providers\/configuration#selecting-alternate-provider-configurations\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/providers\/configuration#selecting-alternate-provider-configurations<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Interact_with_Terraform_modules\"><\/span>Domain :\u00a0Interact with Terraform modules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q32 : What of the following is not a source type for a module?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>SSH<br \/>\n<strong>B.\u00a0<\/strong>Github<br \/>\n<strong>C.\u00a0<\/strong>Bitbucket<br \/>\n<strong>D.\u00a0<\/strong>S3<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>You can\u2019t use a module using a SSH source from another computer or station.<\/p>\n<p><b>Option A is correct\u00a0<\/b>as SSH is not the source type for a module.<br \/>\n<b>Options B, C and D are true but not the only ones.<\/b>\u00a0All of this sources are part of the sources allowed:<\/p>\n<ul>\n<li aria-level=\"1\">Local paths<\/li>\n<li aria-level=\"1\">Terraform Registry<\/li>\n<li aria-level=\"1\">GitHub<\/li>\n<li aria-level=\"1\">Bitbucket<\/li>\n<li aria-level=\"1\">Generic Git, Mercurial repositories<\/li>\n<li aria-level=\"1\">HTTP URLs<\/li>\n<li aria-level=\"1\">S3 buckets<\/li>\n<li aria-level=\"1\">GCS buckets<\/li>\n<li aria-level=\"1\">Modules in Package Subdirectories<\/li>\n<\/ul>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/modules\/sources\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/modules\/sources<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Interact_with_Terraform_modules-2\"><\/span>Domain :\u00a0Interact with Terraform modules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q33 : How do you download a module configured in your Terraform code?<\/em><\/h4>\n<h4><em>module \u201cecs_cluster\u201d\u00a0 {<\/em><br \/>\n<em>source\u00a0 = \u201cterraform-aws-modules\/ecs\/aws\u201d<\/em><br \/>\n<em>version = \u201c2.8.0\u201d<\/em><br \/>\n<em>\/\/ inputs<\/em><br \/>\n<em>}<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>terraform get module ecs_cluster<br \/>\n<strong>B.\u00a0<\/strong>terraform install modules ecs_cluster<br \/>\n<strong>C.\u00a0<\/strong>terraform init<br \/>\n<strong>D.\u00a0<\/strong>terraform module init<\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>During terraform init, terraform searches for module blocks and is retrieved.<\/p>\n<p><b>Option A, B and D are incorrect<\/b>\u00a0as those are not valid options when initializing plugins or modules in Terraform.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/cli\/commands\/init\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cli\/commands\/init<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Navigate_Terraform_workflow\"><\/span>Domain :\u00a0Navigate Terraform workflow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q34 : You are a DevOps Engineer working in a CI\/CD Pipeline using Jenkins. You have three stages identified: Init, Plan and Apply. After your terraform plan, you need to apply your infrastructure. In your pipeline script basically you wrote: \u201cterraform apply\u201d.<\/em><br \/>\n<em>After triggering the pipeline you see that there was no progress and the Apply stage is waiting to confirm the changes. How can you automatically apply the changes when you type \u201cterraform apply\u201d ?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>terraform apply -auto-approve<br \/>\n<strong>B.\u00a0<\/strong>terraform apply -yes<br \/>\n<strong>C.\u00a0<\/strong>terraform apply\u00a0 | echo \u201cyes\u201d<br \/>\n<strong>D.\u00a0<\/strong>terraform apply | yes<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Option A is correct.\u00a0<\/b>Using this flag to skip the interactive auto-approve.<br \/>\n<b>Option B is incorrect<\/b>\u00a0as this flag doesn\u2019t exists.<br \/>\n<b>Option C is incorrect\u00a0<\/b>as this is not part of the best practices using Terraform and also this is not interacting with terraform output.<br \/>\n<b>Option D is incorrect<\/b>\u00a0as this will prompt a syntax error in your command line.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/cli\/commands\/apply#auto-approve\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cli\/commands\/apply#auto-approve<\/a><\/p>\n<h4>Domain :\u00a0Implement and maintain state<\/h4>\n<h4><em>Q35 : What is the name of the workspace when you execute \u201cterraform init\u201d?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>New<br \/>\n<strong>B.\u00a0<\/strong>No workspace is created<br \/>\n<strong>C.\u00a0<\/strong>Workspace<br \/>\n<strong>D.\u00a0<\/strong>Default<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>When you initialize a working directory, a default workspace is created with the name \u201cdefault\u201d.<\/p>\n<p><b>Options A, B and C are incorrect.<\/b><\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/cli\/workspaces#managing-workspaces\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cli\/workspaces#managing-workspaces<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Implement_and_maintain_state\"><\/span>Domain :\u00a0Implement and maintain state<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q36 : How can you delete the default workspace?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>terraform workspace delete default<br \/>\n<strong>B.\u00a0<\/strong>terraform delete workspace default<br \/>\n<strong>C.\u00a0<\/strong>terraform workspace -rm default<br \/>\n<strong>D.\u00a0<\/strong>None of the options are correct<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>You can\u2019t delete the default workspace.<\/p>\n<p><b>Option A is incorrect\u00a0<\/b>because you can\u2019t delete the default workspace<br \/>\n<b>Options B and C are incorrect<\/b>\u00a0because those commands have syntax failures and also you can\u2019t delete the default workspace.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/state\/workspaces#using-workspaces\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/state\/workspaces#using-workspaces<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Read_generate_and_modify_configuration\"><\/span>Domain :\u00a0Read, generate, and modify configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q37 : You are a Senior DevOps Engineer and you want to provision your infrastructure Terraform code in different environments having your Terraform configuration DRY. What is the best way to do it? You also want to minimize the number of changes in your code (Choose the best answer regarding best practices in Terraform and DevOps)<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Have a different var files per environment and apply those files to your Terraform Configuration<br \/>\n<strong>B.\u00a0<\/strong>Have different branches in your Git repository with different var files<br \/>\n<strong>C.\u00a0<\/strong>Move out from Terraform and use Terragrunt<br \/>\n<strong>D.\u00a0<\/strong>Both A and B are correct<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>To manage and have the Terraform configuration DRY, the best way is to execute terraform apply and have your terraform variables in a separate file with the variables for each environment.<\/p>\n<p>For example:<\/p>\n<p>\/\/ For Development environment<\/p>\n<p>terraform apply -var-file=\u201ddevelopment.tfvars\u201d<\/p>\n<p>\/\/ For Production<\/p>\n<p>terraform apply -var-file=\u201dproduction.tfvars\u201d<\/p>\n<p><b>Option B is incorrect\u00a0<\/b>because having multiple branches you will need to modify the Terraform configuration in different branches. Also, this is not a good DevOps practice<br \/>\n<b>Option C is incorrect\u00a0<\/b>as you will need to modify the templates to make your code working with Terragrunt and this will not minimize the number of changes.<br \/>\n<b>Option D is incorrect as Option A is correct.<\/b><\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/values\/variables#variable-definitions-tfvars-files\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/values\/variables#variable-definitions-tfvars-files<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Read_generate_and_modify_configuration-2\"><\/span>Domain :\u00a0Read, generate, and modify configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q38 : How can you view the value of a particular output using the CLI? The output you want to query was declared like<\/em><\/h4>\n<h4><em>output \u201cips\u201d {<\/em><br \/>\n<em>\u00a0\u00a0value = aws_instance.frontend.*.public_ip<\/em><br \/>\n<em>}<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>terraform output show<br \/>\n<strong>B.\u00a0<\/strong>terraform output show\u00a0<i>ips<\/i><br \/>\n<strong>C.\u00a0<\/strong>terraform output<br \/>\n<strong>D.\u00a0<\/strong>terraform output ips<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>To show the value of a particular output you have to specify the command terraform output followed by the name of the output which you want to query:<\/p>\n<p>$ terraform output ips<\/p>\n<p>ips = [<\/p>\n<p>\u201c54.43.114.15\u201d,<\/p>\n<p>\u201c52.12.13.4\u201d,<\/p>\n<p>\u201c52.4.161.69\u201d<\/p>\n<p>]<\/p>\n<p><b>Options A and B are incorrect\u00a0<\/b>as to query an output you don\u2019t have to specify the sub-command \u201cshow\u201d. Also this will prompt an issue.<br \/>\n<b>Option C is incorrect<\/b>\u00a0as this will be showing all the output values and not a particular one.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/cli\/commands\/output#examples\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cli\/commands\/output#examples<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraform_Cloud_and_Enterprise_capabilities-2\"><\/span>Domain :\u00a0Understand Terraform Cloud and Enterprise capabilities<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q39 : You are working with different Terraform States and you need access to the Terraform state for the organization \u201cwhizlabs\u201d and the workspace \u201cprod\u201d. How will you configure the Terraform Datasource?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>data \u201cterraform_remote_state\u201d \u201cremote_state\u201d { \u00a0 backend = \u201cremote\u201d \u00a0 config = {\u00a0organization = \u201cwhizlabs\u201d\u00a0workspaces = { \u00a0\u00a0name = \u201cprod\u201d\u00a0} \u00a0 } }<br \/>\n<strong>B.\u00a0<\/strong>data \u201cterraform_remote_state\u201d \u201cremote_state\u201d { \u00a0 backend = \u201cremote\u201d \u00a0 organization = \u201cwhizlabs\u201d \u00a0 workspaces = \u201cprod\u201d \u00a0 } }<br \/>\n<strong>C.\u00a0<\/strong>data \u201cterraform_remote_state\u201d \u201cremote_state\u201d { \u00a0 backend = \u201cremote\u201d \u00a0 organization = \u201cwhizlabs.prod\u201d \u00a0 } }<br \/>\n<strong>D.\u00a0<\/strong>None of the above<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>A datasource \u201cterraform_remote_state\u201d must be configured. In this configuration, the organization and the workspaces must be set under the config block to access the remote state as a datasource.<\/p>\n<p><b>Options B and C are incorrect\u00a0<\/b>as the there is not \u201cconfig\u201d block for the terraform_remote_state datasource configuration<br \/>\n<b>Option D is incorrect as Option A is correct.<\/b><\/p>\n<p><b>References:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/state\/remote-state-data\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/state\/remote-state-data<\/a>,\u00a0<a href=\"https:\/\/www.terraform.io\/cloud-docs\/workspaces\/state#data-source-configuration\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cloud-docs\/workspaces\/state#data-source-configuration<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_infrastructure_as_code_IaC_concepts\"><\/span>Domain :\u00a0Understand infrastructure as code (IaC) concepts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q40 : What benefits can provide the Infrastructure as Code for organizations?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>IaC can be used to deploy the latest features of Cloud Services<br \/>\n<strong>B.\u00a0<\/strong>Share and reusability of the code<br \/>\n<strong>C.\u00a0<\/strong>Blueprint of the DataCenter<br \/>\n<strong>D.\u00a0<\/strong>Versioning<\/p>\n<p><b>Correct Answers: B, C and D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>IaC is the way to treat Infrastructure the same way Developers treat code. Versioning and reusability are the most important topics on IaC. Also there is a possibility to have the datacenter snapshot via IaC.<\/p>\n<p><b>Option A is incorrect<\/b>\u00a0because the latest features for the Cloud Services depend on the existing of API calls exposed and used by the Terraform providers<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/learn.hashicorp.com\/tutorials\/terraform\/infrastructure-as-code\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/learn.hashicorp.com\/tutorials\/terraform\/infrastructure-as-code<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraforms_purpose_vs_other_IaC-2\"><\/span>Domain :\u00a0Understand Terraform\u2019s purpose (vs other IaC)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q41 : State is a necessary requirement for Terraform to function. What of the following is not a purpose of Terraform State?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Mapping to the real world<br \/>\n<strong>B.\u00a0<\/strong>Performance<br \/>\n<strong>C.\u00a0<\/strong>Syncing<br \/>\n<strong>D.\u00a0<\/strong>Security<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>State is necessary to have Terraform running. Mapping to the real world, Metadata Performance and Syncing are part of the purpose to have a Terraform State, However, Security is not part of this purpose as not always you need to manage sensitive data and there are some options to manage those values<\/p>\n<p><b>Options A, B and C are incorrect\u00a0<\/b>as those options are part of the purpose to have Terraform State<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/state\/purpose#purpose-of-terraform-state\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/state\/purpose#purpose-of-terraform-state<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Use_the_Terraform_CLI_outside_of_core_workflow-3\"><\/span>Domain :\u00a0Use the Terraform CLI (outside of core workflow)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q42 : You want to test the \u201csplit\u201d function of Terraform locally to verify the output that the split function will be returned. What is the best approach to test this function locally?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>echo \u2018split(\u201c,\u201d, \u201cfoo,bar,baz\u201d)\u2019 | terraform console<br \/>\n<strong>B.\u00a0<\/strong>echo \u2018split(\u201c,\u201d, \u201cfoo,bar,baz\u201d)\u2019 | terraform plan<br \/>\n<strong>C.\u00a0<\/strong>echo \u2018split(\u201c,\u201d, \u201cfoo,bar,baz\u201d)\u2019 | terraform apply<br \/>\n<strong>D.\u00a0<\/strong>None of above<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>Terraform console can be used to run non-interactive scripts. For example, we can make use of the split function and pipe this function to terraform console commands.<\/p>\n<p><b>Options B and C are incorrect\u00a0<\/b>as terraform plan and terraform apply are used to execute configuration written in*.tf files or json files.<\/p>\n<p><b>Resource:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/cli\/commands\/console#scripting\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cli\/commands\/console#scripting<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Interact_with_Terraform_modules-3\"><\/span>Domain :\u00a0Interact with Terraform modules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q43 : In Terraform, What are modules used for?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Re-use configuration<br \/>\n<strong>B.\u00a0<\/strong>Ensure best practices<br \/>\n<strong>C.\u00a0<\/strong>Encapsulate configuration<br \/>\n<strong>D.\u00a0<\/strong>All of the above<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p>Modules are very useful to re-use configuration, promotion best practices, encapsule configuration and also to have a configuration organize<\/p>\n<p><b>Options A, B and C are correct\u00a0<\/b>but are not matching with the best answer provided.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/learn.hashicorp.com\/tutorials\/terraform\/module#what-are-modules-for\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/learn.hashicorp.com\/tutorials\/terraform\/module#what-are-modules-for<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Interact_with_Terraform_modules-4\"><\/span>Domain :\u00a0Interact with Terraform modules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q44 : Which of the following extensions is recognized by Terraform to fetch a module using an URL endpoint.<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Zip<br \/>\n<strong>B.\u00a0<\/strong>Tar.gz<br \/>\n<strong>C.\u00a0<\/strong>Tar.xz<br \/>\n<strong>D.\u00a0<\/strong>All of the above<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>All the extensions are recognized by Terraform:<\/p>\n<p>zip<\/p>\n<p>tar.bz2 and tbz2<\/p>\n<p>tar.gz and tgz<\/p>\n<p>tar.xz and txz<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/modules\/sources#fetching-archives-over-http\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/modules\/sources#fetching-archives-over-http<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Implement_and_maintain_state-2\"><\/span>Domain :\u00a0Implement and maintain state<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q45 : What happens if the locking state fails when executing an operation in Terraform?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Terraform will continuously apply its configuration without modifying the state, then you can execute a Terraform refresh to update the state<br \/>\n<strong>B.\u00a0<\/strong>Terraform will continuously apply its configuration and apply changes into the state<br \/>\n<strong>C.\u00a0<\/strong>Terraform will not continue to plan\/apply any changes<br \/>\n<strong>D.\u00a0<\/strong>Terraform will continuous and will force lock the state and will refresh the state<\/p>\n<p><b>Correct Answer: C<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>If terraform fails to acquire the locking state, Terraform will not continue to apply any changes unless you specify the flag \u201c-lock\u201d to disable the locking state.<\/p>\n<p><b>Options A, B and D are incorrect\u00a0<\/b>as terraform will not continue executing the plan or apply operations if terraform fails to acquire the state.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/state\/locking#state-locking\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/state\/locking#state-locking<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Read_generate_and_modify_configuration-3\"><\/span>Domain :\u00a0Read, generate, and modify configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q46 : You want to assign the default value \u201cNo description set up\u201d to a variable in your Terraform code just if a value has not been assigned on the variables.tf. If this value has content, you can assign the value to the variable. How can you perform this in your Terraform code?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>description = var.description == \u201cnull\u201d ? \u201cNo description set up\u201d : var.description<br \/>\n<strong>B.\u00a0<\/strong>description = if var.description == \u201cnull\u201d then \u201cNo description set up\u201d else var.description<br \/>\n<strong>C.\u00a0<\/strong>description = if (var.description == \u201cnull\u201d) then { \u201cNo description set up\u201d } else { var.description }<br \/>\n<strong>D.\u00a0<\/strong>description = var.description == \u201cnull\u201d : \u201cNo description set up\u201d ? var.description<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p>Conditions in terraform have the following syntax:<\/p>\n<p>condition ? true_val : false_val<\/p>\n<p>In our example:<\/p>\n<p>if var.description is null, then we assign description value \u201cNo description set up\u201d. if not, it would be var.description.<\/p>\n<p><b>Options B and C are incorrect<\/b>\u00a0as this will be a syntax error as Terraform don\u2019t understand about conditional blocks of if \/ else \/ then.<br \/>\n<b>Option D is incorrect\u00a0<\/b>as the conditional syntax is not following the pattern:<\/p>\n<p>condition ? true_val : false_val<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/cli\/commands\/console#scripting\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/cli\/commands\/console#scripting<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraform_basics-2\"><\/span>Domain :\u00a0Understand Terraform basics<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q47 : How do you force users to use a particular version of required providers in your terraform code?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>terraform { required_providers { aws = { source = \u201chashicorp\/aws\u201d version =\u201d3.74.1\u2033\u00a0 } } }<br \/>\n<strong>B.\u00a0<\/strong>terraform { \u00a0 \u00a0 aws = { \u00a0 \u00a0 \u00a0 source = \u201chashicorp\/aws\u201d \u00a0 \u00a0 \u00a0 version ~&gt; \u201c3.74.1\u201d \u00a0 \u00a0 } }<br \/>\n<strong>C.\u00a0<\/strong>aws = { \u00a0 \u00a0 \u00a0 source = \u201chashicorp\/aws\u201d \u00a0 \u00a0 \u00a0 version = \u201c3.74.1\u201d \u00a0 \u00a0 } \u00a0 }<br \/>\n<strong>D.\u00a0<\/strong>provider \u201caws\u201d = { \u00a0 \u00a0 \u00a0 source = \u201chashicorp\/aws\u201d \u00a0 \u00a0 \u00a0 version = \u201c3.74.1\u201d }<\/p>\n<p><b>Correct Answer: A<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>To configure a specific version of a provider that is required, a version must be under the block required_providers.<\/p>\n<p><b>Option B is incorrect<\/b>\u00a0as it is missing the block \u2018required_providers\u2019.<br \/>\n<b>Option C is incorrect<\/b>\u00a0as there is no block called \u201caws\u201d.<br \/>\n<b>Option D is incorrect<\/b>\u00a0as you have to specify the block \u2018required_providers\u2019 inside your terraform configuration.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/providers\/configuration\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/providers\/configuration<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraform_basics-3\"><\/span>Domain :\u00a0Understand Terraform basics<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q48 : What of the following next arguments are not part of the generic meta-arguments for a provider?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Alias<br \/>\n<strong>B.\u00a0<\/strong>Version<br \/>\n<strong>C.\u00a0<\/strong>Profile<br \/>\n<strong>D.\u00a0<\/strong>Region<\/p>\n<p><b>Correct Answers: C and D<\/b><\/p>\n<p><b>Explanation<\/b><\/p>\n<p>The main generic meta-arguments for a provider are alias and version. Other parameters are related to the provider configuration itself.<\/p>\n<p><b>Options A and B are incorrect\u00a0<\/b>as both are part of the generic meta-arguments for a provider configuration.<\/p>\n<p><b>References:\u00a0<\/b>AWS provider configuration:<a href=\"https:\/\/registry.terraform.io\/providers\/hashicorp\/aws\/latest\/docs#argument-reference\" rel=\"noopener\" target=\"_blank\">\u00a0<\/a>\u00a0<a href=\"https:\/\/registry.terraform.io\/providers\/hashicorp\/aws\/latest\/docs#argument-reference\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/registry.terraform.io\/providers\/hashicorp\/aws\/latest\/docs#argument-reference<\/a>,\u00a0<a href=\"https:\/\/www.terraform.io\/language\/providers\/configuration?_ga=2.5999995.934997445.1642622103-536275114.1619454689#provider-configuration-1\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/providers\/configuration?_ga=2.5999995.934997445.1642622103-536275114.1619454689#provider-configuration-1<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_Terraform_basics-4\"><\/span>Domain :\u00a0Understand Terraform basics<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q49 : local-exec invokes a process on the resource that is being created by Terraform.<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>True<br \/>\n<strong>B.\u00a0<\/strong>False<\/p>\n<p><b>Correct Answer: B<\/b><\/p>\n<p><b>False.\u00a0<\/b>The process is always invoked on the machine running Terraform.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/www.terraform.io\/language\/resources\/provisioners\/local-exec#local-exec-provisioner\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/language\/resources\/provisioners\/local-exec#local-exec-provisioner<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Domain_Understand_infrastructure_as_code_IaC_concepts-2\"><\/span>Domain :\u00a0Understand infrastructure as code (IaC) concepts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><em>Q50 : What are the main advantages to use Terraform as the IaC tool?<\/em><\/h4>\n<p><strong>A.\u00a0<\/strong>Manage infrastructure on multiple cloud providers<br \/>\n<strong>B.\u00a0<\/strong>Versioning<br \/>\n<strong>C.\u00a0<\/strong>Status of your infrastructure based on a State to track all the resources and components<br \/>\n<strong>D.\u00a0<\/strong>All of above<\/p>\n<p><b>Correct Answer: D<\/b><\/p>\n<p>With Terraform as a tool for the IaC, you have multiple advantages, like use Terraform with multiple cloud providers, versioning your modules or even track all the resources creation from the Terraform State<\/p>\n<p><b>Options A, B and C are incorrect<\/b>\u00a0as you have to select the best possible option.<\/p>\n<p><b>Reference:\u00a0<\/b><a href=\"https:\/\/learn.hashicorp.com\/tutorials\/terraform\/infrastructure-as-code\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/learn.hashicorp.com\/tutorials\/terraform\/infrastructure-as-code<\/a><\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p>This set of 50 free questions help you build an understanding of the exam pattern but not enough. To take the <a href=\"https:\/\/www.whizlabs.com\/hashicorp-certified-terraform-associate\/\" target=\"_blank\" rel=\"noopener\">Terraform associate exam<\/a> you may have to attempt some more practice questions. You can also sign up for a Terraform Demo environment in case your company is not using Terraform right now.<\/p>\n<p>Reference Links:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.hashicorp.com\/sentinel\/concepts\/policy-as-code\/\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/docs.hashicorp.com\/sentinel\/concepts\/policy-as-code\/<\/a><\/li>\n<li><a href=\"https:\/\/www.hashicorp.com\/certification\/terraform-associate\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.hashicorp.com\/certification\/terraform-associate<\/a><\/li>\n<li><a href=\"https:\/\/www.terraform.io\/docs\/cli\/commands\/plan.html\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/www.terraform.io\/docs\/cli\/commands\/plan.html<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The Terraform Associate certification is for Cloud Engineers. You should have basic terminal skills and an understanding of on-premises and cloud architecture. If you are new to the Terraform environment, we recommend you to practice in the demo environment and also check our Terraform Associate practice exam. This set of 50 free Terraform certification exam questions should give you a solid understanding of how Terraform associate exam is structured, the question format, and the exam pattern. What will you learn in Hashicorp Terraform Associate Exam? The operations, IT, and DevOps professionals knowledgeable with the fundamental open-source HashiCorp Terraform concepts and [&hellip;]<\/p>\n","protected":false},"author":210,"featured_media":80182,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1862],"tags":[4767,4768],"class_list":["post-80180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-hashicorp-certified-terraform-associate","tag-hashicorp-certified-terraform-associate-certificate"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",560,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate-300x169.png",300,169,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",560,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",560,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",560,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",560,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",24,14,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",48,27,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",96,54,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",150,84,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",300,169,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",560,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",96,54,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2021\/11\/Free-Questions-Blog-on-Hashicorp-Certified-Terraform-Associate.png",150,84,false]},"uagb_author_info":{"display_name":"Jeevitha TP","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/jeevithatwhizlabs-com\/"},"uagb_comment_info":11,"uagb_excerpt":"The Terraform Associate certification is for Cloud Engineers. You should have basic terminal skills and an understanding of on-premises and cloud architecture. If you are new to the Terraform environment, we recommend you to practice in the demo environment and also check our Terraform Associate practice exam. This set of 50 free Terraform certification exam&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/210"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=80180"}],"version-history":[{"count":21,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80180\/revisions"}],"predecessor-version":[{"id":92349,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/80180\/revisions\/92349"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/80182"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=80180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=80180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=80180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}