Summary
Both environments define local.services maps in their respective locals.tf files with CPU and memory allocations per service. Shared services (e.g., prometheus, coredns) have identical limits in both places.
Current State
environments/iapetus/locals.tf — defines resource limits for ~10 services
environments/cluster01/locals.tf — defines resource limits for ~12 services
- Overlapping services have identical values (e.g., prometheus: 2 CPU / 2GB, coredns: 1 CPU / 128MB)
Considerations
Some divergence is intentional — iapetus prometheus aggregates federation data and may need different resources than a cluster01 local prometheus. A centralised approach should allow per-environment overrides.
Options
- Shared locals file — Extract common service definitions to a symlinked file, with environment-specific overrides via
merge()
- Defaults in module variables — Set sensible defaults for CPU/memory in each module's
variables.tf so environments only specify overrides
- Leave as-is — The duplication is small and allows full per-environment control
🤖 Generated with Claude Code
Summary
Both environments define
local.servicesmaps in their respectivelocals.tffiles with CPU and memory allocations per service. Shared services (e.g., prometheus, coredns) have identical limits in both places.Current State
environments/iapetus/locals.tf— defines resource limits for ~10 servicesenvironments/cluster01/locals.tf— defines resource limits for ~12 servicesConsiderations
Some divergence is intentional — iapetus prometheus aggregates federation data and may need different resources than a cluster01 local prometheus. A centralised approach should allow per-environment overrides.
Options
merge()variables.tfso environments only specify overrides🤖 Generated with Claude Code