Terraform Version
Use Cases
This would match the emerging consensus in the industry that upgrading to very recent releases poses an increasing risk of supply-chain attacks. Having a cooldown / minimum age period would give the community time to detect such attacks. Terraform is a tempting target since it is typically run with high-privilege credentials.
Attempted Solutions
n/a
Proposal
Add an option (via the usual CLI / config file / environmental variables) to set a minimum age to consider when evaluating module versions (e.g. “Do not install anything released in the last 7 days”). When running terraform init --upgrade the solver can ignore versions which were published after the cutoff date.
To allow high-priority updates or safe sources, it would be useful to implement an exclude mechanism either by disabling this feature for a single provider or module such as a trusted internal publisher or to define the logic such that it only applies when attempting to upgrade the pinned versions but never prevents a newer version when explicitly pinned in the provider / module version (e.g. version = "1.2.3" does not have the check applied but version = "~> 1.2" would treat yesterday's 1.2.3 as if it was never published and use last week's 1.2.2).
References
Terraform Version
Use Cases
This would match the emerging consensus in the industry that upgrading to very recent releases poses an increasing risk of supply-chain attacks. Having a cooldown / minimum age period would give the community time to detect such attacks. Terraform is a tempting target since it is typically run with high-privilege credentials.
Attempted Solutions
n/a
Proposal
Add an option (via the usual CLI / config file / environmental variables) to set a minimum age to consider when evaluating module versions (e.g. “Do not install anything released in the last 7 days”). When running
terraform init --upgradethe solver can ignore versions which were published after the cutoff date.To allow high-priority updates or safe sources, it would be useful to implement an exclude mechanism either by disabling this feature for a single provider or module such as a trusted internal publisher or to define the logic such that it only applies when attempting to upgrade the pinned versions but never prevents a newer version when explicitly pinned in the provider / module version (e.g.
version = "1.2.3"does not have the check applied butversion = "~> 1.2"would treat yesterday's 1.2.3 as if it was never published and use last week's 1.2.2).References