Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 3.05 KB

README.md

File metadata and controls

61 lines (49 loc) · 3.05 KB

Platform: Internals

Overview

Terraform Cloud

This repository is dedicated to bootstrapping and managing the infrastructure prerequisites of our platforms. It includes tasks such as:

  • Bootstrapping Azure subscriptions
  • Resolving Terraform Cloud chicke-and-egg problem
  • Managing GitHub repositories
  • Distributing credentials among repositories
  • Managing Terraform Cloud organization, projects, workspaces, variable-sets, and custom modules
  • Manage Port IDP blueprints, actions, etc.

Sequence of Bootstrapping

sequenceDiagram
    actor PLA as Platform Admin
    participant RPI as platform-internals
    participant AZR as Azure
    participant TFC as Terraform Cloud

    PLA ->> RPI: Fetch scripts
    PLA ->> AZR: Run `azure-register-subscription-providers.sh`<br>Enable required Azure providers such as Compute
    PLA ->> AZR: Run `azure-create-terraform-service-principal.sh`<br>Create a Service Principal for `terraform-operations`
    PLA ->> TFC: Run `terraform-cloud-bootstrap.sh`<br>Create `remote-operations` workspace
    PLA ->> TFC: Add SP credentials as `remote-operations` secrets
Loading

Sequence of Synchronizing Infrastructure Prerequisites

sequenceDiagram
    actor PLA as Platform Engineers
    participant RPI as platform-internals
    participant TFC as Terraform Cloud
    participant GHB as GitHub
    participant PRT as Port IDP

    loop Updating Infrastructure Prerequisites
        PLA ->> RPI: Push changes to<br>`modules/infrastructure-prerequisites`
        RPI ->> TFC: Plan and run Terraform<br>Triggered by `terraform-cloud.yaml` workflow
        TFC ->> TFC: Change to desired state
        TFC ->> GHB: Change to desired state
        TFC ->> PRT: Change to desired state
    end
Loading

Components

The repository contains several scripts and modules designed to automate and simplify infrastructure management.

Scripts

Modules

Workflows