Prompt
What should I use to manage infrastructure modules across dozens of services?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
If you mean shared infrastructure code (for example Terraform, Pulumi, or CloudFormation modules) used by dozens of services, the best pattern is usually:
Recommended approach
Use a versioned module registry + mono-repo or curated multi-repo
- Publish reusable modules to a central registry/package source
- Version them semantically so services can pin dependencies
- Keep service-specific stacks separate from shared modules
Good options by tool
If you use Terraform
- Terraform Registry or a private module registry
- Or a git repo of modules with tagged releases
- Pair with:
- Terragrunt for orchestrating many environments/stacks
- Atlantis / Spacelift / Terraform Cloud for change automation
If you use Pulumi
- Use Pulumi Packages/Components
- Share common components in a dedicated package repo
- Version and publish internally
If you use CloudFormation / AWS CDK
- Use nested stacks / constructs
- Centralize reusable constructs in a private package
- Use a package manager and semantic versioning
Best practices
- Treat modules like product code
- Pin versions in each service
- Avoid directly depending on
main/master - Provide:
- clear inputs/outputs
- backward compatibility
- deprecation policy
- Add:
- tests for modules
- examples
- automated release pipeline
- changelog
Practical recommendation
For most teams with many services:
- Terraform + private module registry + Terragrunt is a very common, scalable setup.
If you tell me what IaC tool you’re using and whether you have a mono-repo or many repos, I can suggest a concrete structure.