Documentation ¶
Overview ¶
A Pulumi package for creating and managing Local cloud resources.
Index ¶
- type File
- type FileArgs
- type FileArray
- type FileArrayInput
- type FileArrayOutput
- type FileInput
- type FileMap
- type FileMapInput
- type FileMapOutput
- type FileOutput
- func (o FileOutput) Content() pulumi.StringPtrOutput
- func (o FileOutput) ContentBase64() pulumi.StringPtrOutput
- func (o FileOutput) ContentBase64sha256() pulumi.StringOutput
- func (o FileOutput) ContentBase64sha512() pulumi.StringOutput
- func (o FileOutput) ContentMd5() pulumi.StringOutput
- func (o FileOutput) ContentSha1() pulumi.StringOutput
- func (o FileOutput) ContentSha256() pulumi.StringOutput
- func (o FileOutput) ContentSha512() pulumi.StringOutput
- func (o FileOutput) DirectoryPermission() pulumi.StringOutput
- func (FileOutput) ElementType() reflect.Type
- func (o FileOutput) FilePermission() pulumi.StringOutput
- func (o FileOutput) Filename() pulumi.StringOutput
- func (o FileOutput) SensitiveContent() pulumi.StringPtrOutputdeprecated
- func (o FileOutput) Source() pulumi.StringPtrOutput
- func (o FileOutput) ToFileOutput() FileOutput
- func (o FileOutput) ToFileOutputWithContext(ctx context.Context) FileOutput
- type FileState
- type LookupFileArgs
- type LookupFileOutputArgs
- type LookupFileResult
- type LookupFileResultOutput
- func (o LookupFileResultOutput) Content() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentBase64() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentBase64sha256() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentBase64sha512() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentMd5() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentSha1() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentSha256() pulumi.StringOutput
- func (o LookupFileResultOutput) ContentSha512() pulumi.StringOutput
- func (LookupFileResultOutput) ElementType() reflect.Type
- func (o LookupFileResultOutput) Filename() pulumi.StringOutput
- func (o LookupFileResultOutput) Id() pulumi.StringOutput
- func (o LookupFileResultOutput) ToLookupFileResultOutput() LookupFileResultOutput
- func (o LookupFileResultOutput) ToLookupFileResultOutputWithContext(ctx context.Context) LookupFileResultOutput
- type LookupSensitiveFileArgs
- type LookupSensitiveFileOutputArgs
- type LookupSensitiveFileResult
- type LookupSensitiveFileResultOutput
- func (o LookupSensitiveFileResultOutput) Content() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentBase64() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentBase64sha256() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentBase64sha512() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentMd5() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentSha1() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentSha256() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ContentSha512() pulumi.StringOutput
- func (LookupSensitiveFileResultOutput) ElementType() reflect.Type
- func (o LookupSensitiveFileResultOutput) Filename() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) Id() pulumi.StringOutput
- func (o LookupSensitiveFileResultOutput) ToLookupSensitiveFileResultOutput() LookupSensitiveFileResultOutput
- func (o LookupSensitiveFileResultOutput) ToLookupSensitiveFileResultOutputWithContext(ctx context.Context) LookupSensitiveFileResultOutput
- type Provider
- type ProviderArgs
- type ProviderInput
- type ProviderOutput
- type SensitiveFile
- type SensitiveFileArgs
- type SensitiveFileArray
- type SensitiveFileArrayInput
- type SensitiveFileArrayOutput
- func (SensitiveFileArrayOutput) ElementType() reflect.Type
- func (o SensitiveFileArrayOutput) Index(i pulumi.IntInput) SensitiveFileOutput
- func (o SensitiveFileArrayOutput) ToSensitiveFileArrayOutput() SensitiveFileArrayOutput
- func (o SensitiveFileArrayOutput) ToSensitiveFileArrayOutputWithContext(ctx context.Context) SensitiveFileArrayOutput
- type SensitiveFileInput
- type SensitiveFileMap
- type SensitiveFileMapInput
- type SensitiveFileMapOutput
- func (SensitiveFileMapOutput) ElementType() reflect.Type
- func (o SensitiveFileMapOutput) MapIndex(k pulumi.StringInput) SensitiveFileOutput
- func (o SensitiveFileMapOutput) ToSensitiveFileMapOutput() SensitiveFileMapOutput
- func (o SensitiveFileMapOutput) ToSensitiveFileMapOutputWithContext(ctx context.Context) SensitiveFileMapOutput
- type SensitiveFileOutput
- func (o SensitiveFileOutput) Content() pulumi.StringPtrOutput
- func (o SensitiveFileOutput) ContentBase64() pulumi.StringPtrOutput
- func (o SensitiveFileOutput) ContentBase64sha256() pulumi.StringOutput
- func (o SensitiveFileOutput) ContentBase64sha512() pulumi.StringOutput
- func (o SensitiveFileOutput) ContentMd5() pulumi.StringOutput
- func (o SensitiveFileOutput) ContentSha1() pulumi.StringOutput
- func (o SensitiveFileOutput) ContentSha256() pulumi.StringOutput
- func (o SensitiveFileOutput) ContentSha512() pulumi.StringOutput
- func (o SensitiveFileOutput) DirectoryPermission() pulumi.StringOutput
- func (SensitiveFileOutput) ElementType() reflect.Type
- func (o SensitiveFileOutput) FilePermission() pulumi.StringOutput
- func (o SensitiveFileOutput) Filename() pulumi.StringOutput
- func (o SensitiveFileOutput) Source() pulumi.StringPtrOutput
- func (o SensitiveFileOutput) ToSensitiveFileOutput() SensitiveFileOutput
- func (o SensitiveFileOutput) ToSensitiveFileOutputWithContext(ctx context.Context) SensitiveFileOutput
- type SensitiveFileState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { pulumi.CustomResourceState // Content 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. Content pulumi.StringPtrOutput `pulumi:"content"` // Content 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. ContentBase64 pulumi.StringPtrOutput `pulumi:"contentBase64"` // Base64 encoded SHA256 checksum of file content. ContentBase64sha256 pulumi.StringOutput `pulumi:"contentBase64sha256"` // Base64 encoded SHA512 checksum of file content. ContentBase64sha512 pulumi.StringOutput `pulumi:"contentBase64sha512"` // MD5 checksum of file content. ContentMd5 pulumi.StringOutput `pulumi:"contentMd5"` // SHA1 checksum of file content. ContentSha1 pulumi.StringOutput `pulumi:"contentSha1"` // SHA256 checksum of file content. ContentSha256 pulumi.StringOutput `pulumi:"contentSha256"` // SHA512 checksum of file content. ContentSha512 pulumi.StringOutput `pulumi:"contentSha512"` // Permissions to set for directories created (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0777"`. DirectoryPermission pulumi.StringOutput `pulumi:"directoryPermission"` // Permissions to set for the output file (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0777"`. FilePermission pulumi.StringOutput `pulumi:"filePermission"` // The 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. Filename pulumi.StringOutput `pulumi:"filename"` // Sensitive 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 `SensitiveFile` // resource instead. // // Deprecated: Use the `local_sensitive_file` resource instead SensitiveContent pulumi.StringPtrOutput `pulumi:"sensitiveContent"` // Path 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. Source pulumi.StringPtrOutput `pulumi:"source"` }
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"fmt" "github.com/pulumi/pulumi-local/sdk/go/local" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := local.NewFile(ctx, "foo", &local.FileArgs{ Content: pulumi.String("foo!"), Filename: pulumi.String(fmt.Sprintf("%v/foo.bar", path.Module)), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
func GetFile ¶
func GetFile(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FileState, opts ...pulumi.ResourceOption) (*File, error)
GetFile gets an existing File resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewFile ¶
func NewFile(ctx *pulumi.Context, name string, args *FileArgs, opts ...pulumi.ResourceOption) (*File, error)
NewFile registers a new resource with the given unique name, arguments, and options.
func (*File) ElementType ¶
func (*File) ToFileOutput ¶
func (i *File) ToFileOutput() FileOutput
func (*File) ToFileOutputWithContext ¶
func (i *File) ToFileOutputWithContext(ctx context.Context) FileOutput
type FileArgs ¶
type FileArgs struct { // Content 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. Content pulumi.StringPtrInput // Content 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. ContentBase64 pulumi.StringPtrInput // Permissions to set for directories created (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0777"`. DirectoryPermission pulumi.StringPtrInput // Permissions to set for the output file (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0777"`. FilePermission pulumi.StringPtrInput // The 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. Filename pulumi.StringInput // Sensitive 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 `SensitiveFile` // resource instead. // // Deprecated: Use the `local_sensitive_file` resource instead SensitiveContent pulumi.StringPtrInput // Path 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. Source pulumi.StringPtrInput }
The set of arguments for constructing a File resource.
func (FileArgs) ElementType ¶
type FileArray ¶
type FileArray []FileInput
func (FileArray) ElementType ¶
func (FileArray) ToFileArrayOutput ¶
func (i FileArray) ToFileArrayOutput() FileArrayOutput
func (FileArray) ToFileArrayOutputWithContext ¶
func (i FileArray) ToFileArrayOutputWithContext(ctx context.Context) FileArrayOutput
type FileArrayInput ¶
type FileArrayInput interface { pulumi.Input ToFileArrayOutput() FileArrayOutput ToFileArrayOutputWithContext(context.Context) FileArrayOutput }
FileArrayInput is an input type that accepts FileArray and FileArrayOutput values. You can construct a concrete instance of `FileArrayInput` via:
FileArray{ FileArgs{...} }
type FileArrayOutput ¶
type FileArrayOutput struct{ *pulumi.OutputState }
func (FileArrayOutput) ElementType ¶
func (FileArrayOutput) ElementType() reflect.Type
func (FileArrayOutput) Index ¶
func (o FileArrayOutput) Index(i pulumi.IntInput) FileOutput
func (FileArrayOutput) ToFileArrayOutput ¶
func (o FileArrayOutput) ToFileArrayOutput() FileArrayOutput
func (FileArrayOutput) ToFileArrayOutputWithContext ¶
func (o FileArrayOutput) ToFileArrayOutputWithContext(ctx context.Context) FileArrayOutput
type FileInput ¶
type FileInput interface { pulumi.Input ToFileOutput() FileOutput ToFileOutputWithContext(ctx context.Context) FileOutput }
type FileMap ¶
func (FileMap) ElementType ¶
func (FileMap) ToFileMapOutput ¶
func (i FileMap) ToFileMapOutput() FileMapOutput
func (FileMap) ToFileMapOutputWithContext ¶
func (i FileMap) ToFileMapOutputWithContext(ctx context.Context) FileMapOutput
type FileMapInput ¶
type FileMapInput interface { pulumi.Input ToFileMapOutput() FileMapOutput ToFileMapOutputWithContext(context.Context) FileMapOutput }
FileMapInput is an input type that accepts FileMap and FileMapOutput values. You can construct a concrete instance of `FileMapInput` via:
FileMap{ "key": FileArgs{...} }
type FileMapOutput ¶
type FileMapOutput struct{ *pulumi.OutputState }
func (FileMapOutput) ElementType ¶
func (FileMapOutput) ElementType() reflect.Type
func (FileMapOutput) MapIndex ¶
func (o FileMapOutput) MapIndex(k pulumi.StringInput) FileOutput
func (FileMapOutput) ToFileMapOutput ¶
func (o FileMapOutput) ToFileMapOutput() FileMapOutput
func (FileMapOutput) ToFileMapOutputWithContext ¶
func (o FileMapOutput) ToFileMapOutputWithContext(ctx context.Context) FileMapOutput
type FileOutput ¶
type FileOutput struct{ *pulumi.OutputState }
func (FileOutput) Content ¶
func (o FileOutput) Content() pulumi.StringPtrOutput
Content 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.
func (FileOutput) ContentBase64 ¶
func (o FileOutput) ContentBase64() pulumi.StringPtrOutput
Content 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.
func (FileOutput) ContentBase64sha256 ¶
func (o FileOutput) ContentBase64sha256() pulumi.StringOutput
Base64 encoded SHA256 checksum of file content.
func (FileOutput) ContentBase64sha512 ¶
func (o FileOutput) ContentBase64sha512() pulumi.StringOutput
Base64 encoded SHA512 checksum of file content.
func (FileOutput) ContentMd5 ¶
func (o FileOutput) ContentMd5() pulumi.StringOutput
MD5 checksum of file content.
func (FileOutput) ContentSha1 ¶
func (o FileOutput) ContentSha1() pulumi.StringOutput
SHA1 checksum of file content.
func (FileOutput) ContentSha256 ¶
func (o FileOutput) ContentSha256() pulumi.StringOutput
SHA256 checksum of file content.
func (FileOutput) ContentSha512 ¶
func (o FileOutput) ContentSha512() pulumi.StringOutput
SHA512 checksum of file content.
func (FileOutput) DirectoryPermission ¶
func (o FileOutput) DirectoryPermission() pulumi.StringOutput
Permissions to set for directories created (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0777"`.
func (FileOutput) ElementType ¶
func (FileOutput) ElementType() reflect.Type
func (FileOutput) FilePermission ¶
func (o FileOutput) FilePermission() pulumi.StringOutput
Permissions to set for the output file (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0777"`.
func (FileOutput) Filename ¶
func (o FileOutput) Filename() pulumi.StringOutput
The 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.
func (FileOutput) SensitiveContent
deprecated
func (o FileOutput) SensitiveContent() pulumi.StringPtrOutput
Sensitive 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 `SensitiveFile` resource instead.
Deprecated: Use the `local_sensitive_file` resource instead
func (FileOutput) Source ¶
func (o FileOutput) Source() pulumi.StringPtrOutput
Path 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.
func (FileOutput) ToFileOutput ¶
func (o FileOutput) ToFileOutput() FileOutput
func (FileOutput) ToFileOutputWithContext ¶
func (o FileOutput) ToFileOutputWithContext(ctx context.Context) FileOutput
type FileState ¶
type FileState struct { // Content 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. Content pulumi.StringPtrInput // Content 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. ContentBase64 pulumi.StringPtrInput // Base64 encoded SHA256 checksum of file content. ContentBase64sha256 pulumi.StringPtrInput // Base64 encoded SHA512 checksum of file content. ContentBase64sha512 pulumi.StringPtrInput // MD5 checksum of file content. ContentMd5 pulumi.StringPtrInput // SHA1 checksum of file content. ContentSha1 pulumi.StringPtrInput // SHA256 checksum of file content. ContentSha256 pulumi.StringPtrInput // SHA512 checksum of file content. ContentSha512 pulumi.StringPtrInput // Permissions to set for directories created (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0777"`. DirectoryPermission pulumi.StringPtrInput // Permissions to set for the output file (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0777"`. FilePermission pulumi.StringPtrInput // The 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. Filename pulumi.StringPtrInput // Sensitive 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 `SensitiveFile` // resource instead. // // Deprecated: Use the `local_sensitive_file` resource instead SensitiveContent pulumi.StringPtrInput // Path 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. Source pulumi.StringPtrInput }
func (FileState) ElementType ¶
type LookupFileArgs ¶
type LookupFileArgs struct { // Path to the file that will be read. The data source will return an error if the file does not exist. Filename string `pulumi:"filename"` }
A collection of arguments for invoking getFile.
type LookupFileOutputArgs ¶
type LookupFileOutputArgs struct { // Path to the file that will be read. The data source will return an error if the file does not exist. Filename pulumi.StringInput `pulumi:"filename"` }
A collection of arguments for invoking getFile.
func (LookupFileOutputArgs) ElementType ¶
func (LookupFileOutputArgs) ElementType() reflect.Type
type LookupFileResult ¶
type LookupFileResult struct { // 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 `content` // replaced with the Unicode replacement character. Content string `pulumi:"content"` // Base64 encoded version of the file content (use this when dealing with binary data). ContentBase64 string `pulumi:"contentBase64"` // Base64 encoded SHA256 checksum of file content. ContentBase64sha256 string `pulumi:"contentBase64sha256"` // Base64 encoded SHA512 checksum of file content. ContentBase64sha512 string `pulumi:"contentBase64sha512"` // MD5 checksum of file content. ContentMd5 string `pulumi:"contentMd5"` // SHA1 checksum of file content. ContentSha1 string `pulumi:"contentSha1"` // SHA256 checksum of file content. ContentSha256 string `pulumi:"contentSha256"` // SHA512 checksum of file content. ContentSha512 string `pulumi:"contentSha512"` // Path to the file that will be read. The data source will return an error if the file does not exist. Filename string `pulumi:"filename"` // The hexadecimal encoding of the SHA1 checksum of the file content. Id string `pulumi:"id"` }
A collection of values returned by getFile.
func LookupFile ¶
func LookupFile(ctx *pulumi.Context, args *LookupFileArgs, opts ...pulumi.InvokeOption) (*LookupFileResult, error)
Reads a file from the local filesystem.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" "github.com/pulumi/pulumi-local/sdk/go/local" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { foo, err := local.LookupFile(ctx, &local.LookupFileArgs{ Filename: fmt.Sprintf("%v/foo.bar", path.Module), }, nil) if err != nil { return err } _, err = s3.NewBucketObjectv2(ctx, "sharedZip", &s3.BucketObjectv2Args{ Bucket: pulumi.Any("my-bucket"), Key: pulumi.String("my-key"), Content: *pulumi.String(foo.Content), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
type LookupFileResultOutput ¶
type LookupFileResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getFile.
func LookupFileOutput ¶
func LookupFileOutput(ctx *pulumi.Context, args LookupFileOutputArgs, opts ...pulumi.InvokeOption) LookupFileResultOutput
func (LookupFileResultOutput) Content ¶
func (o LookupFileResultOutput) Content() pulumi.StringOutput
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 `content` replaced with the Unicode replacement character.
func (LookupFileResultOutput) ContentBase64 ¶
func (o LookupFileResultOutput) ContentBase64() pulumi.StringOutput
Base64 encoded version of the file content (use this when dealing with binary data).
func (LookupFileResultOutput) ContentBase64sha256 ¶
func (o LookupFileResultOutput) ContentBase64sha256() pulumi.StringOutput
Base64 encoded SHA256 checksum of file content.
func (LookupFileResultOutput) ContentBase64sha512 ¶
func (o LookupFileResultOutput) ContentBase64sha512() pulumi.StringOutput
Base64 encoded SHA512 checksum of file content.
func (LookupFileResultOutput) ContentMd5 ¶
func (o LookupFileResultOutput) ContentMd5() pulumi.StringOutput
MD5 checksum of file content.
func (LookupFileResultOutput) ContentSha1 ¶
func (o LookupFileResultOutput) ContentSha1() pulumi.StringOutput
SHA1 checksum of file content.
func (LookupFileResultOutput) ContentSha256 ¶
func (o LookupFileResultOutput) ContentSha256() pulumi.StringOutput
SHA256 checksum of file content.
func (LookupFileResultOutput) ContentSha512 ¶
func (o LookupFileResultOutput) ContentSha512() pulumi.StringOutput
SHA512 checksum of file content.
func (LookupFileResultOutput) ElementType ¶
func (LookupFileResultOutput) ElementType() reflect.Type
func (LookupFileResultOutput) Filename ¶
func (o LookupFileResultOutput) Filename() pulumi.StringOutput
Path to the file that will be read. The data source will return an error if the file does not exist.
func (LookupFileResultOutput) Id ¶
func (o LookupFileResultOutput) Id() pulumi.StringOutput
The hexadecimal encoding of the SHA1 checksum of the file content.
func (LookupFileResultOutput) ToLookupFileResultOutput ¶
func (o LookupFileResultOutput) ToLookupFileResultOutput() LookupFileResultOutput
func (LookupFileResultOutput) ToLookupFileResultOutputWithContext ¶
func (o LookupFileResultOutput) ToLookupFileResultOutputWithContext(ctx context.Context) LookupFileResultOutput
type LookupSensitiveFileArgs ¶
type LookupSensitiveFileArgs struct { // Path to the file that will be read. The data source will return an error if the file does not exist. Filename string `pulumi:"filename"` }
A collection of arguments for invoking getSensitiveFile.
type LookupSensitiveFileOutputArgs ¶
type LookupSensitiveFileOutputArgs struct { // Path to the file that will be read. The data source will return an error if the file does not exist. Filename pulumi.StringInput `pulumi:"filename"` }
A collection of arguments for invoking getSensitiveFile.
func (LookupSensitiveFileOutputArgs) ElementType ¶
func (LookupSensitiveFileOutputArgs) ElementType() reflect.Type
type LookupSensitiveFileResult ¶
type LookupSensitiveFileResult struct { // 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 `content` // replaced with the Unicode replacement character. Content string `pulumi:"content"` // Base64 encoded version of the file content (use this when dealing with binary data). ContentBase64 string `pulumi:"contentBase64"` // Base64 encoded SHA256 checksum of file content. ContentBase64sha256 string `pulumi:"contentBase64sha256"` // Base64 encoded SHA512 checksum of file content. ContentBase64sha512 string `pulumi:"contentBase64sha512"` // MD5 checksum of file content. ContentMd5 string `pulumi:"contentMd5"` // SHA1 checksum of file content. ContentSha1 string `pulumi:"contentSha1"` // SHA256 checksum of file content. ContentSha256 string `pulumi:"contentSha256"` // SHA512 checksum of file content. ContentSha512 string `pulumi:"contentSha512"` // Path to the file that will be read. The data source will return an error if the file does not exist. Filename string `pulumi:"filename"` // The hexadecimal encoding of the SHA1 checksum of the file content. Id string `pulumi:"id"` }
A collection of values returned by getSensitiveFile.
func LookupSensitiveFile ¶
func LookupSensitiveFile(ctx *pulumi.Context, args *LookupSensitiveFileArgs, opts ...pulumi.InvokeOption) (*LookupSensitiveFileResult, error)
Reads a file that contains sensitive data, from the local filesystem.
The attributes exposed by this data source are marked as sensitive.
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" "github.com/pulumi/pulumi-local/sdk/go/local" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { foo, err := local.LookupSensitiveFile(ctx, &local.LookupSensitiveFileArgs{ Filename: fmt.Sprintf("%v/foo.bar", path.Module), }, nil) if err != nil { return err } _, err = s3.NewBucketObjectv2(ctx, "sharedZip", &s3.BucketObjectv2Args{ Bucket: pulumi.Any("my-bucket"), Key: pulumi.String("my-key"), Content: *pulumi.String(foo.Content), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
type LookupSensitiveFileResultOutput ¶
type LookupSensitiveFileResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getSensitiveFile.
func LookupSensitiveFileOutput ¶
func LookupSensitiveFileOutput(ctx *pulumi.Context, args LookupSensitiveFileOutputArgs, opts ...pulumi.InvokeOption) LookupSensitiveFileResultOutput
func (LookupSensitiveFileResultOutput) Content ¶
func (o LookupSensitiveFileResultOutput) Content() pulumi.StringOutput
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 `content` replaced with the Unicode replacement character.
func (LookupSensitiveFileResultOutput) ContentBase64 ¶
func (o LookupSensitiveFileResultOutput) ContentBase64() pulumi.StringOutput
Base64 encoded version of the file content (use this when dealing with binary data).
func (LookupSensitiveFileResultOutput) ContentBase64sha256 ¶
func (o LookupSensitiveFileResultOutput) ContentBase64sha256() pulumi.StringOutput
Base64 encoded SHA256 checksum of file content.
func (LookupSensitiveFileResultOutput) ContentBase64sha512 ¶
func (o LookupSensitiveFileResultOutput) ContentBase64sha512() pulumi.StringOutput
Base64 encoded SHA512 checksum of file content.
func (LookupSensitiveFileResultOutput) ContentMd5 ¶
func (o LookupSensitiveFileResultOutput) ContentMd5() pulumi.StringOutput
MD5 checksum of file content.
func (LookupSensitiveFileResultOutput) ContentSha1 ¶
func (o LookupSensitiveFileResultOutput) ContentSha1() pulumi.StringOutput
SHA1 checksum of file content.
func (LookupSensitiveFileResultOutput) ContentSha256 ¶
func (o LookupSensitiveFileResultOutput) ContentSha256() pulumi.StringOutput
SHA256 checksum of file content.
func (LookupSensitiveFileResultOutput) ContentSha512 ¶
func (o LookupSensitiveFileResultOutput) ContentSha512() pulumi.StringOutput
SHA512 checksum of file content.
func (LookupSensitiveFileResultOutput) ElementType ¶
func (LookupSensitiveFileResultOutput) ElementType() reflect.Type
func (LookupSensitiveFileResultOutput) Filename ¶
func (o LookupSensitiveFileResultOutput) Filename() pulumi.StringOutput
Path to the file that will be read. The data source will return an error if the file does not exist.
func (LookupSensitiveFileResultOutput) Id ¶
func (o LookupSensitiveFileResultOutput) Id() pulumi.StringOutput
The hexadecimal encoding of the SHA1 checksum of the file content.
func (LookupSensitiveFileResultOutput) ToLookupSensitiveFileResultOutput ¶
func (o LookupSensitiveFileResultOutput) ToLookupSensitiveFileResultOutput() LookupSensitiveFileResultOutput
func (LookupSensitiveFileResultOutput) ToLookupSensitiveFileResultOutputWithContext ¶
func (o LookupSensitiveFileResultOutput) ToLookupSensitiveFileResultOutputWithContext(ctx context.Context) LookupSensitiveFileResultOutput
type Provider ¶
type Provider struct {
pulumi.ProviderResourceState
}
The provider type for the local package. By default, resources use package-wide configuration settings, however an explicit `Provider` instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
func NewProvider ¶
func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error)
NewProvider registers a new resource with the given unique name, arguments, and options.
func (*Provider) ElementType ¶
func (*Provider) ToProviderOutput ¶
func (i *Provider) ToProviderOutput() ProviderOutput
func (*Provider) ToProviderOutputWithContext ¶
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
type ProviderArgs ¶
type ProviderArgs struct { }
The set of arguments for constructing a Provider resource.
func (ProviderArgs) ElementType ¶
func (ProviderArgs) ElementType() reflect.Type
type ProviderInput ¶
type ProviderInput interface { pulumi.Input ToProviderOutput() ProviderOutput ToProviderOutputWithContext(ctx context.Context) ProviderOutput }
type ProviderOutput ¶
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType ¶
func (ProviderOutput) ElementType() reflect.Type
func (ProviderOutput) ToProviderOutput ¶
func (o ProviderOutput) ToProviderOutput() ProviderOutput
func (ProviderOutput) ToProviderOutputWithContext ¶
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
type SensitiveFile ¶
type SensitiveFile struct { pulumi.CustomResourceState // Sensitive Content to store in the file, expected to be a UTF-8 encoded string. // Conflicts with `contentBase64` and `source`. // Exactly one of these three arguments must be specified. Content pulumi.StringPtrOutput `pulumi:"content"` // Sensitive Content to store in the file, expected to be binary encoded as base64 string. // Conflicts with `content` and `source`. // Exactly one of these three arguments must be specified. ContentBase64 pulumi.StringPtrOutput `pulumi:"contentBase64"` // Base64 encoded SHA256 checksum of file content. ContentBase64sha256 pulumi.StringOutput `pulumi:"contentBase64sha256"` // Base64 encoded SHA512 checksum of file content. ContentBase64sha512 pulumi.StringOutput `pulumi:"contentBase64sha512"` // MD5 checksum of file content. ContentMd5 pulumi.StringOutput `pulumi:"contentMd5"` // SHA1 checksum of file content. ContentSha1 pulumi.StringOutput `pulumi:"contentSha1"` // SHA256 checksum of file content. ContentSha256 pulumi.StringOutput `pulumi:"contentSha256"` // SHA512 checksum of file content. ContentSha512 pulumi.StringOutput `pulumi:"contentSha512"` // Permissions to set for directories created (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0700"`. DirectoryPermission pulumi.StringOutput `pulumi:"directoryPermission"` // Permissions to set for the output file (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0700"`. FilePermission pulumi.StringOutput `pulumi:"filePermission"` // The 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. Filename pulumi.StringOutput `pulumi:"filename"` // Path to file to use as source for the one we are creating. // Conflicts with `content` and `contentBase64`. // Exactly one of these three arguments must be specified. Source pulumi.StringPtrOutput `pulumi:"source"` }
## Example Usage
<!--Start PulumiCodeChooser --> ```go package main
import (
"fmt" "github.com/pulumi/pulumi-local/sdk/go/local" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := local.NewSensitiveFile(ctx, "foo", &local.SensitiveFileArgs{ Content: pulumi.String("foo!"), Filename: pulumi.String(fmt.Sprintf("%v/foo.bar", path.Module)), }) if err != nil { return err } return nil }) }
``` <!--End PulumiCodeChooser -->
func GetSensitiveFile ¶
func GetSensitiveFile(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SensitiveFileState, opts ...pulumi.ResourceOption) (*SensitiveFile, error)
GetSensitiveFile gets an existing SensitiveFile resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewSensitiveFile ¶
func NewSensitiveFile(ctx *pulumi.Context, name string, args *SensitiveFileArgs, opts ...pulumi.ResourceOption) (*SensitiveFile, error)
NewSensitiveFile registers a new resource with the given unique name, arguments, and options.
func (*SensitiveFile) ElementType ¶
func (*SensitiveFile) ElementType() reflect.Type
func (*SensitiveFile) ToSensitiveFileOutput ¶
func (i *SensitiveFile) ToSensitiveFileOutput() SensitiveFileOutput
func (*SensitiveFile) ToSensitiveFileOutputWithContext ¶
func (i *SensitiveFile) ToSensitiveFileOutputWithContext(ctx context.Context) SensitiveFileOutput
type SensitiveFileArgs ¶
type SensitiveFileArgs struct { // Sensitive Content to store in the file, expected to be a UTF-8 encoded string. // Conflicts with `contentBase64` and `source`. // Exactly one of these three arguments must be specified. Content pulumi.StringPtrInput // Sensitive Content to store in the file, expected to be binary encoded as base64 string. // Conflicts with `content` and `source`. // Exactly one of these three arguments must be specified. ContentBase64 pulumi.StringPtrInput // Permissions to set for directories created (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0700"`. DirectoryPermission pulumi.StringPtrInput // Permissions to set for the output file (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0700"`. FilePermission pulumi.StringPtrInput // The 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. Filename pulumi.StringInput // Path to file to use as source for the one we are creating. // Conflicts with `content` and `contentBase64`. // Exactly one of these three arguments must be specified. Source pulumi.StringPtrInput }
The set of arguments for constructing a SensitiveFile resource.
func (SensitiveFileArgs) ElementType ¶
func (SensitiveFileArgs) ElementType() reflect.Type
type SensitiveFileArray ¶
type SensitiveFileArray []SensitiveFileInput
func (SensitiveFileArray) ElementType ¶
func (SensitiveFileArray) ElementType() reflect.Type
func (SensitiveFileArray) ToSensitiveFileArrayOutput ¶
func (i SensitiveFileArray) ToSensitiveFileArrayOutput() SensitiveFileArrayOutput
func (SensitiveFileArray) ToSensitiveFileArrayOutputWithContext ¶
func (i SensitiveFileArray) ToSensitiveFileArrayOutputWithContext(ctx context.Context) SensitiveFileArrayOutput
type SensitiveFileArrayInput ¶
type SensitiveFileArrayInput interface { pulumi.Input ToSensitiveFileArrayOutput() SensitiveFileArrayOutput ToSensitiveFileArrayOutputWithContext(context.Context) SensitiveFileArrayOutput }
SensitiveFileArrayInput is an input type that accepts SensitiveFileArray and SensitiveFileArrayOutput values. You can construct a concrete instance of `SensitiveFileArrayInput` via:
SensitiveFileArray{ SensitiveFileArgs{...} }
type SensitiveFileArrayOutput ¶
type SensitiveFileArrayOutput struct{ *pulumi.OutputState }
func (SensitiveFileArrayOutput) ElementType ¶
func (SensitiveFileArrayOutput) ElementType() reflect.Type
func (SensitiveFileArrayOutput) Index ¶
func (o SensitiveFileArrayOutput) Index(i pulumi.IntInput) SensitiveFileOutput
func (SensitiveFileArrayOutput) ToSensitiveFileArrayOutput ¶
func (o SensitiveFileArrayOutput) ToSensitiveFileArrayOutput() SensitiveFileArrayOutput
func (SensitiveFileArrayOutput) ToSensitiveFileArrayOutputWithContext ¶
func (o SensitiveFileArrayOutput) ToSensitiveFileArrayOutputWithContext(ctx context.Context) SensitiveFileArrayOutput
type SensitiveFileInput ¶
type SensitiveFileInput interface { pulumi.Input ToSensitiveFileOutput() SensitiveFileOutput ToSensitiveFileOutputWithContext(ctx context.Context) SensitiveFileOutput }
type SensitiveFileMap ¶
type SensitiveFileMap map[string]SensitiveFileInput
func (SensitiveFileMap) ElementType ¶
func (SensitiveFileMap) ElementType() reflect.Type
func (SensitiveFileMap) ToSensitiveFileMapOutput ¶
func (i SensitiveFileMap) ToSensitiveFileMapOutput() SensitiveFileMapOutput
func (SensitiveFileMap) ToSensitiveFileMapOutputWithContext ¶
func (i SensitiveFileMap) ToSensitiveFileMapOutputWithContext(ctx context.Context) SensitiveFileMapOutput
type SensitiveFileMapInput ¶
type SensitiveFileMapInput interface { pulumi.Input ToSensitiveFileMapOutput() SensitiveFileMapOutput ToSensitiveFileMapOutputWithContext(context.Context) SensitiveFileMapOutput }
SensitiveFileMapInput is an input type that accepts SensitiveFileMap and SensitiveFileMapOutput values. You can construct a concrete instance of `SensitiveFileMapInput` via:
SensitiveFileMap{ "key": SensitiveFileArgs{...} }
type SensitiveFileMapOutput ¶
type SensitiveFileMapOutput struct{ *pulumi.OutputState }
func (SensitiveFileMapOutput) ElementType ¶
func (SensitiveFileMapOutput) ElementType() reflect.Type
func (SensitiveFileMapOutput) MapIndex ¶
func (o SensitiveFileMapOutput) MapIndex(k pulumi.StringInput) SensitiveFileOutput
func (SensitiveFileMapOutput) ToSensitiveFileMapOutput ¶
func (o SensitiveFileMapOutput) ToSensitiveFileMapOutput() SensitiveFileMapOutput
func (SensitiveFileMapOutput) ToSensitiveFileMapOutputWithContext ¶
func (o SensitiveFileMapOutput) ToSensitiveFileMapOutputWithContext(ctx context.Context) SensitiveFileMapOutput
type SensitiveFileOutput ¶
type SensitiveFileOutput struct{ *pulumi.OutputState }
func (SensitiveFileOutput) Content ¶
func (o SensitiveFileOutput) Content() pulumi.StringPtrOutput
Sensitive Content to store in the file, expected to be a UTF-8 encoded string. Conflicts with `contentBase64` and `source`. Exactly one of these three arguments must be specified.
func (SensitiveFileOutput) ContentBase64 ¶
func (o SensitiveFileOutput) ContentBase64() pulumi.StringPtrOutput
Sensitive Content to store in the file, expected to be binary encoded as base64 string. Conflicts with `content` and `source`. Exactly one of these three arguments must be specified.
func (SensitiveFileOutput) ContentBase64sha256 ¶
func (o SensitiveFileOutput) ContentBase64sha256() pulumi.StringOutput
Base64 encoded SHA256 checksum of file content.
func (SensitiveFileOutput) ContentBase64sha512 ¶
func (o SensitiveFileOutput) ContentBase64sha512() pulumi.StringOutput
Base64 encoded SHA512 checksum of file content.
func (SensitiveFileOutput) ContentMd5 ¶
func (o SensitiveFileOutput) ContentMd5() pulumi.StringOutput
MD5 checksum of file content.
func (SensitiveFileOutput) ContentSha1 ¶
func (o SensitiveFileOutput) ContentSha1() pulumi.StringOutput
SHA1 checksum of file content.
func (SensitiveFileOutput) ContentSha256 ¶
func (o SensitiveFileOutput) ContentSha256() pulumi.StringOutput
SHA256 checksum of file content.
func (SensitiveFileOutput) ContentSha512 ¶
func (o SensitiveFileOutput) ContentSha512() pulumi.StringOutput
SHA512 checksum of file content.
func (SensitiveFileOutput) DirectoryPermission ¶
func (o SensitiveFileOutput) DirectoryPermission() pulumi.StringOutput
Permissions to set for directories created (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0700"`.
func (SensitiveFileOutput) ElementType ¶
func (SensitiveFileOutput) ElementType() reflect.Type
func (SensitiveFileOutput) FilePermission ¶
func (o SensitiveFileOutput) FilePermission() pulumi.StringOutput
Permissions to set for the output file (before umask), expressed as string in [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). Default value is `"0700"`.
func (SensitiveFileOutput) Filename ¶
func (o SensitiveFileOutput) Filename() pulumi.StringOutput
The 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.
func (SensitiveFileOutput) Source ¶
func (o SensitiveFileOutput) Source() pulumi.StringPtrOutput
Path to file to use as source for the one we are creating. Conflicts with `content` and `contentBase64`. Exactly one of these three arguments must be specified.
func (SensitiveFileOutput) ToSensitiveFileOutput ¶
func (o SensitiveFileOutput) ToSensitiveFileOutput() SensitiveFileOutput
func (SensitiveFileOutput) ToSensitiveFileOutputWithContext ¶
func (o SensitiveFileOutput) ToSensitiveFileOutputWithContext(ctx context.Context) SensitiveFileOutput
type SensitiveFileState ¶
type SensitiveFileState struct { // Sensitive Content to store in the file, expected to be a UTF-8 encoded string. // Conflicts with `contentBase64` and `source`. // Exactly one of these three arguments must be specified. Content pulumi.StringPtrInput // Sensitive Content to store in the file, expected to be binary encoded as base64 string. // Conflicts with `content` and `source`. // Exactly one of these three arguments must be specified. ContentBase64 pulumi.StringPtrInput // Base64 encoded SHA256 checksum of file content. ContentBase64sha256 pulumi.StringPtrInput // Base64 encoded SHA512 checksum of file content. ContentBase64sha512 pulumi.StringPtrInput // MD5 checksum of file content. ContentMd5 pulumi.StringPtrInput // SHA1 checksum of file content. ContentSha1 pulumi.StringPtrInput // SHA256 checksum of file content. ContentSha256 pulumi.StringPtrInput // SHA512 checksum of file content. ContentSha512 pulumi.StringPtrInput // Permissions to set for directories created (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0700"`. DirectoryPermission pulumi.StringPtrInput // Permissions to set for the output file (before umask), expressed as string in // [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation). // Default value is `"0700"`. FilePermission pulumi.StringPtrInput // The 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. Filename pulumi.StringPtrInput // Path to file to use as source for the one we are creating. // Conflicts with `content` and `contentBase64`. // Exactly one of these three arguments must be specified. Source pulumi.StringPtrInput }
func (SensitiveFileState) ElementType ¶
func (SensitiveFileState) ElementType() reflect.Type