Flashcards

(26 cards)

1
Q

What is Infrastructure as Code (IaC)?

A

IaC is the practice of provisioning and managing infrastructure (servers, networks, etc.) using machine-readable configuration files rather than manual processes.

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

Why is manual configuration problematic?

A

Manual configuration is error-prone, difficult to keep consistent across environments, and hard to track or transfer knowledge among team members.

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

What are the main benefits of IaC?

A
  • Consistency and repeatability of environments
  • Faster provisioning and updates
  • Version control of configurations
  • Easier collaboration among team members
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does it mean that IaC is “a blueprint of your infrastructure”?

A

It means your entire infrastructure configuration is captured in code, acting as a single source of truth for how servers, networks, and other resources are set up.

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

What is idempotency in IaC?

A

Idempotency means applying the same configuration multiple times will produce the same result, ensuring consistent infrastructure states.

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

What is “desired state” in IaC?

A

“Desired state” refers to the target configuration that you define in code; IaC tools ensure your infrastructure matches this state.

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

terraform apply

A

Builds or changes infrastructure according to the configuration.

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

terraform console

A

Opens an interactive console for experimenting with Terraform expressions and interpolations.

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

terraform destroy

A

Destroys all infrastructure managed by the Terraform configuration.

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

terraform env

(Note: This command has been replaced by terraform workspace in newer versions)

A

Manages environments (workspaces) in older Terraform versions.

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

terraform fmt

A

Rewrites configuration files to a canonical format and style.

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

terraform get

A

Downloads and installs modules required by the configuration.

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

terraform graph

A

Generates a visual dependency graph of Terraform resources.

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

terraform import

A

Imports existing infrastructure into Terraform’s state.

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

terraform init

A

Initializes a Terraform working directory (downloads providers, sets up backend, etc.).

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

terraform output

A

Reads and displays output values from the Terraform state file.

17
Q

terraform plan

A

Generates and shows an execution plan, detailing the actions Terraform will take.

18
Q

terraform providers

A

Lists all the providers used in the configuration, often in a tree format.

19
Q

terraform push

(Note: This is an older feature related to HashiCorp Atlas and is no longer actively used)

A

Uploads the Terraform module to Atlas for remote execution.

19
Q

terraform refresh

A

Updates the local state file to reflect the real-world infrastructure.

20
Q

terraform show

A

Displays detailed information about the current state or a plan file.

21
Q

terraform taint

A

Manually marks a resource for recreation during the next apply.

22
Q

terraform untaint

A

Removes the “tainted” mark from a resource, preventing its recreation.

23
Q

terraform validate

A

Validates the configuration files for syntax errors or inconsistencies.

24
terraform version
Displays the current Terraform version.
25
terraform workspace
Manages multiple workspaces (environments) within the same configuration directory.