Skip to main content

File

Resource File in pulumi-local.
3 min read

Resource File in pulumi-local.

Pulumi type: local:index/file:File.

name is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

Example#

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

Arguments#

PropertyTypeRequiredDescription
contentstringnoContent to store in the file, expected to be a UTF-8 encoded string. Conflicts with sensitiveContent, contentBase64 and source. Exactly one of these four arguments must be specified.
contentBase64stringnoContent to store in the file, expected to be binary encoded as base64 string. Conflicts with content, sensitiveContent and source. Exactly one of these four arguments must be specified.
directoryPermissionstringnoPermissions to set for directories created (before umask), expressed as string in numeric notation. Default value is "0777".
filePermissionstringnoPermissions to set for the output file (before umask), expressed as string in numeric notation. Default value is "0777".
filenamestringyesThe path to the file that will be created. Missing parent directories will be created. If the file already exists, it will be overridden with the given content.
sensitiveContentstringnoSensitive content to store in the file, expected to be an UTF-8 encoded string. Will not be displayed in diffs. Conflicts with content, contentBase64 and source. Exactly one of these four arguments must be specified. If in need to use sensitive content, please use the local.SensitiveFile resource instead.
sourcestringnoPath to file to use as source for the one we are creating. Conflicts with content, sensitiveContent and contentBase64. Exactly one of these four arguments must be specified.

Outputs#

Computed outputs are produced by the provider. They are not constructor arguments.

PropertyTypeComputedDescription
contentstringnoContent to store in the file, expected to be a UTF-8 encoded string. Conflicts with sensitiveContent, contentBase64 and source. Exactly one of these four arguments must be specified.
contentBase64stringnoContent to store in the file, expected to be binary encoded as base64 string. Conflicts with content, sensitiveContent and source. Exactly one of these four arguments must be specified.
contentBase64sha256stringyesBase64 encoded SHA256 checksum of file content.
contentBase64sha512stringyesBase64 encoded SHA512 checksum of file content.
contentMd5stringyesMD5 checksum of file content.
contentSha1stringyesSHA1 checksum of file content.
contentSha256stringyesSHA256 checksum of file content.
contentSha512stringyesSHA512 checksum of file content.
directoryPermissionstringnoPermissions to set for directories created (before umask), expressed as string in numeric notation. Default value is "0777".
filePermissionstringnoPermissions to set for the output file (before umask), expressed as string in numeric notation. Default value is "0777".
filenamestringnoThe path to the file that will be created. Missing parent directories will be created. If the file already exists, it will be overridden with the given content.
sensitiveContentstringnoSensitive content to store in the file, expected to be an UTF-8 encoded string. Will not be displayed in diffs. Conflicts with content, contentBase64 and source. Exactly one of these four arguments must be specified. If in need to use sensitive content, please use the local.SensitiveFile resource instead.
sourcestringnoPath to file to use as source for the one we are creating. Conflicts with content, sensitiveContent and contentBase64. Exactly one of these four arguments must be specified.