docs/src/data/experiments/oci.mdx
Experimental support for downloading modules from OCI Distribution registries using oci:// sources.
oci - What it doesOpenTofu 1.10 can download modules from an OCI Distribution registry using an
oci:// source. This experiment gates Terragrunt's native support for the
same sources, so a single source string works the same way in both tofu and
Terragrunt against registries such as Amazon ECR, GitHub Container Registry,
Azure Container Registry, Google Artifact Registry, and self-hosted or
air-gapped registries.
With the experiment enabled, Terragrunt accepts oci:// source URLs in
terraform { source = "..." } blocks. For example:
terraform {
source = "oci://ghcr.io/acme/terraform-modules/vpc?tag=1.0.0"
}
Specify either tag or digest; omitting both selects the latest tag.
//subdir selectors are supported. Authentication covers static credentials
via the interim TG_TMP_OCI_* environment variables and read-only ambient
discovery of Docker and containers auth files, following the containers-auth
search order OpenTofu uses. Static credentials can be limited to one registry with
TG_TMP_OCI_REGISTRY; other registries then fall back to ambient discovery.
Without it, the static credentials may be offered to any registry the process
contacts, so scope them or avoid setting them when talking to unrelated or
untrusted registries. Credential helpers
configured in the Docker config
(credHelpers
and
credsStore,
such as
ecr-login)
are invoked when configured and selected as the credential source, so ECR and
other helper-backed registries work without a baked-in login. When the
experiment is disabled, oci:// sources remain unsupported.
oci - How to enable it# Via CLI flag
terragrunt --experiment oci run -- plan
# Via environment variable
export TG_EXPERIMENT=oci
terragrunt run -- plan
oci - How to provide feedbackTrack and discuss this experiment in gruntwork-io/terragrunt#4555. When reporting issues or providing feedback, please include:
ecr-login).oci:// source string, and whether you pin by tag or digest.oci - Criteria for stabilizationTo transition the oci feature to a stable release, the following must be addressed, at a minimum:
oci:// sources, selecting the application/vnd.opentofu.modulepkg artifact and its archive/zip layer, with blob digest verification.docker-credential-*, ecr-login) so ECR and other helper-backed registries work through the configured helper.tofu and Terragrunt.