Member-only story
Backstage IDP with Terraform IaC
What is Backstage?
Backstage is an open-source platform designed to help developers create Internal Developer Portals (IDPs). Think of IDPs as a central hub where you can manage all your software resources, like CI/CD pipelines, documentation, APIs, and more. With an IDP, developers can streamline their workflows without relying heavily on DevOps
Flow diagram for Backstage/GitHub/Terraform/Cloud Providers

Backstage Pre-reqs
Before diving into Backstage templates, ensure you have the following ready:
Backstage is deployed — Follow the Backstage Getting Started Guide if you need help.
GitHub Integration — Backstage is connected to your GitHub repository.
Terraform Setup:
Working Terraform code in a GitHub repository to deploy an EC2 instance (Details Out of scope of this blog)
A GitHub Actions workflow file to execute Terraform commands (Details Out of scope of this blog)
AWS and GitHub — While this guide uses AWS and GitHub, you can adapt it for other CI/CD tools and cloud providers
What are Backstage templates?
Backstage provides a software catalog to manage resources like CI/CD pipelines, APIs, microservices, and more. To add a new resource to this catalog, you use templates.
Templates in Backstage are structured like Kubernetes manifests, so if you’re familiar with Kubernetes, you’ll find this easy. Below is a simple Backstage template to create an AWS EC2 instance
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: ec2-demo
title: EC2 Instance Creation
description: A template to create an AWS EC2 instance using Terraform.
spec:
owner: guest
type: service
parameters:
- title: EC2 Instance Configuration
required:
- InstanceName
- Region
- InstanceType
properties:
InstanceName:
title: Instance Name
type: string
description: Name of the instance.
Region:
title: AWS Region
type: string
description: AWS region (e.g., us-east-1, ap-south-1).
InstanceType:
title: Instance Type
type: string
description: Type of instance (e.g., t2.micro, t3.medium).
enum…