Terraform Cloud & Enterprise Capabilities Flashcards
Whats HCP Terraform?
HCP (Hashicorp Cloud Platform) Terraform manages Terraform runs in a consistent and reliable environment with various features like access control, private registry for sharing modules, policy controls and others.
Its broken down by workspaces
What is the use of the organizations in HCP?
They are a shared spare for one or more teams to collab on workspaces.
HCP Terraform manages plans/billing at the org level.
Whats the HCP Terraform Workspace?
The workspace acts as a folder with relatable files for project to run
The terraform config files aren’t directly uploaded to a workspace, instead the workspaces are connected to a Github repository where it can fetch the code from
How does variable values differ from local terraform to HCP Terraform?
Locally, you store in .tfvars file, as CLI Arguments, or shell environment. In HCP, you store in the workspace
How are the state files stored in HCP Terraform?
They are stored also in the workspace
What three types of workflows exist in HCP
- Version Control
- CLI-Driven (working directory (local) is linked with HCP workspace). Plan/apply commands can also be run locally.
- API-Driven
How do you setup the CLI HCP Cloud integration?
- You have to add a code block within your .tf file to setup cloud integration.
terraform {
cloud {
organization = “org_name”
workspaces { name = "workspace_name" } } }
- Once block has been added, do the command terraform login in your CLI
- terraform init
- terrform plan
What is Sentinel?
Sentinel is a policy-as-code framework integrated with the Hashicorp Enterprise products.
It enables fine-grained, logic-based policy decisions, and can be extended to use information from external sources.
Note: Sentinel policies are paid features.
Ex: You can create a policy in sentinel to block EC2 creation without tags
What are air-gapped environments?
An air gap is a network security measure employed to ensure that a secure computer network is physically isolated from unsecured networks, such as the public internet.
Ex: military/govt’t, financial systems (stock exchange), industrial control systems (SCADA)
Can you install Terraform Enterprise on an air-gapped network?
Terraform Enterprise installs using either an online or air gapped method and as the name infers, one requires internet connectivity, the other doesnt