Viewing docs for local 2.7.0
published on Monday, Feb 16, 2026 by hashicorp
published on Monday, Feb 16, 2026 by hashicorp
Viewing docs for local 2.7.0
published on Monday, Feb 16, 2026 by hashicorp
published on Monday, Feb 16, 2026 by hashicorp
Reads a file from the local filesystem.
Using getFile
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFile(args: GetFileArgs, opts?: InvokeOptions): Promise<GetFileResult>
function getFileOutput(args: GetFileOutputArgs, opts?: InvokeOptions): Output<GetFileResult>def get_file(filename: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFileResult
def get_file_output(filename: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFileResult]func LookupFile(ctx *Context, args *LookupFileArgs, opts ...InvokeOption) (*LookupFileResult, error)
func LookupFileOutput(ctx *Context, args *LookupFileOutputArgs, opts ...InvokeOption) LookupFileResultOutput> Note: This function is named LookupFile in the Go SDK.
public static class GetFile
{
public static Task<GetFileResult> InvokeAsync(GetFileArgs args, InvokeOptions? opts = null)
public static Output<GetFileResult> Invoke(GetFileInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFileResult> getFile(GetFileArgs args, InvokeOptions options)
public static Output<GetFileResult> getFile(GetFileArgs args, InvokeOptions options)
fn::invoke:
function: local:index/getFile:getFile
arguments:
# arguments dictionaryThe following arguments are supported:
- Filename string
- Path to the file that will be read. The data source will return an error if the file does not exist.
- Filename string
- Path to the file that will be read. The data source will return an error if the file does not exist.
- filename String
- Path to the file that will be read. The data source will return an error if the file does not exist.
- filename string
- Path to the file that will be read. The data source will return an error if the file does not exist.
- filename str
- Path to the file that will be read. The data source will return an error if the file does not exist.
- filename String
- Path to the file that will be read. The data source will return an error if the file does not exist.
getFile Result
The following output properties are available:
- Content string
- Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in
contentreplaced with the Unicode replacement character. - Content
Base64 string - Base64 encoded version of the file content (use this when dealing with binary data).
- Content
Base64sha256 string - Base64 encoded SHA256 checksum of file content.
- Content
Base64sha512 string - Base64 encoded SHA512 checksum of file content.
- Content
Md5 string - MD5 checksum of file content.
- Content
Sha1 string - SHA1 checksum of file content.
- Content
Sha256 string - SHA256 checksum of file content.
- Content
Sha512 string - SHA512 checksum of file content.
- Filename string
- Path to the file that will be read. The data source will return an error if the file does not exist.
- Id string
- The hexadecimal encoding of the SHA1 checksum of the file content.
- Content string
- Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in
contentreplaced with the Unicode replacement character. - Content
Base64 string - Base64 encoded version of the file content (use this when dealing with binary data).
- Content
Base64sha256 string - Base64 encoded SHA256 checksum of file content.
- Content
Base64sha512 string - Base64 encoded SHA512 checksum of file content.
- Content
Md5 string - MD5 checksum of file content.
- Content
Sha1 string - SHA1 checksum of file content.
- Content
Sha256 string - SHA256 checksum of file content.
- Content
Sha512 string - SHA512 checksum of file content.
- Filename string
- Path to the file that will be read. The data source will return an error if the file does not exist.
- Id string
- The hexadecimal encoding of the SHA1 checksum of the file content.
- content String
- Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in
contentreplaced with the Unicode replacement character. - content
Base64 String - Base64 encoded version of the file content (use this when dealing with binary data).
- content
Base64sha256 String - Base64 encoded SHA256 checksum of file content.
- content
Base64sha512 String - Base64 encoded SHA512 checksum of file content.
- content
Md5 String - MD5 checksum of file content.
- content
Sha1 String - SHA1 checksum of file content.
- content
Sha256 String - SHA256 checksum of file content.
- content
Sha512 String - SHA512 checksum of file content.
- filename String
- Path to the file that will be read. The data source will return an error if the file does not exist.
- id String
- The hexadecimal encoding of the SHA1 checksum of the file content.
- content string
- Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in
contentreplaced with the Unicode replacement character. - content
Base64 string - Base64 encoded version of the file content (use this when dealing with binary data).
- content
Base64sha256 string - Base64 encoded SHA256 checksum of file content.
- content
Base64sha512 string - Base64 encoded SHA512 checksum of file content.
- content
Md5 string - MD5 checksum of file content.
- content
Sha1 string - SHA1 checksum of file content.
- content
Sha256 string - SHA256 checksum of file content.
- content
Sha512 string - SHA512 checksum of file content.
- filename string
- Path to the file that will be read. The data source will return an error if the file does not exist.
- id string
- The hexadecimal encoding of the SHA1 checksum of the file content.
- content str
- Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in
contentreplaced with the Unicode replacement character. - content_
base64 str - Base64 encoded version of the file content (use this when dealing with binary data).
- content_
base64sha256 str - Base64 encoded SHA256 checksum of file content.
- content_
base64sha512 str - Base64 encoded SHA512 checksum of file content.
- content_
md5 str - MD5 checksum of file content.
- content_
sha1 str - SHA1 checksum of file content.
- content_
sha256 str - SHA256 checksum of file content.
- content_
sha512 str - SHA512 checksum of file content.
- filename str
- Path to the file that will be read. The data source will return an error if the file does not exist.
- id str
- The hexadecimal encoding of the SHA1 checksum of the file content.
- content String
- Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in
contentreplaced with the Unicode replacement character. - content
Base64 String - Base64 encoded version of the file content (use this when dealing with binary data).
- content
Base64sha256 String - Base64 encoded SHA256 checksum of file content.
- content
Base64sha512 String - Base64 encoded SHA512 checksum of file content.
- content
Md5 String - MD5 checksum of file content.
- content
Sha1 String - SHA1 checksum of file content.
- content
Sha256 String - SHA256 checksum of file content.
- content
Sha512 String - SHA512 checksum of file content.
- filename String
- Path to the file that will be read. The data source will return an error if the file does not exist.
- id String
- The hexadecimal encoding of the SHA1 checksum of the file content.
Package Details
- Repository
- local hashicorp/terraform-provider-local
- License
- Notes
- This Pulumi package is based on the
localTerraform Provider.
Viewing docs for local 2.7.0
published on Monday, Feb 16, 2026 by hashicorp
published on Monday, Feb 16, 2026 by hashicorp
