opentofu/opentofu · error
the "archive" argument is not allowed for OCI sources, becau
Error message
the "archive" argument is not allowed for OCI sources, because the archive format is detected automatically from the image manifest
What it means
Error "the "archive" argument is not allowed for OCI sources, because the archive format is detected automatically from the image manifest" thrown in opentofu/opentofu.
Source
Thrown at internal/getmodules/oci_getter.go:149
}
return nil
}
// GetFile implements getter.Getter.
func (g *ociDistributionGetter) GetFile(string, *url.URL) error {
// With how OpenTofu uses go-getter we can only get in here if
// the source address string includes go-getter's special
// reserved "archive" query string argument, which causes
// go-getter itself to arrange for extracting the downloaded
// archive.
//
// This getter includes its own archive handling that reacts
// directly to the mediaType declared in the OCI image
// manifest, so the "archive" query string argument does
// not need to be supported here. (It's primarily intended
// for general-purpose arbitrary file fetching getters like
// the HTTP getter.)
return fmt.Errorf("the \"archive\" argument is not allowed for OCI sources, because the archive format is detected automatically from the image manifest")
}
// ClientMode implements getter.Getter.
func (g *ociDistributionGetter) ClientMode(*url.URL) (getter.ClientMode, error) {
// This getter only supports "dir" mode, meaning that
// it populates a directory based on the content of the
// retrieved archive rather than _just_ retrieving the
// archive. In practice this isn't actually used in
// OpenTofu, because OpenTofu _always_ asks for
// go-getter to populate a directory, but we're required
// to implement this method to satisfy the Getter interface.
return getter.ClientModeDir, nil
}
// SetClient implements getter.Getter.
func (g *ociDistributionGetter) SetClient(client *getter.Client) {
g.client = client
}View on GitHub (pinned to 3561785c48)
When it happens
Trigger: Thrown at internal/getmodules/oci_getter.go:149 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of opentofu/opentofu@3561785c48 (2026-08-15).
Data as JSON: /api/errors/4f1fbd2c4841a203.
Report an issue: GitHub.