#Build-only Overrides
Some settings should differ between building a module and running clones of it. The build phase often needs:
- Internet access (to install packages from upstream repos).
- More CPU / RAM (to compile or process faster).
But the resulting clones probably shouldn't:
- Have internet.
- Reserve those large resources permanently.
Use buildOverrides to scope settings to the build only:
network:
vpcs:
- name: vpc
internet: false # clones get NO internet
subnets:
- name: lan
vpc: vpc
cidr: '10.0.0.0/24'
buildOverrides:
vpcs:
- name: vpc
internet: true # build phase only — flip on to install packages
vms:
- name: builder
resources:
cpu: 8 # build with 8 CPUs
memory: '16Gi' # and 16Gi memory
vms:
- name: builder
source: { url: '...' }
resources:
cpu: 2 # clones get 2 CPUs
memory: '4Gi' # and 4Gi memory
# ...
The base values in network and vms[].resources are what gets recorded into the module and inherited by clones. buildOverrides only affects this build's own VMs.