Pin a Module to a Specific Version and Resolve Its Source
A 4-step recipe with Terraform. We can help you get access.
Recipe · 4 steps
Pin a Module to a Specific Version and Resolve Its Source
with Terraform
Verify a specific module version exists and resolve its download source.
- Read the module's current latest version, giving the caller a baseline to see how far behind the intended pin sits.
- List every version the module has published so the intended pin can be confirmed to exist before anything depends on it.
- Read the pinned version's own metadata, confirming its publish date and source rather than trusting the latest version's.
- Resolve the pinned version's download redirect to capture the exact source archive URL from the X-Terraform-Get header that Terraform will fetch.
What you'll need to have ready
- namespace: The module namespace or publisher (e.g. "terraform-aws-modules").
- name: The module name (e.g. "vpc").
- provider: The provider the module targets (e.g. "aws").
- pinnedVersion: The exact version to pin to (e.g. "5.1.2").
For your developer
Arazzo workflow terraform:pin-module-version, 4 operations: GetModuleLatestVersion → ListModuleVersions → GetModuleVersion → DownloadModuleVersion. Specs on APIs.io.