Terraform Repositories
Terraform is an infrastructure-as-code (IaC) tool that builds, changes, and versions Cloud and On-Prem resources. For more information, see Terraform documentation.
Nexus Repository 3.94 and later also supports modules from the Coder registry and modules and providers from the OpenTofu registry. This support is available in Nexus Repository Cloud and self-hosted Community Edition and Pro deployments. Community Edition uses an H2 database, while Pro uses PostgreSQL. You can publish and retrieve Terraform modules using the Terraform CLI.
Getting Started
Explore the following topics to know how to configure and use Terraform with Nexus.
Nexus for Terraform
Asset Classification
Nexus Repository classifies Terraform content into two types. This is done to apply right validation, indexing and processing rules.
Module: Versioned source archives retrieved via module registry endpoints such as
versions,download, andarchive.Providers: Platform-specific binaries, served with checksums and signatures via provider registry endpoints.
Nexus repository classifies Terraform assets using path patterns.
Paths containing
/modules/are classified as ModulePaths containing
/providers/are classified as Provider
Path-based detection is complemented by extension and location checks. The .zip file under a /modules/ directory is classified as Module and the .zip file under a /providers/ directory is classified as Provider.
If an item cannot be classified confidently, the system surfaces a warning or an error to protect repository integrity.
Capabilities
New in 3.94 Proxy Terraform providers and modules from registry.opentofu.org
New in 3.94 Compatible with OpenTofu CLI
New in 3.94 Proxy Terraform modules from registry.coder.com
Proxy Terraform providers and modules from registry.terraform.io
Cache provider binaries (.zip), checksums, signatures and module source archives
Rewrite upstream metadata so download URLs point to Nexus repository
Support authentication using URL tokens
Compatible with Terraform CLI v0.13+ and all 1.x releases
New in 3.89
Publish Terraform modules as versioned source archives (.tar.gz, .tgz, .txz, .xz, .tar.xz, tar.tbz2, tar.bz2) and platform-specific binaries (.zip)
Publish Terraform providers as .zip
Automatically generate provider metadata, checksum files, and GPG signatures
Support multiple versions and incremental platform uploads for providers
Control access using repository-level permissions
Manage repositories and content using the REST API
New in 3.90
Aggregate multiple Terraform repositories (hosted/proxy) into one endpoint
Intelligent caching with configurable TTL for module and provider versions
Multiple conflict resolution strategies when versions exist in multiple members
Request deduplication to prevent duplicate queries
Member health tracking and automatic unhealthy member handling
Comprehensive metrics for monitoring cache performance and member health