Skip to main content
A.I. Commerce Studio

Resources · Integration patterns

Terraform and GitOps delivery

Infrastructure and environments are code; changes go through review, a plan and automatic apply.

Integration status: Documented pattern

A documented pattern. The product manages no client infrastructure.

Description

Terraform describes infrastructure and GitOps the desired state of environments. A pull request shows the plan; after approval a pipeline with short-lived permissions applies the change.

Prerequisites

  • Remote state with locking.
  • Modules and versions.
  • Separate permissions per environment.

When to use it

  • Repeatable environments.
  • An audit trail of changes is needed.
  • Several teams and environments.

When not to use it

  • A one-off experiment.
  • Resources designed to change manually.
  • No review discipline.

Reference diagram

An illustration of the components and the flow — not a running system.

  1. 01Change

    • Pull request
    • Terraform plan
  2. 02Review

    • Approval
    • Policy checks
  3. 03Apply

    • Pipeline with OIDC
    • Remote state with locking
  4. 04Compliance

    • Drift detection
The diagram as a list
StageComponents
ChangePull request, Terraform plan
ReviewApproval, Policy checks
ApplyPipeline with OIDC, Remote state with locking
ComplianceDrift detection

Security controls

  • Short-lived pipeline permissions (OIDC).
  • No secrets in code or state.
  • Policy as code before apply.

Observability

  • Apply duration and success.
  • Drift per environment.
  • Frequent changes per module.

Failure modes

FailureMitigation
Manual change and driftPeriodic drift detection.
Locked stateA release procedure.
Dangerous planReview and deletion protection.