Understand Terraform Cloud and Enterprise capabilities Flashcards

1
Q

What is Sentinel?

A

Sentinel is an embedded 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the benefit of Sentinel?

A

Codifying policy removes the need for ticketing queues, without sacrificing enforcement.
One of the other benefits of Sentinel is that it also has a full testing framework.
Avoiding a ticketing workflow allows organizations to provide more self-service capabilities and end-to-end automation, minimizing the friction for developers and operators.
https://www.hashicorp.com/blog/why-policy-as-code/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Private Module Registry?

A

Terraform Cloud’s private module registry helps you share Terraform modules across your organization. It includes support for module versioning, a searchable and filterable list of available modules, and a configuration designer to help you build new workspaces faster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between public and private module registries when defined source?

A

The public registry uses a three-part // format

private modules use a four-part /// format

// example
module "vpc" {
    source = "app.terraform.io/example_corp/vpc/aws"
    version = "1.0.4"
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Where is the Terraform Module Registry available at?

A

https://registry.terraform.io/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a workspace?

A

A workspace contains everything Terraform needs to manage a given collection of infrastructure, and separate workspaces function like completely separate working directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the benefits of workspaces?

A

https://www.hashicorp.com/resources/terraform-enterprise-understanding-workspaces-and-modules/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You are configuring a remote backend in the terraform cloud. You didn’t create an organization before you do terraform init. Does it work?

A

While the organization defined in the backend stanza must already exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You are configuring a remote backend in the terraform cloud. You didn’t create a workspace before you do terraform init. Does it work?

A

Terraform Cloud will create it if necessary. If you opt to use a workspace that already exists, the workspace must not have anyexisting states.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Terraform workspaces when you are working with CLI and Terraform workspaces in the Terraform cloud. Is this correct?

A

If you are familiar with running Terraform using the CLI, you may have used Terraform workspaces. Terraform Cloud workspaces behave differently than Terraform CLI workspaces. Terraform CLI workspaces allow multiple state files to exist within a single directory,
enabling you to use one configuration for multiple environments. Terraform Cloud workspaces contain everything needed to manage a given set of infrastructure, and function like separate working
directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you authenticate the CLI with the terraform cloud?

A

Newer Versions:

  1. terraform login
  2. it will open the terraform cloud and generate the token
  3. paste that token back in the CLI
    https: //learn.hashicorp.com/terraform/tfc/tfc_login

Older versions:
keep the following token in the CLI configuration file
credentials “app.terraform.io” {
token = “xxxxxx.atlasv1.zzzzzzzzzzzzz”
}
https://www.terraform.io/docs/commands/cli-config.html#credentials

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

You are building infrastructure on your local machine and you changed your backend to remote backend with the Terraform cloud. What should you do to migrate the state to the remote backend?

A

terraform init

Once you have authenticated the remote backend, you’re ready to migrate your local state file to Terraform Cloud. To begin the migration, reinitialize. This causes Terraform to recognize your changed backend configuration.
During reinitialization, Terraform presents a prompt saying that it will copy the state file to the new backend. Enter “yes” and Terraform will migrate the state from your local machine to Terraform Cloud.
https://learn.hashicorp.com/terraform/tfc/tfc_migration#migrate-the-state-file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you configure remote backend with the terraform cloud?

A
You need to configure in the terraform block
terraform {
    backend "remote" {
        hostname = "app.terraform.io"
        organization = ""
        workspaces {
             name = "state-migration"
       }
    }
 }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Run Triggers?

A

Terraform Cloud’s run triggers allow you to link workspaces so that a successful apply in a source workspace will queue a run in the
workspace linked to it with a run trigger.
For example, adding new subnets to your network configuration could trigger an update to your application configuration to rebalance servers across the new subnets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the benefit of Run Triggers?

A

When managing complex infrastructure with Terraform Cloud, organizing your configuration into different workspaces helps you to better manage and design your infrastructure.
Configuring run triggers between workspaces allows you to set up infrastructure pipelines as part of your overall deployment strategy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the available permissions that terraform clouds can have?

A

Terraform Cloud teams can have read, plan, write, or admin permissions on individual workspaces.

17
Q

Who can grant permissions on the workspaces?

A

Organization owners grant permissions by grouping users into teams and giving those teams priviliges based on their need for access to individual workspaces.

18
Q

Which plan do you need to manage teams on Terraform cloud?

A

Team Plan

19
Q

How can you add users to an organization?

A

You can add users to an organization by inviting them using their email address.
Even if your team member has not signed up for Terraform Cloud yet, they can still accept the invitation and create a new account.

20
Q

The Terraform Cloud Team plan charges you on a per-user basis. Is this true?

A

Yes. The Terraform Cloud Team plan is charged on a per-user basis so adding new users to your organization incurs cost.