Terraform Cloud and Enterprise Capabilities

Terraform Cloud and Terraform Enterprise are cloud-based and on-premises versions of Terraform, respectively, that offer additional features and capabilities beyond the open-source Terraform CLI.
--- shuffleAnswers: true shuffleQuestions: true nQuestions: 25 introduction: >
The test contains a set of questions and there is no time limit. The test is not official, it's just one of the most efficient ways to see how much you know, or don't know, about the subject.

Count your score

You will get 1 point for each correct answer. At the end of the Quiz, your total score will be displayed.

Reflect on you answers

Please conduct a self review of your answers once you complete the quiz test. Being an active participant in your own evaluation, honestly assess your strengths and also areas you need to improve. Good luck!
--- # Sentinel Policy is only applied before terraform plan? 1. [ ] True 1. [x] False > Sentinel Policy is applied before terraform apply and after terraform plan # Which of the following commands can be used to log out from terraform cloud? 1. [x] Terraform logout 1. [ ] Terraform –logout 1. [ ] Terraform log out 1. [ ] Terraform –log-out # Debug is the most verbose log level in Terraform. 1. [ ] True 1. [ x] False # You are working with different Terraform States and you need access to the Terraform state for the organization "cncfacdemy” and the workspace "prod”. How will you configure the Terraform Datasource? 1. [x] data "terraform_remote_state” "remote_state” { backend = "remote” config = { organization = "cncfacdemy” workspaces = { name = "prod” } } } 1. [ ] data "terraform_remote_state” "remote_state” { backend = "remote” organization = "cncfacdemy” workspaces = "prod” } } 1. [ ] data "terraform_remote_state” "remote_state” { backend = "remote” organization = "cncfacdemy.prod” } } 1. [ ] None of the options # Which of the following below helps users to deploy policy as a code? 1. [ ] Resources 1. [ ] Functions 1. [x] Sentinel > The concept of writing code in a high-level language to manage and automate policies is known as policy as code. Proven software development best practises such as version control, automated testing, and automated deployment can be implemented by representing policies as code in text files. Sentinel is based on this concept and provides all of the advantages of policy as code. 1. [ ] Workspaces > https://docs.hashicorp.com/sentinel/concepts/policy-as-code/ # What are the benefits of Policy as Code in Terraform? - [x] Sandboxing > Policy as Code has the following benefits: Sandboxing, Codification, Version Control, Testing, and Automation. - [ ] Encryption - [x] Automation > Policy as Code has the following benefits: Sandboxing, Codification, Version Control, Testing, and Automation. - [ ] Clarification > https://docs.hashicorp.com/sentinel/concepts/policy-as-codE # You are trying to login into Terraform Enterprise. Which of the following command is used to save the API token? 1. [ ] `terrafrom get` 1. [ ] `terrafrom api-get` 1. [x] `terraform login` > Terraform Cloud, Terraform Enterprise, or any other host that offers. Terraform services can use the terraform login command to automatically obtain and save an API token. Terraform will obtain an API token by default and save it in plain text in the credentials.tfrc.json local CLI configuration file. When you run terraform login, it will explain where the API token will be saved and give you the option to cancel if the current configuration isn't what you want. 1. [ ] `terraform cloud – get api` > https://www.terraform.io/docs/commands/login.html # Please choose the operating systems which support terraform enterprise version. - [ ] Fedora - [x] Ubuntu 16.0.4.3 - [x] CentOS – 7.7 - [ ] Windows 7 - [ ] Mac OS > https://www.terraform.io/docs/enterprise/beforeinstalling/index.html#linux-instance # You have been asked to use sentinel Policies. During which phase it needs to be checked? 1. [ ] During terraform init 1. [ ] terraform apply 1. [ ] Before terraform apply 1. [x] After terraform plan > When a run is performed, the policies are checked. It can be verified by using the terraform apply command to put the terraform plan configuration into action. 1. [ ] terraform refresh > https://www.terraform.io/docs/cloud/sentinel/index.html # You are trying to login into Terraform Enterprise. Which of the following command is used to save the API token? 1. [ ] `terrafrom get` 1. [ ] `terrafrom api-get` 1. [x] `terraform login` > Terraform Cloud, Terraform Enterprise, or any other host that offers. Terraform services can use the terraform login command to automatically obtain and save an API token. Terraform will obtain an API token by default and save it in plain text in the credentials.tfrc.json local CLI configuration file. When you run terraform login, it will explain where the API token will be saved and give you the option to cancel if the current configuration isn't what you want. 1. [ ] `terraform cloud – get api` > https://www.terraform.io/docs/commands/login.html # Please choose the operating systems which support terraform enterprise version. - [ ] Fedora - [x] Ubuntu 16.0.4.3 - [x] CentOS – 7.7 - [ ] Windows 7 - [ ] Mac OS > https://www.terraform.io/docs/enterprise/beforeinstalling/index.html#linux-instance # Which of the following commands can be used to logout from terraform cloud? 1. [x] `Terraform logout` > The terraform logout command is used to remove terraform login's credentials. These credentials are API tokens for Terraform Cloud, Terraform Enterprise, or any other Terraform-compatible host. 1. [ ] `Terraform –logout` 1. [ ] `Terraform log out` 1. [ ] `Terraform –log-out` > https://www.terraform.io/docs/cli/commands/logout.html # What are the benefits of Policy as Code in Terraform? - [x] Sandboxing > Policy as Code has the following benefits: Sandboxing, Codification, Version Control, Testing, and Automation. - [ ] Encryption - [x] Automation > Policy as Code has the following benefits: Sandboxing, Codification, Version Control, Testing, and Automation. - [ ] Clarification > https://docs.hashicorp.com/sentinel/concepts/policy-as-codE # Which of the following below helps users to deploy policy as a code? 1. [ ] Resources 1. [ ] Functions 1. [x] Sentinel > The concept of writing code in a high-level language to manage and automate policies is known as policy as code. Proven software development best practises such as version control, automated testing, and automated deployment can be implemented by representing policies as code in text files. Sentinel is based on this concept and provides all of the advantages of policy as code. 1. [ ] Workspaces > https://docs.hashicorp.com/sentinel/concepts/policy-as-code/ # Which of the following features are exclusive to Terraform Enterprise.(Select THREE) - [x] SAML/SSO - [x] Audit logging - [ ] Remote state - [x] Servicenow integration - [ ] Public module registry > For more explanation, refer to the link below: > https://www.terraform.io/docs/cloud/api/index.html > https://www.terraform.io/docs/enterprise/index.html # MySQL is the backend database used by Terraform Enterprise. True or False. 1. [ ] True 1. [x] False > The correct backend database for Terraform Enterprise is Postgresql. Please see the following link for more information: https://www.terraform.io/docs/language/settings/backends/pg.html # With which version controls you can add modules on your Terraform Cloud private registry? 1. [ ] AWS CodeCommit and GitHub > Because AWS CodeCommit isn't supported, 1. [ ] AWS CodeCommit, Github, GitLab, BitBucket, GCP Cloud Source Repositories > Because AWS CodeCommit and GCP Cloud Source Repositories are not supported 1. [ ] AWS CodeCommit, GCP Cloud Source Repositories, Azure DevOps > Because AWS CodeCommit and GCP Cloud Source Repositories are not supported 1. [x] GitHub, GitLab, BitBucket, Azure DevOps > If you log into Terraform Cloud: https://app.terraform.io/ and try to add a module you will see the following providers where you can connect. > Reference: https://www.terraform.io/docs/cloud/vcs/index.html#supported-vcsproviders # As a result of your company's most recent audit, security and governance have risen to the top of the priority list. What's the best way to see if your Terraform code is ready to go in a production Terraform Cloud or Terraform Enterprise environment? 1. [ ] Use terratest > because terratest is used to automate infrastructure testing. 1. [x] Use Sentinel Policies > Sentinel allows Terraform to check policies after the terraform plan has been confirmed but before the terraform apply command has been executed. We can avoid provisions to production in this way if the code does not comply with my policy. 1. [ ] Use manual approvals during your PRs > because there is no way to manage your infrastructure's governance, and the Terraform code could be used in production. > Reference: https://www.terraform.io/docs/cloud/sentinel/index.html # Your colleague is new to Terraform cloud and is using a username and password to access the cloud from CLI. Will it work? 1. [ ] True 1. [x] False > API tokens are typically required to access the Terraform cloud via CLI and API interactions. > Reference: https://www.terraform.io/docs/cli/auth/index.html # Which of the following commands can be used to logout from terraform cloud? 1. [x] `Terraform logout` > The terraform logout command is used to remove terraform login's credentials. These credentials are API tokens for Terraform Cloud, Terraform Enterprise, or any other Terraform-compatible host. 1. [ ] `Terraform –logout` 1. [ ] `Terraform log out` 1. [ ] `Terraform –log-out` > https://www.terraform.io/docs/cli/commands/logout.html # You have been asked to use sentinel Policies. During which phase it needs to be checked? 1. [ ] During terraform init 1. [ ] terraform apply 1. [ ] Before terraform apply 1. [x] After terraform plan > When a run is performed, the policies are checked. It can be verified by using the terraform apply command to put the terraform plan configuration into action. 1. [ ] terraform refresh > https://www.terraform.io/docs/cloud/sentinel/index.html

Key capabilities of Terraform Cloud and Enterprise include

  1. Collaboration: Terraform Cloud and Enterprise enable teams to collaborate on infrastructure projects through shared workspaces, version control, and access controls.
  2. Remote state management: Terraform Cloud and Enterprise provide built-in remote state management, making it easy to store and manage state files securely in the cloud or on-premises.
  3. Automated workflows: Terraform Cloud and Enterprise enable users to set up automated workflows for testing, validation, and deployment of infrastructure resources, reducing errors and improving efficiency.
  4. Policy as code: Terraform Cloud and Enterprise support policy as code, enabling users to define policies and enforce compliance across their infrastructure resources.
  5. Enterprise-grade security and support: Terraform Cloud and Enterprise offer enterprise-grade security features, including audit logs, role-based access control, and single sign-on (SSO), as well as dedicated support from HashiCorp.

Overall, Terraform Cloud and Enterprise offer additional features and capabilities that can help organizations scale their infrastructure management, improve collaboration, and ensure compliance and security.