You need to share a module across your entire organization. Which registry type should you use?
Trap 1: The public Terraform Registry.
The public Terraform Registry publishes modules openly to all users, exposing internal code and offering no organisation-scoped access control. A private registry is required for organisation-wide sharing. Public modules suit consuming community or vendor modules.
Trap 2: A shared network drive.
A network drive stores files but provides no Terraform registry protocol, versioning or module source addressing, so terraform init cannot resolve modules from it. Registries serve that purpose. Shared drives suit ad-hoc file exchange, not module distribution.
Trap 3: An S3 bucket with public read access.
A public S3 bucket serves objects over HTTP; Terraform cannot resolve it as a registry module source, so versioning and module addressing break. It is tempting because S3 is the standard remote backend for state and can host module archives, which would suit private distribution only if fronted by a proper registry or module source URL.
- A
The public Terraform Registry.
Why it fails: The public Terraform Registry publishes modules openly to all users, exposing internal code and offering no organisation-scoped access control. A private registry is required for organisation-wide sharing. Public modules suit consuming community or vendor modules.
- B
A shared network drive.
Why it fails: A network drive stores files but provides no Terraform registry protocol, versioning or module source addressing, so terraform init cannot resolve modules from it. Registries serve that purpose. Shared drives suit ad-hoc file exchange, not module distribution.
- C
An S3 bucket with public read access.
Why it fails: A public S3 bucket serves objects over HTTP; Terraform cannot resolve it as a registry module source, so versioning and module addressing break. It is tempting because S3 is the standard remote backend for state and can host module archives, which would suit private distribution only if fronted by a proper registry or module source URL.
- D
A private module registry in Terraform Cloud or Enterprise.
A private module registry in Terraform Cloud or Enterprise publishes modules to a single organisation-wide namespace, so every team consumes the same versioned source. This satisfies the requirement to share one module across the entire organisation rather than per-workspace or public consumption.