pinning
Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
In more detail
Pinned inputs make installs reproducible and stop an upstream release from silently changing what you run. The cost is that you must raise the pin yourself, after review, to receive fixes.
Examples
ansible-core==2.21.4 in requirements.txt, and version: 2.0.0 for a collection in requirements.yml.- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020Unpinned versions make a build unrepeatable over time even if it is repeatable across machines, and they fail on the day you most need a rebuild. Declaring exact versions is half of factor II of the twelve-factor app.FROM python:3.12-alpine@sha256:<digest>The Maven Wrapper pins the Maven version; postgres:16 pins the test database image.requests==2.32.3 in requirements.txt pins an exact version.requests==2.32.3In Terraform you pin module versions in the module block and rely on the lock file to pin exact provider versions. Pinning exactly is safe but ages badly, so most teams combine a pessimistic constraint with a committed lock file and upgrade deliberately.In this course: A test that starts postgres:16.4 behaves the same next month; one that starts postgres:latest may not. Update pins on purpose, with the tests as your safety net.Related terms
- requirements.txt — A text file listing the Python packages, and usually their exact versions, that pip should install for a project.
- requirements.yml — A YAML file listing the collections and roles a project depends on, with versions, for ansible-galaxy to install.
- semantic versioning — A version numbering scheme of three numbers, major.minor.patch, raised for breaking changes, new features and fixes respectively.
- dependency — Anything a program needs in order to work, such as a library, a tool or another service.
- object ID — The hash that names a Git object, such as a commit, and that you type to refer to it.
- runner image — The prepared operating system disk a GitHub-hosted runner boots from, with Git, Docker, language runtimes and build tools already installed.
- digest — A SHA-256 hash of an image's manifest that identifies its exact content and can never be moved to other bytes.
- Dependabot — GitHub's bot that opens pull requests to update dependencies, including actions pinned in workflow files.
- dependency declaration — Listing every dependency an app needs, with exact versions, in a manifest, and isolating the app so nothing else leaks in at run time.
- latest tag — The tag Docker uses when you do not name one; despite the name, it is not guaranteed to be the newest image.
- reproducible build — A build that produces the same result every time from the same inputs.
- patching — Updating software to a version that fixes known bugs or vulnerabilities.
- build wrapper — A small script committed to a project that downloads and runs the exact build tool version the project expects.
- requirements file — A text file, usually requirements.txt, listing the packages a project needs, one per line, often pinned to exact versions.
- version range — A dependency specification that accepts any version within bounds, such as urllib3>=2.0, resolved at install time to the newest match.
- lockfile — A file that records the exact version of every dependency, including transitive ones, so every install gets the same set.
- version constraint — A string such as "~> 3.6" or ">= 1.6.0" that says which versions of Terraform, a provider or a module are acceptable.
- dependency lock file — The .terraform.lock.hcl file that terraform init writes to record the exact provider versions chosen and their checksums.
- Terraform module — A directory of Terraform files with inputs (variables) and outputs, which other configurations can call to reuse the same infrastructure design.
- image — A read-only package containing a program and everything it needs to run, used as the template for containers.
- Testcontainers — A family of libraries that start real dependencies such as databases in throwaway containers for the length of a test.
Taught in
- Installing Ansible — Ansible Configuration Management at Scale
- Using Collections — Ansible Configuration Management at Scale
- Ansible Galaxy — Ansible Configuration Management at Scale
- Runners: Where Code Executes — Continuous Integration & Continuous Delivery Pipelines
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Securing Pipelines: Secrets Management — Continuous Integration & Continuous Delivery Pipelines
- Building and Pushing Container Images — Continuous Integration & Continuous Delivery Pipelines
- Container Images The Exam Way — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Workload Identity Federation: Eliminating Static Keys — Cloud Security & DevSecOps Engineering
- Zero-Trust Network Access & IdP Federation — Cloud Security & DevSecOps Engineering
- Software Composition Analysis with Trivy — Cloud Security & DevSecOps Engineering
- Supply Chain Security: SBOMs & Cosign Signing — Cloud Security & DevSecOps Engineering
- Kubernetes Pod Security Standards: Baseline & Restricted — Cloud Security & DevSecOps Engineering
- Enforcing OPA Guardrails on Terraform Plan Payloads — Cloud Security & DevSecOps Engineering
- Codebase And Dependencies — DevOps & Site Reliability Engineering
- Pull And Inspect A Third Party Image — Docker Architecture & Production Containers
- FROM, WORKDIR, COPY And ADD — Docker Architecture & Production Containers
- Tags, Digests And Reproducible Image References — Docker Architecture & Production Containers
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- The Toolchain: Gradle — Modern Java: Virtual Threads & High-Throughput Services
- Packaging Into A Container — Modern Java: Virtual Threads & High-Throughput Services
- Database Integration With Testcontainers — Modern Java: Virtual Threads & High-Throughput Services
- Platform And Virtual Threads, Runnable And Callable — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Bootstrap A Local Cluster And Check Your Context — Kubernetes: Production-Grade Container Orchestration
- Pod Security Admission And Pod Security Standards — Kubernetes: Production-Grade Container Orchestration
- What A Program Really Is — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- Colours, Custom And Random — Hands-on Python: Complete Video Course & Book
- pip, requirements, and installing packages — Hands-on Python: Complete Video Course & Book
- Dependency Risk And Typosquatting — Application Security & Threat Modeling for Engineers
- Lockfiles And Reproducible Builds — Application Security & Threat Modeling for Engineers
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Providers And The required_providers Block — Infrastructure as Code with Terraform
- The Terraform Registry And Public Modules — Infrastructure as Code with Terraform
- Versioning And Pinning Modules — Infrastructure as Code with Terraform
- Integration Testing With Containers — Automated Testing, TDD & Quality Engineering
- One Hour, No Weights Published — HashiCorp Terraform Associate (004) Exam Prep
- Versions, The Lock File And Provider Aliases — HashiCorp Terraform Associate (004) Exam Prep
- Where Modules Come From — HashiCorp Terraform Associate (004) Exam Prep
- Module Versions: Pin, Upgrade, Re-Initialise — HashiCorp Terraform Associate (004) Exam Prep
- Collaboration And Governance: Teams, Policies, Registry And Health — HashiCorp Terraform Associate (004) Exam Prep
- VCS, CLI And API Workflows: Speculative Plans And Run Triggers — HashiCorp Terraform Associate (004) Exam Prep
- Trap Sprint: Twelve Answers That Are Almost True — HashiCorp Terraform Associate (004) Exam Prep
- The Full Mock: Sixty Minutes, Eight Areas, One Plan For The Last Week — HashiCorp Terraform Associate (004) Exam Prep
- requirements.yml: Installing Roles And Collections — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- pip: requirements file format
- Installing collections with a requirements file
- GitHub Docs: Secure use reference
- GitHub Docs: Keeping your actions up to date with Dependabot
- Dockerfile best practices: pin base image versions
- docker image pull reference (pull by digest)
- Reproducible Builds: Definition
- pip docs: repeatable installs
- Dependency lock file
- Module block: version
- Docker docs: pin base image versions
Certification courses
- CKAD course and practice exam: Certified Kubernetes Application Developer
- 1Z0-830 course and practice exam: Oracle Java SE 21 Developer Professional
- Terraform Associate course and practice exam: HashiCorp Terraform Associate (004)
- RHCE course and practice exam: Red Hat Certified Engineer in Ansible (EX294)