Provisioning
Choosing the infrastructure is only half of the job. The other half is how a team gets from "we need a new service" to a running, secure, monitored service that follows the organization's standards. Without a platform, that path usually involves tickets, copy-pasting from an older project, and weeks of waiting. Every team ends up with a slightly different setup.
Provisioning as a platform capability turns this into self-service: a developer fills in a short form, and a few minutes later has a repository, a pipeline and cloud infrastructure, all built to the organization's standards.
Golden paths
A golden path is the recommended, supported way to build and run a certain kind of software in the organization. The term was popularized by Spotify, where engineers faced too many choices and too much fragmentation across their software ecosystem.
A golden path is:
- Opinionated. It makes decisions on behalf of teams: language, framework, CI/CD, infrastructure, monitoring, security settings.
- Supported. A platform team maintains it, keeps it up to date, and helps teams that use it.
- Optional, but attractive. Teams may leave the path when they have a good reason, but then they take on the extra work themselves. The path should be so convenient that most teams choose it voluntarily.
- End-to-end. It covers the whole journey, from creating the repository to running in production, not just one step.
Golden paths are the platform mindset in practice. Instead of writing a guideline that says "every service must use encryption, tagging and structured logging", the platform provides a path where all of that is already in place. Following the standard becomes the easiest option.
Typical golden paths include:
- a containerized REST service with a database
- an event-driven consumer of a message topic
- a static website or single-page application
- a data pipeline or data product
- a new AWS account for a team
Templating
Templating is how golden paths are put into practice. A template is a parameterized blueprint of a new project. It contains:
- a skeleton: application code, configuration, infrastructure code, pipeline definitions and documentation, with placeholders such as the service name or owner
- parameters: the few questions a developer must answer
- steps: the actions that turn the skeleton into a real project, such as creating a repository, registering the service in the catalog, or triggering a pipeline
The template captures the organization's decisions once. Each new project starts from the current best practice, not from whichever older project someone happened to copy.
Example architecture: Backstage, Terraform and AWS
The following architecture shows a common way to implement golden paths with Backstage Software Templates, GitHub, Terraform and AWS.
- The developer opens Backstage, picks a template such as "Containerized service on AWS", and answers a few questions: name, owning team, system, whether a database is needed.
- Backstage reads the template definition and skeleton from the template repository, maintained by the platform team.
- Backstage renders the skeleton with the developer's answers and creates a new GitHub repository.
- Backstage registers the new component in the Software Catalog, with its owner and system, so it appears in the systems inventory from day one.
- The first push to the repository triggers the CI/CD pipeline.
- The Terraform code in the new repository uses versioned modules from the platform team instead of raw AWS resources.
- The pipeline authenticates to AWS with short-lived OIDC credentials (no stored secrets), runs policy checks, and applies the Terraform code to the team's AWS account. Organization-wide guardrails apply regardless of what the code says.
Where the standards live
Standards are enforced at several layers. Each layer catches what the previous one might miss:
| Layer | What it enforces | Owned by |
|---|---|---|
| Template | Project structure, technology choices, pipeline, catalog registration, documentation | Platform team |
| Terraform modules | Secure defaults: encryption, private networking, logging, backups, tagging, approved instance types | Platform team |
| Pipeline policy checks | Rules on the final plan, for example "no public S3 buckets", using tools such as Checkov or Open Policy Agent | Platform and security teams |
| AWS guardrails | Hard limits no code can bypass: allowed regions, no disabling of audit logs, using Service Control Policies and AWS Control Tower | Cloud center of excellence or security team |
The template gives teams a good start. Modules, policy checks and guardrails keep them on the path when the code changes later.
The building blocks
Backstage template
A template is defined in a template.yaml file. It declares the parameters (rendered as a form in Backstage), the steps to run, and the output shown to the developer at the end.
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: aws-container-service
title: Containerized service on AWS
description: Java service running on Amazon ECS, with optional PostgreSQL database, CI/CD and monitoring.
tags: [recommended, java, aws]
spec:
owner: group:platform-team
type: service
parameters:
- title: Service details
required: [name, owner, system]
properties:
name:
title: Name
type: string
pattern: '^[a-z0-9-]+$'
description: Lowercase letters, digits and dashes.
owner:
title: Owning team
type: string
ui:field: OwnerPicker
ui:options:
catalogFilter:
kind: Group
system:
title: System
type: string
ui:field: EntityPicker
ui:options:
catalogFilter:
kind: System
- title: Infrastructure
properties:
withDatabase:
title: PostgreSQL database
type: boolean
default: false
criticality:
title: Criticality
type: string
enum: [tier-1, tier-2, tier-3]
default: tier-3
- title: Repository
required: [repoUrl]
properties:
repoUrl:
title: Repository location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts: [github.com]
steps:
- id: fetch
name: Render skeleton
action: fetch:template
input:
url: ./skeleton
values:
name: ${{ parameters.name }}
owner: ${{ parameters.owner }}
system: ${{ parameters.system }}
withDatabase: ${{ parameters.withDatabase }}
criticality: ${{ parameters.criticality }}
copyWithoutTemplating:
- .github/workflows/*
- id: publish
name: Create GitHub repository
action: publish:github
input:
repoUrl: ${{ parameters.repoUrl }}
description: ${{ parameters.name }} service
defaultBranch: main
- id: register
name: Register in Software Catalog
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
catalogInfoPath: /catalog-info.yaml
output:
links:
- title: Repository
url: ${{ steps.publish.output.remoteUrl }}
- title: Open in catalog
icon: catalog
entityRef: ${{ steps.register.output.entityRef }}
Backstage ships with many built-in actions (fetch, publish to GitHub/GitLab/Bitbucket, register in the catalog), and organizations can add custom actions, for example to create a Jira project or request a new AWS account.
Skeleton
The skeleton is a folder of files that are copied into the new repository. Placeholders in the form ${{ values.name }} are replaced with the developer's answers, using the Nunjucks templating language. Conditions such as {% if values.withDatabase %} include or exclude parts of the files.
templates/aws-service/
├── template.yaml
└── skeleton/
├── catalog-info.yaml # registers the service in the catalog
├── README.md
├── docs/ # TechDocs documentation
├── src/ # application code from the golden path
├── Dockerfile
├── infra/
│ ├── main.tf # uses platform modules
│ └── backend.tf # remote state
└── .github/workflows/
└── deploy.yaml # build, policy checks, terraform apply
GitHub Actions workflows use the same ${{ ... }} syntax as Backstage templates. Exclude them from templating with copyWithoutTemplating (as in the template above), or wrap them in {% raw %} blocks. Otherwise Backstage tries to replace the workflow's expressions.
The catalog-info.yaml in the skeleton makes sure every new service is registered with an owner, system and criticality from the start:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: ${{ values.name }}
tags: [java, aws, ${{ values.criticality }}]
spec:
type: service
lifecycle: production
owner: ${{ values.owner }}
system: ${{ values.system }}
Terraform modules
The infrastructure code in the skeleton is deliberately short. It calls modules owned by the platform team, which contain the organization's standards. Product teams decide what they need. The modules decide how it is built.
provider "aws" {
region = "eu-central-1"
default_tags {
tags = {
service = "${{ values.name }}"
owner = "${{ values.owner }}"
system = "${{ values.system }}"
criticality = "${{ values.criticality }}"
managed-by = "terraform"
}
}
}
module "service" {
source = "git::https://github.com/acme/terraform-aws-ecs-service.git?ref=v3.2.0"
name = "${{ values.name }}"
container_port = 8080
cpu = 512
memory = 1024
}
{% if values.withDatabase %}
module "database" {
source = "git::https://github.com/acme/terraform-aws-postgres.git?ref=v2.4.1"
name = "${{ values.name }}"
allowed_sg_ids = [module.service.security_group_id]
}
{% endif %}
Inside terraform-aws-ecs-service, the platform team implements everything the product team should not have to think about: private subnets, load balancer with TLS, log groups with retention, alarms, IAM roles with least privilege, and encryption. The modules are often built on top of community modules such as terraform-aws-modules.
Pinning module versions (?ref=v3.2.0) keeps changes predictable. Tools such as Renovate can open pull requests when a new module version is released, so improvements reach existing services too.
Pipeline
The pipeline applies the Terraform code. It authenticates to AWS using OpenID Connect (OIDC), so no long-lived AWS keys are stored in GitHub.
name: Deploy infrastructure
on:
push:
branches: [main]
pull_request:
permissions:
id-token: write # required for OIDC
contents: read
jobs:
terraform:
runs-on: ubuntu-latest
defaults:
run:
working-directory: infra
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_DEPLOY_ROLE_ARN }}
aws-region: eu-central-1
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- run: terraform plan -out=tfplan
- run: terraform show -json tfplan > tfplan.json
- name: Policy checks
run: pipx run checkov -f tfplan.json
- if: github.ref == 'refs/heads/main'
run: terraform apply tfplan
Terraform state is stored remotely, for example in an S3 backend, so that pipeline runs and team members share one view of the infrastructure.
AWS landing zone
The template assumes that the team already has an AWS account with a deployment role and networking in place. That foundation is itself a golden path: account vending. With AWS Control Tower and Account Factory for Terraform (AFT), new accounts are created from code, with baseline security, logging and networking applied automatically. A Backstage template can trigger account vending too, so teams can request a new account through the same portal.
Day 2: keeping services on the path
Creating a project from a template is a one-time event. The harder part is keeping hundreds of services aligned as standards evolve:
- Put standards in modules and shared pipelines, not in copied code. A fix in a module or a shared workflow reaches every service with a version bump. A fix in the template only reaches new services.
- Automate upgrades. Use Renovate or similar tools to propose module and dependency upgrades as pull requests.
- Measure adoption. The Software Catalog shows which services were created from which template and which module versions they use. Scorecards (for example with Backstage plugins) show how far each service is from the current standard.
- Treat templates as products. Collect feedback from developers, measure how long it takes to get to production, and remove friction. A golden path that nobody uses is just another guideline.
Further reading
- Backstage Software Templates and Writing Templates
- Backstage template input examples
- How We Use Golden Paths to Solve Fragmentation in Our Software Ecosystem (Spotify Engineering)
- CNCF Platforms White Paper
- Terraform modules and module sources
- configure-aws-credentials and setup-terraform GitHub Actions