{"record":{"id":"4f1fbd2c4841a203","repo":"opentofu/opentofu","slug":"the-archive-argument-is-not-allowed-for-oci-sour","errorCode":null,"errorMessage":"the \"archive\" argument is not allowed for OCI sources, because the archive format is detected automatically from the image manifest","messagePattern":"the \"archive\" argument is not allowed for OCI sources, because the archive format is detected automatically from the image manifest","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/getmodules/oci_getter.go","lineNumber":149,"sourceCode":"\t}\n\treturn nil\n}\n\n// GetFile implements getter.Getter.\nfunc (g *ociDistributionGetter) GetFile(string, *url.URL) error {\n\t// With how OpenTofu uses go-getter we can only get in here if\n\t// the source address string includes go-getter's special\n\t// reserved \"archive\" query string argument, which causes\n\t// go-getter itself to arrange for extracting the downloaded\n\t// archive.\n\t//\n\t// This getter includes its own archive handling that reacts\n\t// directly to the mediaType declared in the OCI image\n\t// manifest, so the \"archive\" query string argument does\n\t// not need to be supported here. (It's primarily intended\n\t// for general-purpose arbitrary file fetching getters like\n\t// the HTTP getter.)\n\treturn fmt.Errorf(\"the \\\"archive\\\" argument is not allowed for OCI sources, because the archive format is detected automatically from the image manifest\")\n}\n\n// ClientMode implements getter.Getter.\nfunc (g *ociDistributionGetter) ClientMode(*url.URL) (getter.ClientMode, error) {\n\t// This getter only supports \"dir\" mode, meaning that\n\t// it populates a directory based on the content of the\n\t// retrieved archive rather than _just_ retrieving the\n\t// archive. In practice this isn't actually used in\n\t// OpenTofu, because OpenTofu _always_ asks for\n\t// go-getter to populate a directory, but we're required\n\t// to implement this method to satisfy the Getter interface.\n\treturn getter.ClientModeDir, nil\n}\n\n// SetClient implements getter.Getter.\nfunc (g *ociDistributionGetter) SetClient(client *getter.Client) {\n\tg.client = client\n}","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/opentofu/opentofu/blob/3561785c48c1ce615e7c50261bd351f26053efa2/internal/getmodules/oci_getter.go#L131-L167","documentation":"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.","triggerScenarios":"Thrown at internal/getmodules/oci_getter.go:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3561785c48c1ce615e7c50261bd351f26053efa2","analyzedAt":"2026-08-15T23:27:16.226Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}