This article details Pinterest's Resource Provisioner Pipeline (RPP), a proprietary Terraform execution engine designed to manage infrastructure as code securely and at scale within a distributed, multi-repository AWS environment. RPP enforces security guardrails using dual controls, centralized GitHub Actions, and a secure role-chaining mechanism to manage critical infrastructure changes and ensure compliance. The architecture provides a blueprint for organizations aiming to add strict guardrails to their GitHub workflow-driven Terraform setups.
Read original on Pinterest EngineeringManaging Infrastructure as Code (IaC) across a large organization with a distributed, multi-repository architecture presents significant security and logistical hurdles. Pinterest developed the Resource Provisioner Pipeline (RPP) to address these challenges, particularly around safely managing both critical and non-critical infrastructure changes in their extensive AWS environment. RPP acts as a vital bridge to securely support Pinterest's legacy multi-repo structure while an initiative to consolidate into a monorepo is underway.
What is RPP?
RPP is Pinterest's specialized, proprietary Terraform execution engine, providing a secure, standardized CI/CD workflow for deploying and managing foundational AWS infrastructure across hundreds of Terraform workspaces and tens of thousands of resources. It manages security policies, networking infrastructure, and storage/compute provisioning.
The role-chaining process in RPP is critical for enforcing least privilege. It involves several steps:
With the localized `team_iam_role` assumed, the deployment proceeds with fine-grained control, including linting, plan generation published as a PR comment, and deliberate application requiring an explicit PR comment. Beyond access management, the PR-driven workflow enables advanced reliability and security practices like automated vulnerability scanning (Semgrep, Helix/AI) and pre-deployment local testing using LocalStack to mock AWS behavior.
Consolidating deployment logic into centralized composite execution steps provides Pinterest with significant operational advantages: