Belajar Sendiri

Terraform & OpenTofu glossary

Every Terraform & OpenTofu word in this course, in plain words.

.tfvars file
A file of variable values. terraform.tfvars and *.auto.tfvars load by themselves; others need -var-file.
In BM lessons: fail .tfvars: Fail berisi nilai variable. terraform.tfvars dan *.auto.tfvars dibaca sendiri; yang lain perlu -var-file.
apply
Build from the blueprint. OpenTofu shows the plan, waits for yes, then makes the changes.
In BM lessons: apply: Bina dari pelan. OpenTofu tunjuk plan, tunggu yes, kemudian buat perubahan itu.
argument
One setting inside a block: a name, an equals sign and a value, like length = 2.
In BM lessons: argument: Satu tetapan dalam blok: nama, tanda sama dengan, dan nilai, seperti length = 2.
backend
Where the register (the state) lives. A shared one online lets a whole team read the same register.
In BM lessons: backend: Tempat daftar (state) disimpan. Backend bersama dalam talian biar seluruh pasukan baca daftar yang sama.
block
One part of a blueprint. It starts with a type and labels, like resource "local_file" "sign", then its settings in { }.
In BM lessons: block (blok): Satu bahagian pelan. Ia bermula dengan jenis dan label, seperti resource "local_file" "sign", kemudian tetapannya dalam { }.
conditional
condition ? this : that. It picks one of two values, like var.open ? "OPEN" : "CLOSED".
In BM lessons: conditional (bersyarat): syarat ? ini : itu. Ia pilih satu daripada dua nilai, seperti var.open ? "OPEN" : "CLOSED".
cost check
A check that prices the changes in a plan and shows the monthly difference on the pull request.
In BM lessons: semakan kos: Semakan yang letak harga pada perubahan dalam plan dan tunjuk beza bulanan dalam pull request.
count
Make N copies of one resource. They are numbered from 0: helper[0], helper[1], helper[2].
In BM lessons: count: Buat N salinan satu resource. Ia bernombor dari 0: helper[0], helper[1], helper[2].
data source
A data block that reads something that already exists. OpenTofu never changes or destroys it.
In BM lessons: data source (sumber data): Blok data yang membaca sesuatu yang sudah wujud. OpenTofu tak pernah ubah atau musnahkannya.
destroy
Tear down everything the blueprint built. OpenTofu lists what goes and waits for yes.
In BM lessons: destroy: Robohkan semua yang pelan sudah bina. OpenTofu senaraikan apa yang hilang dan tunggu yes.
drift
The real building no longer matches the register, because someone changed it by hand.
In BM lessons: drift: Bangunan sebenar tak lagi sepadan dengan daftar, sebab seseorang ubah dengan tangan.
expression
Anything that works out a value: "text", var.shop, 2 + 3, or a function call.
In BM lessons: expression (ungkapan): Apa-apa yang menghasilkan nilai: "teks", var.shop, 2 + 3, atau panggilan fungsi.
for_each
Make one copy per item of a map or set, named by its key: stall["nasi"].
In BM lessons: for_each: Buat satu salinan untuk setiap item dalam map atau set, dinamakan ikut kuncinya: stall["nasi"].
function
A built-in helper that turns values into new ones: upper("kancil") gives "KANCIL".
In BM lessons: function (fungsi): Pembantu terbina dalam yang tukar nilai jadi nilai baru: upper("kancil") beri "KANCIL".
HCL
The language of .tf files. It is made of blocks: a type, labels, then settings inside { }.
In BM lessons: HCL: Bahasa fail .tf. Ia dibina daripada blok: satu jenis, label, kemudian tetapan di dalam { }.
import block
Code that adopts something already built by hand, so OpenTofu manages it without building it again.
In BM lessons: blok import: Kod yang ambil alih benda yang sudah dibina dengan tangan, supaya OpenTofu urus tanpa bina semula.
infrastructure as code (IaC)
Writing your servers and settings down as text files, like a blueprint. A tool then builds exactly what the files say.
In BM lessons: infrastructure as code (IaC): Tulis server dan tetapan anda dalam fail teks, macam pelan arkitek. Satu alat kemudian bina tepat seperti yang fail itu kata.
local value
A name for a value you reuse inside one blueprint: local.hours. Change it once; every use follows.
In BM lessons: local value (nilai tempatan): Nama untuk nilai yang anda guna berulang dalam satu pelan: local.hours. Ubah sekali; semua yang guna ikut.
lock file
.terraform.lock.hcl: the receipt tofu init writes. It records which provider versions it picked. Commit it to Git.
In BM lessons: lock file (fail kunci): .terraform.lock.hcl: resit yang tofu init tulis. Ia catat versi provider yang dipilih. Commit fail ini ke Git.
module
A stall design you can reuse: a folder of .tf files. Variables go in, outputs come out.
In BM lessons: modul: Reka bentuk gerai yang boleh diguna semula: satu folder fail .tf. Variable masuk, output keluar.
moved block
Code that says: same thing, new address. A rename then changes nothing real.
In BM lessons: blok moved: Kod yang berkata: benda sama, alamat baharu. Tukar nama pun tak ubah benda sebenar.
OpenTofu
The open-source IaC tool these lessons use. Command: tofu. Licence: MPL 2.0. A Linux Foundation project.
In BM lessons: OpenTofu: Alat IaC sumber terbuka yang pelajaran ini guna. Arahan: tofu. Lesen: MPL 2.0. Projek Linux Foundation.
output
A value the blueprint shares after apply, like a stall's name. tofu output prints it.
In BM lessons: output: Nilai yang pelan kongsi selepas apply, seperti nama gerai. tofu output memaparkannya.
plan
The site inspector's report: what apply would create (+), change (~), destroy (-) or replace (-/+). A plan changes nothing.
In BM lessons: plan (rancangan): Laporan pemeriksa tapak: apa yang apply akan cipta (+), ubah (~), musnah (-) atau ganti (-/+). Plan tak ubah apa-apa.
policy check
A written rule a robot checks on every plan, like: nothing may destroy the database.
In BM lessons: semakan polisi: Peraturan bertulis yang robot semak pada setiap plan, seperti: tiada apa boleh musnahkan pangkalan data.
provider
A plugin that knows how to build one family of things, like a supplier. random makes names; local makes files.
In BM lessons: provider (pembekal): Plugin yang tahu cara bina satu keluarga benda, macam pembekal. random buat nama; local buat fail.
reference
Using a value from another block by its address: type, name, then the value, like random_pet.stall.id.
In BM lessons: reference (rujukan): Guna nilai dari blok lain melalui alamatnya: jenis, nama, kemudian nilai, seperti random_pet.stall.id.
replace (-/+)
Destroy the old thing, then build a new one. It happens when a setting can't change in place.
In BM lessons: replace (-/+): Musnahkan benda lama, kemudian bina yang baru. Ia berlaku bila sesuatu tetapan tak boleh diubah di tempatnya.
resource
One thing OpenTofu builds and looks after: a file, a name, a server. You draw it with a resource block.
In BM lessons: resource (sumber): Satu benda yang OpenTofu bina dan jaga: fail, nama, server. Anda lukis ia dengan blok resource.
sensitive value
A value hidden in plans and outputs. The state file still keeps it as plain text.
In BM lessons: nilai sensitif: Nilai yang disorok dalam plan dan output. Fail state masih simpannya sebagai teks biasa.
state
The building's register: terraform.tfstate. It records what OpenTofu built, so the next plan can compare.
In BM lessons: state (daftar bangunan): Daftar bangunan: terraform.tfstate. Ia catat apa yang OpenTofu sudah bina, supaya plan seterusnya boleh banding.
state lock
A busy sign on the register. While one run writes, another run stops with a lock error.
In BM lessons: state lock: Tanda sibuk pada daftar. Semasa satu larian menulis, larian lain berhenti dengan ralat kunci.
Terraform
The original IaC tool, from HashiCorp (now part of IBM). Command: terraform. Same language. Licence: BUSL.
In BM lessons: Terraform: Alat IaC asal, dari HashiCorp (kini sebahagian IBM). Arahan: terraform. Bahasa yang sama. Lesen: BUSL.
type
What kind of value a variable takes: string (text), number, bool (true or false), list, set, map or object.
In BM lessons: type (jenis): Jenis nilai yang variable terima: string (teks), number, bool (true atau false), list, set, map atau object.
variable
A blank on the blueprint, filled in when you build: var.shop. One blueprint, many shops.
In BM lessons: variable (pemboleh ubah): Ruang kosong pada pelan, diisi semasa anda bina: var.shop. Satu pelan, banyak kedai.
version pin
The versions of a module or provider you trust, like ~> 1.2. Nothing outside the range sneaks in.
In BM lessons: pin versi: Versi modul atau provider yang anda percaya, seperti ~> 1.2. Versi di luar julat tak boleh menyelinap masuk.
workspace
A second register for the same blueprint and backend. Good for short test copies.
In BM lessons: workspace: Daftar kedua untuk pelan dan backend yang sama. Sesuai untuk salinan ujian sekejap.