Skip to content

Latest commit

 

History

History
1171 lines (732 loc) · 41.2 KB

file.go.md

File metadata and controls

1171 lines (732 loc) · 41.2 KB

file Submodule

Constructs

File

Represents a {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file local_file}.

Initializers

import "github.com/cdktf/cdktf-provider-local-go/local/v10/file"

file.NewFile(scope Construct, id *string, config FileConfig) File
Name Type Description
scope github.com/aws/constructs-go/constructs/v10.Construct The scope in which to define this construct.
id *string The scoped construct ID.
config FileConfig No description.

scopeRequired
  • Type: github.com/aws/constructs-go/constructs/v10.Construct

The scope in which to define this construct.


idRequired
  • Type: *string

The scoped construct ID.

Must be unique amongst siblings in the same scope


configRequired

Methods

Name Description
ToString Returns a string representation of this construct.
AddOverride No description.
OverrideLogicalId Overrides the auto-generated logical ID with a specific ID.
ResetOverrideLogicalId Resets a previously passed logical Id to use the auto-generated logical id again.
ToHclTerraform No description.
ToMetadata No description.
ToTerraform Adds this resource to the terraform JSON output.
AddMoveTarget Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.
GetAnyMapAttribute No description.
GetBooleanAttribute No description.
GetBooleanMapAttribute No description.
GetListAttribute No description.
GetNumberAttribute No description.
GetNumberListAttribute No description.
GetNumberMapAttribute No description.
GetStringAttribute No description.
GetStringMapAttribute No description.
HasResourceMove No description.
ImportFrom No description.
InterpolationForAttribute No description.
MoveFromId Move the resource corresponding to "id" to this resource.
MoveTo Moves this resource to the target resource given by moveTarget.
MoveToId Moves this resource to the resource corresponding to "id".
ResetContent No description.
ResetContentBase64 No description.
ResetDirectoryPermission No description.
ResetFilePermission No description.
ResetSensitiveContent No description.
ResetSource No description.

ToString
func ToString() *string

Returns a string representation of this construct.

AddOverride
func AddOverride(path *string, value interface{})
pathRequired
  • Type: *string

valueRequired
  • Type: interface{}

OverrideLogicalId
func OverrideLogicalId(newLogicalId *string)

Overrides the auto-generated logical ID with a specific ID.

newLogicalIdRequired
  • Type: *string

The new logical ID to use for this stack element.


ResetOverrideLogicalId
func ResetOverrideLogicalId()

Resets a previously passed logical Id to use the auto-generated logical id again.

ToHclTerraform
func ToHclTerraform() interface{}
ToMetadata
func ToMetadata() interface{}
ToTerraform
func ToTerraform() interface{}

Adds this resource to the terraform JSON output.

AddMoveTarget
func AddMoveTarget(moveTarget *string)

Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.

moveTargetRequired
  • Type: *string

The string move target that will correspond to this resource.


GetAnyMapAttribute
func GetAnyMapAttribute(terraformAttribute *string) *map[string]interface{}
terraformAttributeRequired
  • Type: *string

GetBooleanAttribute
func GetBooleanAttribute(terraformAttribute *string) IResolvable
terraformAttributeRequired
  • Type: *string

GetBooleanMapAttribute
func GetBooleanMapAttribute(terraformAttribute *string) *map[string]*bool
terraformAttributeRequired
  • Type: *string

GetListAttribute
func GetListAttribute(terraformAttribute *string) *[]*string
terraformAttributeRequired
  • Type: *string

GetNumberAttribute
func GetNumberAttribute(terraformAttribute *string) *f64
terraformAttributeRequired
  • Type: *string

GetNumberListAttribute
func GetNumberListAttribute(terraformAttribute *string) *[]*f64
terraformAttributeRequired
  • Type: *string

GetNumberMapAttribute
func GetNumberMapAttribute(terraformAttribute *string) *map[string]*f64
terraformAttributeRequired
  • Type: *string

GetStringAttribute
func GetStringAttribute(terraformAttribute *string) *string
terraformAttributeRequired
  • Type: *string

GetStringMapAttribute
func GetStringMapAttribute(terraformAttribute *string) *map[string]*string
terraformAttributeRequired
  • Type: *string

HasResourceMove
func HasResourceMove() interface{}
ImportFrom
func ImportFrom(id *string, provider TerraformProvider)
idRequired
  • Type: *string

providerOptional
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider

InterpolationForAttribute
func InterpolationForAttribute(terraformAttribute *string) IResolvable
terraformAttributeRequired
  • Type: *string

MoveFromId
func MoveFromId(id *string)

Move the resource corresponding to "id" to this resource.

Note that the resource being moved from must be marked as moved using it's instance function.

idRequired
  • Type: *string

Full id of resource being moved from, e.g. "aws_s3_bucket.example".


MoveTo
func MoveTo(moveTarget *string, index interface{})

Moves this resource to the target resource given by moveTarget.

moveTargetRequired
  • Type: *string

The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.


indexOptional
  • Type: interface{}

Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.


MoveToId
func MoveToId(id *string)

Moves this resource to the resource corresponding to "id".

idRequired
  • Type: *string

Full id of resource to move to, e.g. "aws_s3_bucket.example".


ResetContent
func ResetContent()
ResetContentBase64
func ResetContentBase64()
ResetDirectoryPermission
func ResetDirectoryPermission()
ResetFilePermission
func ResetFilePermission()
ResetSensitiveContent
func ResetSensitiveContent()
ResetSource
func ResetSource()

Static Functions

Name Description
IsConstruct Checks if x is a construct.
IsTerraformElement No description.
IsTerraformResource No description.
GenerateConfigForImport Generates CDKTF code for importing a File resource upon running "cdktf plan ".

IsConstruct
import "github.com/cdktf/cdktf-provider-local-go/local/v10/file"

file.File_IsConstruct(x interface{}) *bool

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: interface{}

Any object.


IsTerraformElement
import "github.com/cdktf/cdktf-provider-local-go/local/v10/file"

file.File_IsTerraformElement(x interface{}) *bool
xRequired
  • Type: interface{}

IsTerraformResource
import "github.com/cdktf/cdktf-provider-local-go/local/v10/file"

file.File_IsTerraformResource(x interface{}) *bool
xRequired
  • Type: interface{}

GenerateConfigForImport
import "github.com/cdktf/cdktf-provider-local-go/local/v10/file"

file.File_GenerateConfigForImport(scope Construct, importToId *string, importFromId *string, provider TerraformProvider) ImportableResource

Generates CDKTF code for importing a File resource upon running "cdktf plan ".

scopeRequired
  • Type: github.com/aws/constructs-go/constructs/v10.Construct

The scope in which to define this construct.


importToIdRequired
  • Type: *string

The construct id used in the generated config for the File to import.


importFromIdRequired
  • Type: *string

The id of the existing File that should be imported.

Refer to the {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#import import section} in the documentation of this resource for the id to use


providerOptional
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider

? Optional instance of the provider where the File to import is found.


Properties

Name Type Description
Node github.com/aws/constructs-go/constructs/v10.Node The tree node.
CdktfStack github.com/hashicorp/terraform-cdk-go/cdktf.TerraformStack No description.
Fqn *string No description.
FriendlyUniqueId *string No description.
TerraformMetaArguments *map[string]interface{} No description.
TerraformResourceType *string No description.
TerraformGeneratorMetadata github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProviderGeneratorMetadata No description.
Connection interface{} No description.
Count interface{} No description.
DependsOn *[]*string No description.
ForEach github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator No description.
Lifecycle github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle No description.
Provider github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider No description.
Provisioners *[]interface{} No description.
ContentBase64Sha256 *string No description.
ContentBase64Sha512 *string No description.
ContentMd5 *string No description.
ContentSha1 *string No description.
ContentSha256 *string No description.
ContentSha512 *string No description.
Id *string No description.
ContentBase64Input *string No description.
ContentInput *string No description.
DirectoryPermissionInput *string No description.
FilenameInput *string No description.
FilePermissionInput *string No description.
SensitiveContentInput *string No description.
SourceInput *string No description.
Content *string No description.
ContentBase64 *string No description.
DirectoryPermission *string No description.
Filename *string No description.
FilePermission *string No description.
SensitiveContent *string No description.
Source *string No description.

NodeRequired
func Node() Node
  • Type: github.com/aws/constructs-go/constructs/v10.Node

The tree node.


CdktfStackRequired
func CdktfStack() TerraformStack
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformStack

FqnRequired
func Fqn() *string
  • Type: *string

FriendlyUniqueIdRequired
func FriendlyUniqueId() *string
  • Type: *string

TerraformMetaArgumentsRequired
func TerraformMetaArguments() *map[string]interface{}
  • Type: *map[string]interface{}

TerraformResourceTypeRequired
func TerraformResourceType() *string
  • Type: *string

TerraformGeneratorMetadataOptional
func TerraformGeneratorMetadata() TerraformProviderGeneratorMetadata
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProviderGeneratorMetadata

ConnectionOptional
func Connection() interface{}
  • Type: interface{}

CountOptional
func Count() interface{}
  • Type: interface{}

DependsOnOptional
func DependsOn() *[]*string
  • Type: *[]*string

ForEachOptional
func ForEach() ITerraformIterator
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator

LifecycleOptional
func Lifecycle() TerraformResourceLifecycle
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle

ProviderOptional
func Provider() TerraformProvider
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider

ProvisionersOptional
func Provisioners() *[]interface{}
  • Type: *[]interface{}

ContentBase64Sha256Required
func ContentBase64Sha256() *string
  • Type: *string

ContentBase64Sha512Required
func ContentBase64Sha512() *string
  • Type: *string

ContentMd5Required
func ContentMd5() *string
  • Type: *string

ContentSha1Required
func ContentSha1() *string
  • Type: *string

ContentSha256Required
func ContentSha256() *string
  • Type: *string

ContentSha512Required
func ContentSha512() *string
  • Type: *string

IdRequired
func Id() *string
  • Type: *string

ContentBase64InputOptional
func ContentBase64Input() *string
  • Type: *string

ContentInputOptional
func ContentInput() *string
  • Type: *string

DirectoryPermissionInputOptional
func DirectoryPermissionInput() *string
  • Type: *string

FilenameInputOptional
func FilenameInput() *string
  • Type: *string

FilePermissionInputOptional
func FilePermissionInput() *string
  • Type: *string

SensitiveContentInputOptional
func SensitiveContentInput() *string
  • Type: *string

SourceInputOptional
func SourceInput() *string
  • Type: *string

ContentRequired
func Content() *string
  • Type: *string

ContentBase64Required
func ContentBase64() *string
  • Type: *string

DirectoryPermissionRequired
func DirectoryPermission() *string
  • Type: *string

FilenameRequired
func Filename() *string
  • Type: *string

FilePermissionRequired
func FilePermission() *string
  • Type: *string

SensitiveContentRequired
func SensitiveContent() *string
  • Type: *string

SourceRequired
func Source() *string
  • Type: *string

Constants

Name Type Description
TfResourceType *string No description.

TfResourceTypeRequired
func TfResourceType() *string
  • Type: *string

Structs

FileConfig

Initializer

import "github.com/cdktf/cdktf-provider-local-go/local/v10/file"

&file.FileConfig {
	Connection: interface{},
	Count: interface{},
	DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable,
	ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator,
	Lifecycle: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle,
	Provider: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider,
	Provisioners: *[]interface{},
	Filename: *string,
	Content: *string,
	ContentBase64: *string,
	DirectoryPermission: *string,
	FilePermission: *string,
	SensitiveContent: *string,
	Source: *string,
}

Properties

Name Type Description
Connection interface{} No description.
Count interface{} No description.
DependsOn *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable No description.
ForEach github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator No description.
Lifecycle github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle No description.
Provider github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider No description.
Provisioners *[]interface{} No description.
Filename *string The path to the file that will be created.
Content *string Content to store in the file, expected to be a UTF-8 encoded string.
ContentBase64 *string Content to store in the file, expected to be binary encoded as base64 string.
DirectoryPermission *string Permissions to set for directories created (before umask), expressed as string in numeric notation. Default value is "0777".
FilePermission *string Permissions to set for the output file (before umask), expressed as string in numeric notation. Default value is "0777".
SensitiveContent *string Sensitive content to store in the file, expected to be an UTF-8 encoded string.
Source *string Path to file to use as source for the one we are creating.

ConnectionOptional
Connection interface{}
  • Type: interface{}

CountOptional
Count interface{}
  • Type: interface{}

DependsOnOptional
DependsOn *[]ITerraformDependable
  • Type: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable

ForEachOptional
ForEach ITerraformIterator
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator

LifecycleOptional
Lifecycle TerraformResourceLifecycle
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformResourceLifecycle

ProviderOptional
Provider TerraformProvider
  • Type: github.com/hashicorp/terraform-cdk-go/cdktf.TerraformProvider

ProvisionersOptional
Provisioners *[]interface{}
  • Type: *[]interface{}

FilenameRequired
Filename *string
  • Type: *string

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.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#filename File#filename}


ContentOptional
Content *string
  • Type: *string

Content to store in the file, expected to be a UTF-8 encoded string.

Conflicts with sensitive_content, content_base64 and source. Exactly one of these four arguments must be specified.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#content File#content}


ContentBase64Optional
ContentBase64 *string
  • Type: *string

Content to store in the file, expected to be binary encoded as base64 string.

Conflicts with content, sensitive_content and source. Exactly one of these four arguments must be specified.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#content_base64 File#content_base64}


DirectoryPermissionOptional
DirectoryPermission *string
  • Type: *string

Permissions to set for directories created (before umask), expressed as string in numeric notation. Default value is "0777".

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#directory_permission File#directory_permission}


FilePermissionOptional
FilePermission *string
  • Type: *string

Permissions to set for the output file (before umask), expressed as string in numeric notation. Default value is "0777".

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#file_permission File#file_permission}


SensitiveContentOptional
SensitiveContent *string
  • Type: *string

Sensitive content to store in the file, expected to be an UTF-8 encoded string.

Will not be displayed in diffs. Conflicts with content, content_base64 and source. Exactly one of these four arguments must be specified. If in need to use sensitive content, please use the local_sensitive_file resource instead.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#sensitive_content File#sensitive_content}


SourceOptional
Source *string
  • Type: *string

Path to file to use as source for the one we are creating.

Conflicts with content, sensitive_content and content_base64. Exactly one of these four arguments must be specified.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/local/2.5.1/docs/resources/file#source File#source}