DevOps

Terraform Advanced

Modules, workspaces, remote state, data sources, dynamic blocks, provisioners, drift detection

22 pertanyaan wawancara·
Mid-Level
1

What is a Terraform module?

Jawaban

A Terraform module is a reusable container of resources and infrastructure logic. It allows encapsulating a set of related resources and reusing them across different projects or environments. Modules accept input variables and can expose outputs to enable composition and chaining between modules.

2

What is the main difference between a workspace and a module?

Jawaban

Workspaces allow managing multiple instances of the same code with separate state files, while modules encapsulate reusable code. A workspace serves to isolate states for different environments, whereas a module serves to reuse infrastructure logic. Workspaces share the same code but different states, modules share code across projects.

3

What is the main advantage of using a remote backend like S3 instead of local state?

Jawaban

The remote backend enables state sharing between team members and guarantees deployment consistency. With local state, each developer has their own copy, creating conflicts and inconsistencies. The remote backend also offers state locking to prevent concurrent modifications and facilitates collaboration by centralizing the source of truth.

4

How to create a new Terraform workspace?

5

What is the difference between a data source and a resource in Terraform?

+19 pertanyaan wawancara

Kuasai DevOps untuk wawancara berikutnya

Akses semua pertanyaan, flashcards, tes teknis, latihan code review dan simulator wawancara.

Mulai gratis