الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 11الاسم في الدورة: Objective 8: HCP Terraform

Run Terraform in HCP Terraform

HCP Terraform (earlier: Terraform Cloud) runs Terraform for a team: remote state, remote runs, a private module registry, policies, cost estimates and run history. The free tier is enough to learn.

  • 5 الدروس
  • 1 الأوامر

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع sudo)

المهارات في هذا الفصل

  • مساحات العمل والمشاريع والتشغيلات والسياسات وربط VCS

11.1

Connect a configuration to HCP Terraform

The cloud block (instead of backend) links the folder to an organisation and workspace.

cloud.tf
terraform {
  cloud {
    organization = "s0sta"
    workspaces {
      name = "shop-prod"
    }
  }
}
terraform login
terraform init
terraform plan

With the CLI-driven workflow, plan and apply still start on your machine but run remotely, with the variables and credentials stored in the workspace.

الأوامر في هذا الدرس

11.2

Organise workspaces and projects

A workspace = one state + its variables + its runs (usually one environment of one component). Projects group workspaces and their access.

LevelExample
Organisations0sta
Projectshop (team access is set here)
Workspaceshop-network-prod, shop-app-prod, shop-app-dev

تذكّر

HCP Terraform workspaces are not the same as CLI workspaces (terraform workspace new). CLI workspaces only keep several states in one backend.

الأوامر في هذا الدرس

11.3

Choose a run workflow

Three ways to start runs.

WorkflowRuns start when
VCS-drivenA commit or pull request in the linked Git repository (speculative plan on PRs)
CLI-drivenYou run terraform plan/apply locally
API-drivenA pipeline calls the API

الأوامر في هذا الدرس

11.4

Use the collaboration and governance features

HCP Terraform adds team controls around runs.

  • Variables and variable sets: Terraform and environment variables, sensitive ones hidden; one set shared by many workspaces.
  • Teams and permissions: who may plan, apply, or manage a workspace or project.
  • Private registry: share approved modules and providers in the organisation.
  • Policy as code (Sentinel or OPA): checks between plan and apply — "no public IPs", "only these VM sizes", "tags required".
  • Run tasks: call external tools (security scan, cost check) during a run.
  • Drift detection and health checks: find changes made outside Terraform.
  • Audit trail: every run, who approved it, and its plan.

11.5

Integrate with other tools

Link HCP Terraform to Git, to clouds without static keys, and to notifications.

  • VCS providers: GitHub, GitLab, Azure DevOps, Bitbucket.
  • Dynamic provider credentials: OIDC trust between HCP Terraform and Azure/AWS/GCP — no stored cloud keys.
  • Notifications: Slack, Teams, email or webhooks on run events.
  • **API and the tfe provider**: manage workspaces themselves as code.

نصيحة للامتحان

Know which features are in which tier only roughly; know well what each feature does and where it is configured (organisation, project or workspace).

كل الأوامر في هذا الفصل