PinterestPinterest EngineeringProblem & solution
Securing Infrastructure at Scale: Introducing Pinterest’s Resource Provisioner Pipeline (RPP)
Summary
Managing Infrastructure as Code across distributed repositories presents significant security and operational challenges. Pinterest developed the Resource Provisioner Pipeline (RPP), a proprietary Terraform execution engine, to securely deploy and manage AWS infrastructure across hundreds of workspaces. The pipeline utilizes centralized GitHub composite actions triggered by pull request events and enforces dual human approvals. To maintain least privilege, RPP uses GitHub OpenID Connect authentication to assume a central identity before validating repository paths and down-scoping to specific team execution roles. Automated checks include backend state validation, linting, plan generation, Semgrep static analysis, and optional LocalStack testing before deliberate comment-driven deployments execute.
Context
Pinterest needed to manage Infrastructure as Code and AWS resources across a distributed, multi-repository architecture owned by different teams while enforcing security guardrails, compliance, and least privilege without granting broad permissions to CI/CD systems.
Approach / What changed
Pinterest created the Resource Provisioner Pipeline (RPP), which uses centralized GitHub Actions, dual controls, and OIDC-validated role-chaining that determines workspace properties from a central mapping file, validates S3 state backends, down-scopes to team-specific IAM roles, and runs linting, planning, and comment-triggered applies.
Takeaways
RPP enforces least privilege using OIDC token validation to assume a central RPPActionsRole before down-scoping to localized team IAM roles mapped to explicit repository paths.
Workspace validation verifies that the execution path strictly matches mapped S3 state backend blocks and KMS keys, instantly failing the build on discrepancies.
Centralized composite GitHub Actions allow Pinterest to deploy instant systemic patches and enforce unified auditing across hundreds of workspaces without editing individual repositories.
Source and freshness
- Source
- medium.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.