s3

package
v0.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: MPL-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Package s3 provides a Terraform datasource.

Index

Constants

View Source
const (
	ErrCodeAccessDenied                         = "AccessDenied"
	ErrCodeBucketNotEmpty                       = "BucketNotEmpty"
	ErrCodeInvalidBucketState                   = "InvalidBucketState"
	ErrCodeInvalidRequest                       = "InvalidRequest"
	ErrCodeMalformedPolicy                      = "MalformedPolicy"
	ErrCodeMethodNotAllowed                     = "MethodNotAllowed"
	ErrCodeNoSuchBucket                         = "NoSuchBucket"
	ErrCodeNoSuchBucketPolicy                   = "NoSuchBucketPolicy"
	ErrCodeNoSuchConfiguration                  = "NoSuchConfiguration"
	ErrCodeNoSuchCORSConfiguration              = "NoSuchCORSConfiguration"
	ErrCodeNoSuchLifecycleConfiguration         = "NoSuchLifecycleConfiguration"
	ErrCodeNoSuchKey                            = "NoSuchKey"
	ErrCodeNoSuchPublicAccessBlockConfiguration = "NoSuchPublicAccessBlockConfiguration"
	ErrCodeNoSuchTagSet                         = "NoSuchTagSet"
	ErrCodeNoSuchTagSetError                    = "NoSuchTagSetError"
	ErrCodeNoSuchWebsiteConfiguration           = "NoSuchWebsiteConfiguration"
	ErrCodeNotImplemented                       = "NotImplemented"
	// ErrCodeObjectLockConfigurationNotFound should be used with tfawsErr.ErrCodeContains, not tfawsErr.ErrCodeEquals.
	// Reference: https://github.com/hashicorp/tErraform-provider-aws/pull/26317
	ErrCodeObjectLockConfigurationNotFound           = "ObjectLockConfigurationNotFound"
	ErrCodeObjectLockConfigurationNotFoundError      = "ObjectLockConfigurationNotFoundError"
	ErrCodeOperationAborted                          = "OperationAborted"
	ErrCodeOwnershipControlsNotFoundError            = "OwnershipControlsNotFoundError"
	ErrCodeReplicationConfigurationNotFound          = "ReplicationConfigurationNotFoundError"
	ErrCodeServerSideEncryptionConfigurationNotFound = "ServerSideEncryptionConfigurationNotFoundError"
	ErrCodeUnsupportedArgument                       = "UnsupportedArgument"
	// ErrCodeXNotImplemented is returned from Third Party S3 implementations
	// and so far has been noticed with calls to GetBucketWebsite.
	// Reference: https://github.com/hashicorp/tErraform-provider-aws/issues/14645
	ErrCodeXNotImplemented = "XNotImplemented"
)
View Source
const (

	// LifecycleConfigurationRulesStatusReady occurs when all configured rules reach their desired state (Enabled or Disabled).
	LifecycleConfigurationRulesStatusReady = "READY"
	// LifecycleConfigurationRulesStatusNotReady occurs when all configured rules have not reached their desired state (Enabled or Disabled).
	LifecycleConfigurationRulesStatusNotReady = "NOT_READY"
)

Variables

View Source
var DefaultWaitRetryInterval *time.Duration

DefaultWaitRetryInterval is used to set the retry interval to 0 during acceptance tests.

View Source
var ErrRetryWhenTimeout = errors.New("timeout reached")

Functions

func NewBucketACLDataSource

func NewBucketACLDataSource() datasource.DataSource

func NewBucketACLResource

func NewBucketACLResource() resource.Resource

NewBucketACLResource is a helper function to simplify the provider implementation.

func NewBucketCorsConfigurationDatasource

func NewBucketCorsConfigurationDatasource() datasource.DataSource

func NewBucketCorsConfigurationResource

func NewBucketCorsConfigurationResource() resource.Resource

NewBucketCorsConfigurationResource is a helper function to simplify the provider implementation.

func NewBucketDataSource

func NewBucketDataSource() datasource.DataSource

func NewBucketLifecycleConfigurationDataSource

func NewBucketLifecycleConfigurationDataSource() datasource.DataSource

func NewBucketLifecycleConfigurationResource

func NewBucketLifecycleConfigurationResource() resource.Resource

NewBucketLifecycleConfigurationResource is a helper function to simplify the provider implementation.

func NewBucketPolicyDataSource

func NewBucketPolicyDataSource() datasource.DataSource

func NewBucketPolicyResource

func NewBucketPolicyResource() resource.Resource

NewBucketPolicyResource is a helper function to simplify the provider implementation.

func NewBucketResource

func NewBucketResource() resource.Resource

NewBucketResource is a helper function to simplify the provider implementation.

func NewBucketVersioningConfigurationDatasource

func NewBucketVersioningConfigurationDatasource() datasource.DataSource

func NewBucketVersioningConfigurationResource

func NewBucketVersioningConfigurationResource() resource.Resource

NewBucketVersioningConfigurationResource is a helper function to simplify the provider implementation.

func NewBucketWebsiteConfigurationDataSource

func NewBucketWebsiteConfigurationDataSource() datasource.DataSource

func NewBucketWebsiteConfigurationResource

func NewBucketWebsiteConfigurationResource() resource.Resource

NewBucketWebsiteConfigurationResource is a helper function to simplify the provider implementation.

func NewCredentialResource

func NewCredentialResource() resource.Resource

NewCredentialResource is a helper function to simplify the provider implementation.

func NewUserDataSource added in v0.15.1

func NewUserDataSource() datasource.DataSource

func NotFound

func NotFound(err error) bool

NotFound returns true if the error represents a "resource not found" condition. Specifically, NotFound returns true if the error or a wrapped error is of type retry.NotFoundError.

func SecondJSONUnlessEquivalent

func SecondJSONUnlessEquivalent(existingPolicy, newPolicy string) (string, error)

Types

type BucketACLDataSource

type BucketACLDataSource struct {
	// contains filtered or unexported fields
}

func (*BucketACLDataSource) Configure

func (*BucketACLDataSource) Init

Init Initializes the data source.

func (*BucketACLDataSource) Metadata

func (*BucketACLDataSource) Read

func (*BucketACLDataSource) Schema

type BucketACLModel

type BucketACLModel struct {
	AccessControlPolicy supertypes.SingleNestedObjectValueOf[BucketACLModelAccessControlPolicy] `tfsdk:"access_control_policy"`
	ACL                 supertypes.StringValue                                                  `tfsdk:"acl"`
	Bucket              supertypes.StringValue                                                  `tfsdk:"bucket"`
	ID                  supertypes.StringValue                                                  `tfsdk:"id"`
	Timeouts            timeoutsR.Value                                                         `tfsdk:"timeouts"`
}

func (*BucketACLModel) Copy

func (rm *BucketACLModel) Copy() any

func (*BucketACLModel) SetAccessControlPolicy

func (rm *BucketACLModel) SetAccessControlPolicy(ctx context.Context, values *BucketACLModelAccessControlPolicy) (diags diag.Diagnostics)

SetAccessControlPolicy sets the value of the AccessControlPolicy field.

func (*BucketACLModel) SetID

func (rm *BucketACLModel) SetID(id *string)

BucketACLModel SetID.

type BucketACLModelAccessControlPolicy

type BucketACLModelAccessControlPolicy struct {
	Grants supertypes.SetNestedObjectValueOf[BucketACLModelGrant]    `tfsdk:"grants"`
	Owner  supertypes.SingleNestedObjectValueOf[BucketACLModelOwner] `tfsdk:"owner"`
}

* AccessControlPolicy: Grant field is Optional. Owner field is Require.

func NewBucketACLModelAccessControlPolicy

func NewBucketACLModelAccessControlPolicy(ctx context.Context) *BucketACLModelAccessControlPolicy

NewBucketACLModelGrants returns a nul struct of BucketACLModelAccessControlPolicy.

type BucketACLModelDatasource

type BucketACLModelDatasource struct {
	AccessControlPolicy supertypes.SingleNestedObjectValueOf[BucketACLModelAccessControlPolicy] `tfsdk:"access_control_policy"`
	ACL                 supertypes.StringValue                                                  `tfsdk:"acl"`
	Bucket              supertypes.StringValue                                                  `tfsdk:"bucket"`
	ID                  supertypes.StringValue                                                  `tfsdk:"id"`
	Timeouts            timeoutsD.Value                                                         `tfsdk:"timeouts"`
}

func (*BucketACLModelDatasource) Copy

func (rm *BucketACLModelDatasource) Copy() any

func (*BucketACLModelDatasource) SetAccessControlPolicy

func (rm *BucketACLModelDatasource) SetAccessControlPolicy(ctx context.Context, values *BucketACLModelAccessControlPolicy) (diags diag.Diagnostics)

SetAccessControlPolicy sets the value of the AccessControlPolicy field.

func (*BucketACLModelDatasource) SetID

func (rm *BucketACLModelDatasource) SetID(id *string)

BucketACLModelDatasource SetID.

type BucketACLModelGrant

type BucketACLModelGrant struct {
	Grantee    supertypes.SingleNestedObjectValueOf[BucketACLModelGrantee] `tfsdk:"grantee"`
	Permission supertypes.StringValue                                      `tfsdk:"permission"`
}

* Grant.

func NewBucketACLModelGrant

func NewBucketACLModelGrant(ctx context.Context) *BucketACLModelGrant

NewBucketACLModelGrant returns a null struct of BucketACLModelGrant.

type BucketACLModelGrantee

type BucketACLModelGrantee struct {
	DisplayName  supertypes.StringValue `tfsdk:"display_name"`
	EmailAddress supertypes.StringValue `tfsdk:"email_address"`
	ID           supertypes.StringValue `tfsdk:"id"`
	Type         supertypes.StringValue `tfsdk:"type"`
	URI          supertypes.StringValue `tfsdk:"uri"`
}

* Grantee.

func NewBucketACLModelGrantee

func NewBucketACLModelGrantee() *BucketACLModelGrantee

NewBucketACLModelGrantee returns a null struct of BucketACLModelGrantee.

type BucketACLModelGrants

type BucketACLModelGrants []*BucketACLModelGrant

* Grants.

type BucketACLModelOwner

type BucketACLModelOwner struct {
	DisplayName supertypes.StringValue `tfsdk:"display_name"`
	ID          supertypes.StringValue `tfsdk:"id"`
}

* Owner.

func NewBucketACLModelOwner

func NewBucketACLModelOwner() *BucketACLModelOwner

NewBucketACLModelOwner returns a null struct of BucketACLModelOwner.

type BucketACLResource

type BucketACLResource struct {
	// contains filtered or unexported fields
}

BucketACLResource is the resource implementation.

func (*BucketACLResource) Configure

func (*BucketACLResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketACLResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketACLResource) ImportState

func (*BucketACLResource) Init

func (r *BucketACLResource) Init(ctx context.Context, rm *BucketACLModel) (diags diag.Diagnostics)

Init Initializes the resource.

func (*BucketACLResource) Metadata

Metadata returns the resource type name.

func (*BucketACLResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketACLResource) Schema

Schema defines the schema for the resource.

func (*BucketACLResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BucketCorsConfigurationDatasource

type BucketCorsConfigurationDatasource struct {
	// contains filtered or unexported fields
}

func (*BucketCorsConfigurationDatasource) Configure

func (*BucketCorsConfigurationDatasource) Init

Init Initializes the data source.

func (*BucketCorsConfigurationDatasource) Metadata

func (*BucketCorsConfigurationDatasource) Read

func (*BucketCorsConfigurationDatasource) Schema

type BucketCorsConfigurationModel

type BucketCorsConfigurationModel struct {
	Timeouts  timeoutsR.Value           `tfsdk:"timeouts"`
	ID        supertypes.StringValue    `tfsdk:"id"`
	Bucket    supertypes.StringValue    `tfsdk:"bucket"`
	CorsRules supertypes.SetNestedValue `tfsdk:"cors_rules"`
}

func (*BucketCorsConfigurationModel) Copy

func (*BucketCorsConfigurationModel) GetCorsRules

GetCorsRules returns the value of the CorsRules field.

type BucketCorsConfigurationModelAllowedHeaders

type BucketCorsConfigurationModelAllowedHeaders []supertypes.SetValue

type BucketCorsConfigurationModelAllowedMethods

type BucketCorsConfigurationModelAllowedMethods []supertypes.SetValue

type BucketCorsConfigurationModelAllowedOrigins

type BucketCorsConfigurationModelAllowedOrigins []supertypes.SetValue

type BucketCorsConfigurationModelCorsRule

type BucketCorsConfigurationModelCorsRule struct {
	AllowedHeaders supertypes.SetValue    `tfsdk:"allowed_headers"`
	AllowedMethods supertypes.SetValue    `tfsdk:"allowed_methods"`
	AllowedOrigins supertypes.SetValue    `tfsdk:"allowed_origins"`
	ExposeHeaders  supertypes.SetValue    `tfsdk:"expose_headers"`
	ID             supertypes.StringValue `tfsdk:"id"`
	MaxAgeSeconds  supertypes.Int64Value  `tfsdk:"max_age_seconds"`
}

func NewBucketCorsConfigurationModelCorsRule

func NewBucketCorsConfigurationModelCorsRule() BucketCorsConfigurationModelCorsRule

NewBucketCorsConfigurationModelCorsRule creates a new BucketCorsConfigurationModelCorsRule.

type BucketCorsConfigurationModelCorsRules

type BucketCorsConfigurationModelCorsRules []BucketCorsConfigurationModelCorsRule

func (BucketCorsConfigurationModelCorsRules) CorsRulesToS3CorsRules

func (c BucketCorsConfigurationModelCorsRules) CorsRulesToS3CorsRules(ctx context.Context) (s3CorsRules []*s3.CORSRule, diags diag.Diagnostics)

CorsRulesToS3CorsRules converts the BucketCorsConfigurationModelCorsRules to a slice of []*s3.CORSRule.

type BucketCorsConfigurationModelDatasource

type BucketCorsConfigurationModelDatasource struct {
	Timeouts  timeoutsD.Value           `tfsdk:"timeouts"`
	ID        supertypes.StringValue    `tfsdk:"id"`
	Bucket    supertypes.StringValue    `tfsdk:"bucket"`
	CorsRules supertypes.SetNestedValue `tfsdk:"cors_rules"`
}

type BucketCorsConfigurationModelExposeHeaders

type BucketCorsConfigurationModelExposeHeaders []supertypes.SetValue

type BucketCorsConfigurationResource

type BucketCorsConfigurationResource struct {
	// contains filtered or unexported fields
}

BucketCorsConfigurationResource is the resource implementation.

func (*BucketCorsConfigurationResource) Configure

func (*BucketCorsConfigurationResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketCorsConfigurationResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketCorsConfigurationResource) ImportState

func (*BucketCorsConfigurationResource) Init

Init Initializes the resource.

func (*BucketCorsConfigurationResource) Metadata

Metadata returns the resource type name.

func (*BucketCorsConfigurationResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketCorsConfigurationResource) Schema

Schema defines the schema for the resource.

func (*BucketCorsConfigurationResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BucketDataSource

type BucketDataSource struct {
	// contains filtered or unexported fields
}

func (*BucketDataSource) Configure

func (*BucketDataSource) Init

func (d *BucketDataSource) Init(ctx context.Context, dm *BucketModel) (diags diag.Diagnostics)

Init Initializes the data source.

func (*BucketDataSource) Metadata

func (*BucketDataSource) Read

func (*BucketDataSource) Schema

type BucketLifecycleConfigurationDataSource

type BucketLifecycleConfigurationDataSource struct {
	// contains filtered or unexported fields
}

func (*BucketLifecycleConfigurationDataSource) Configure

func (*BucketLifecycleConfigurationDataSource) Init

Init Initializes the data source.

func (*BucketLifecycleConfigurationDataSource) Metadata

func (*BucketLifecycleConfigurationDataSource) Read

func (*BucketLifecycleConfigurationDataSource) Schema

type BucketLifecycleConfigurationDatasourceModel

type BucketLifecycleConfigurationDatasourceModel struct {
	Timeouts timeoutsD.Value                                                           `tfsdk:"timeouts"`
	Bucket   supertypes.StringValue                                                    `tfsdk:"bucket"`
	ID       supertypes.StringValue                                                    `tfsdk:"id"`
	Rules    supertypes.ListNestedObjectValueOf[BucketLifecycleConfigurationModelRule] `tfsdk:"rules"`
}

func (*BucketLifecycleConfigurationDatasourceModel) Copy

func (*BucketLifecycleConfigurationDatasourceModel) SetID

BucketLifecycleConfigurationDatasourceModel SetID.

func (*BucketLifecycleConfigurationDatasourceModel) SetRules

BucketLifecycleConfigurationDatasourceModel SetRules.

type BucketLifecycleConfigurationModel

type BucketLifecycleConfigurationModel struct {
	Timeouts timeoutsR.Value                                                           `tfsdk:"timeouts"`
	Bucket   supertypes.StringValue                                                    `tfsdk:"bucket"`
	ID       supertypes.StringValue                                                    `tfsdk:"id"`
	Rules    supertypes.ListNestedObjectValueOf[BucketLifecycleConfigurationModelRule] `tfsdk:"rules"`
}

func (*BucketLifecycleConfigurationModel) Copy

func (*BucketLifecycleConfigurationModel) SetID

BucketLifecycleConfigurationModel SetID.

func (*BucketLifecycleConfigurationModel) SetRules

BucketLifecycleConfigurationModel SetRules.

type BucketLifecycleConfigurationModelAbortIncompleteMultipartUpload

type BucketLifecycleConfigurationModelAbortIncompleteMultipartUpload struct {
	DaysAfterInitiation supertypes.Int64Value `tfsdk:"days_after_initiation"`
}

type BucketLifecycleConfigurationModelAnd

type BucketLifecycleConfigurationModelAnd struct {
	Tags   supertypes.ListNestedObjectValueOf[BucketLifecycleConfigurationModelTag] `tfsdk:"tags"`
	Prefix supertypes.StringValue                                                   `tfsdk:"prefix"`
}

type BucketLifecycleConfigurationModelExpiration

type BucketLifecycleConfigurationModelExpiration struct {
	Date                      supertypes.StringValue `tfsdk:"date"`
	Days                      supertypes.Int64Value  `tfsdk:"days"`
	ExpiredObjectDeleteMarker supertypes.BoolValue   `tfsdk:"expired_object_delete_marker"`
}

type BucketLifecycleConfigurationModelNoncurrentVersionExpiration

type BucketLifecycleConfigurationModelNoncurrentVersionExpiration struct {
	NewerNoncurrentVersions supertypes.Int64Value `tfsdk:"newer_noncurrent_versions"`
	NoncurrentDays          supertypes.Int64Value `tfsdk:"noncurrent_days"`
}

type BucketLifecycleConfigurationModelRule

type BucketLifecycleConfigurationModelRule struct {
	AbortIncompleteMultipartUpload supertypes.SingleNestedObjectValueOf[BucketLifecycleConfigurationModelAbortIncompleteMultipartUpload] `tfsdk:"abort_incomplete_multipart_upload"`
	Expiration                     supertypes.SingleNestedObjectValueOf[BucketLifecycleConfigurationModelExpiration]                     `tfsdk:"expiration"`
	Filter                         supertypes.SingleNestedObjectValueOf[BucketLifecycleConfigurationModelFilter]                         `tfsdk:"filter"`
	ID                             supertypes.StringValue                                                                                `tfsdk:"id"`
	NoncurrentVersionExpiration    supertypes.SingleNestedObjectValueOf[BucketLifecycleConfigurationModelNoncurrentVersionExpiration]    `tfsdk:"noncurrent_version_expiration"`
	Status                         supertypes.StringValue                                                                                `tfsdk:"status"`
}

type BucketLifecycleConfigurationModelRules

type BucketLifecycleConfigurationModelRules []*BucketLifecycleConfigurationModelRule

func ToBucketLifecycleConfigurationModel

func ToBucketLifecycleConfigurationModel(ctx context.Context, lifecycle *s3.GetBucketLifecycleConfigurationOutput) (values BucketLifecycleConfigurationModelRules, diags diag.Diagnostics)

ToBucketLifecycleConfigurationModel converts a slice of *s3.GetBucketLifecycleConfigurationOutput to a slice of BucketLifecycleConfigurationModelRule.

type BucketLifecycleConfigurationModelTag

type BucketLifecycleConfigurationModelTag struct {
	Key   supertypes.StringValue `tfsdk:"key"`
	Value supertypes.StringValue `tfsdk:"value"`
}

type BucketLifecycleConfigurationResource

type BucketLifecycleConfigurationResource struct {
	// contains filtered or unexported fields
}

BucketLifecycleConfigurationResource is the resource implementation.

func (*BucketLifecycleConfigurationResource) Configure

func (*BucketLifecycleConfigurationResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketLifecycleConfigurationResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketLifecycleConfigurationResource) ImportState

func (*BucketLifecycleConfigurationResource) Init

Init Initializes the resource.

func (*BucketLifecycleConfigurationResource) Metadata

Metadata returns the resource type name.

func (*BucketLifecycleConfigurationResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketLifecycleConfigurationResource) Schema

Schema defines the schema for the resource.

func (*BucketLifecycleConfigurationResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BucketModel

type BucketModel struct {
	ID         supertypes.StringValue `tfsdk:"id"`
	Name       supertypes.StringValue `tfsdk:"name"`
	ObjectLock supertypes.BoolValue   `tfsdk:"object_lock"`
	Endpoint   supertypes.StringValue `tfsdk:"endpoint"`
}

func (*BucketModel) Copy

func (rm *BucketModel) Copy() *BucketModel

type BucketPolicyDataSource

type BucketPolicyDataSource struct {
	// contains filtered or unexported fields
}

func (*BucketPolicyDataSource) Configure

func (*BucketPolicyDataSource) Init

Init Initializes the data source.

func (*BucketPolicyDataSource) Metadata

func (*BucketPolicyDataSource) Read

func (*BucketPolicyDataSource) Schema

type BucketPolicyModel

type BucketPolicyModel struct {
	Bucket   supertypes.StringValue `tfsdk:"bucket"`
	ID       supertypes.StringValue `tfsdk:"id"`
	Policy   supertypes.StringValue `tfsdk:"policy"`
	Timeouts timeoutsR.Value        `tfsdk:"timeouts"`
}

func (*BucketPolicyModel) Copy

func (rm *BucketPolicyModel) Copy() any

func (*BucketPolicyModel) GetPolicy

func (rm *BucketPolicyModel) GetPolicy(ctx context.Context) string

GetTimeouts returns the value of the Timeouts field.

func (*BucketPolicyModel) SetID

func (rm *BucketPolicyModel) SetID(id *string)

SetID sets the value of the ID field.

func (*BucketPolicyModel) SetPolicy

func (rm *BucketPolicyModel) SetPolicy(policy string)

SetPolicy sets the value of the Policy field.

type BucketPolicyModelDatasource

type BucketPolicyModelDatasource struct {
	Bucket   supertypes.StringValue `tfsdk:"bucket"`
	ID       supertypes.StringValue `tfsdk:"id"`
	Policy   supertypes.StringValue `tfsdk:"policy"`
	Timeouts timeoutsD.Value        `tfsdk:"timeouts"`
}

func (*BucketPolicyModelDatasource) Copy

func (rm *BucketPolicyModelDatasource) Copy() any

func (*BucketPolicyModelDatasource) GetPolicy

func (*BucketPolicyModelDatasource) SetID

func (rm *BucketPolicyModelDatasource) SetID(id *string)

func (*BucketPolicyModelDatasource) SetPolicy

func (rm *BucketPolicyModelDatasource) SetPolicy(policy string)

SetPolicy sets the value of the Policy field.

type BucketPolicyResource

type BucketPolicyResource struct {
	// contains filtered or unexported fields
}

BucketPolicyResource is the resource implementation.

func (*BucketPolicyResource) Configure

func (*BucketPolicyResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketPolicyResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketPolicyResource) ImportState

func (*BucketPolicyResource) Init

Init Initializes the resource.

func (*BucketPolicyResource) Metadata

Metadata returns the resource type name.

func (*BucketPolicyResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketPolicyResource) Schema

Schema defines the schema for the resource.

func (*BucketPolicyResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BucketResource

type BucketResource struct {
	// contains filtered or unexported fields
}

BucketResource is the resource implementation.

func (*BucketResource) Configure

func (*BucketResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketResource) ImportState

func (*BucketResource) Init

func (r *BucketResource) Init(ctx context.Context, rm *BucketModel) (diags diag.Diagnostics)

Init Initializes the resource.

func (*BucketResource) Metadata

Metadata returns the resource type name.

func (*BucketResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketResource) Schema

Schema defines the schema for the resource.

func (*BucketResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BucketVersioningConfigurationDatasource

type BucketVersioningConfigurationDatasource struct {
	// contains filtered or unexported fields
}

func (*BucketVersioningConfigurationDatasource) Configure

func (*BucketVersioningConfigurationDatasource) Init

Init Initializes the data source.

func (*BucketVersioningConfigurationDatasource) Metadata

func (*BucketVersioningConfigurationDatasource) Read

func (*BucketVersioningConfigurationDatasource) Schema

type BucketVersioningConfigurationDatasourceModel

type BucketVersioningConfigurationDatasourceModel struct {
	Timeouts timeoutsD.Value        `tfsdk:"timeouts"`
	ID       supertypes.StringValue `tfsdk:"id"`
	Bucket   supertypes.StringValue `tfsdk:"bucket"`
	Status   supertypes.StringValue `tfsdk:"status"`
}

type BucketVersioningConfigurationModel

type BucketVersioningConfigurationModel struct {
	Timeouts timeoutsR.Value        `tfsdk:"timeouts"`
	ID       supertypes.StringValue `tfsdk:"id"`
	Bucket   supertypes.StringValue `tfsdk:"bucket"`
	Status   supertypes.StringValue `tfsdk:"status"`
}

func (*BucketVersioningConfigurationModel) Copy

type BucketVersioningConfigurationResource

type BucketVersioningConfigurationResource struct {
	// contains filtered or unexported fields
}

BucketVersioningConfigurationResource is the resource implementation.

func (*BucketVersioningConfigurationResource) Configure

func (*BucketVersioningConfigurationResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketVersioningConfigurationResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketVersioningConfigurationResource) ImportState

func (*BucketVersioningConfigurationResource) Init

Init Initializes the resource.

func (*BucketVersioningConfigurationResource) Metadata

Metadata returns the resource type name.

func (*BucketVersioningConfigurationResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketVersioningConfigurationResource) Schema

Schema defines the schema for the resource.

func (*BucketVersioningConfigurationResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BucketWebsiteConfigurationDataSource

type BucketWebsiteConfigurationDataSource struct {
	// contains filtered or unexported fields
}

func (*BucketWebsiteConfigurationDataSource) Configure

func (*BucketWebsiteConfigurationDataSource) Init

Init Initializes the data source.

func (*BucketWebsiteConfigurationDataSource) Metadata

func (*BucketWebsiteConfigurationDataSource) Read

func (*BucketWebsiteConfigurationDataSource) Schema

type BucketWebsiteConfigurationDataSourceModel

type BucketWebsiteConfigurationDataSourceModel struct {
	Timeouts              timeoutsD.Value                                                                            `tfsdk:"timeouts"`
	ID                    supertypes.StringValue                                                                     `tfsdk:"id"`
	Bucket                supertypes.StringValue                                                                     `tfsdk:"bucket"`
	ErrorDocument         supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelErrorDocument]         `tfsdk:"error_document"`
	IndexDocument         supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelIndexDocument]         `tfsdk:"index_document"`
	RedirectAllRequestsTo supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelRedirectAllRequestsTo] `tfsdk:"redirect_all_requests_to"`
	RoutingRules          supertypes.SetNestedObjectValueOf[BucketWebsiteConfigurationModelRoutingRule]              `tfsdk:"routing_rules"`
	WebsiteEndpoint       supertypes.StringValue                                                                     `tfsdk:"website_endpoint"`
}

func (*BucketWebsiteConfigurationDataSourceModel) Copy

func (*BucketWebsiteConfigurationDataSourceModel) SetErrorDocument

func (*BucketWebsiteConfigurationDataSourceModel) SetID

func (*BucketWebsiteConfigurationDataSourceModel) SetIndexDocument

func (*BucketWebsiteConfigurationDataSourceModel) SetRedirectAllRequestsTo

func (*BucketWebsiteConfigurationDataSourceModel) SetRoutingRules

func (*BucketWebsiteConfigurationDataSourceModel) SetWebsiteEnpoint

func (dm *BucketWebsiteConfigurationDataSourceModel) SetWebsiteEnpoint(endpoint string)

type BucketWebsiteConfigurationModel

type BucketWebsiteConfigurationModel struct {
	Timeouts              timeoutsR.Value                                                                            `tfsdk:"timeouts"`
	ID                    supertypes.StringValue                                                                     `tfsdk:"id"`
	Bucket                supertypes.StringValue                                                                     `tfsdk:"bucket"`
	ErrorDocument         supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelErrorDocument]         `tfsdk:"error_document"`
	IndexDocument         supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelIndexDocument]         `tfsdk:"index_document"`
	RedirectAllRequestsTo supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelRedirectAllRequestsTo] `tfsdk:"redirect_all_requests_to"`
	RoutingRules          supertypes.SetNestedObjectValueOf[BucketWebsiteConfigurationModelRoutingRule]              `tfsdk:"routing_rules"`
	WebsiteEndpoint       supertypes.StringValue                                                                     `tfsdk:"website_endpoint"`
}

func (*BucketWebsiteConfigurationModel) Copy

func (*BucketWebsiteConfigurationModel) CreateS3WebsiteConfigurationAPIObject

func (rm *BucketWebsiteConfigurationModel) CreateS3WebsiteConfigurationAPIObject(ctx context.Context) (websiteConfig *s3.WebsiteConfiguration, diags diag.Diagnostics)

func (*BucketWebsiteConfigurationModel) SetErrorDocument

func (*BucketWebsiteConfigurationModel) SetID

func (*BucketWebsiteConfigurationModel) SetIndexDocument

func (*BucketWebsiteConfigurationModel) SetRedirectAllRequestsTo

func (*BucketWebsiteConfigurationModel) SetRoutingRules

func (*BucketWebsiteConfigurationModel) SetWebsiteEnpoint

func (rm *BucketWebsiteConfigurationModel) SetWebsiteEnpoint(endpoint string)

type BucketWebsiteConfigurationModelCondition

type BucketWebsiteConfigurationModelCondition struct {
	HTTPErrorCodeReturnedEquals supertypes.StringValue `tfsdk:"http_error_code_returned_equals"`
	KeyPrefixEquals             supertypes.StringValue `tfsdk:"key_prefix_equals"`
}

type BucketWebsiteConfigurationModelErrorDocument

type BucketWebsiteConfigurationModelErrorDocument struct {
	Key supertypes.StringValue `tfsdk:"key"`
}

type BucketWebsiteConfigurationModelIndexDocument

type BucketWebsiteConfigurationModelIndexDocument struct {
	Suffix supertypes.StringValue `tfsdk:"suffix"`
}

type BucketWebsiteConfigurationModelRedirect

type BucketWebsiteConfigurationModelRedirect struct {
	HostName             supertypes.StringValue `tfsdk:"hostname"`
	HTTPRedirectCode     supertypes.StringValue `tfsdk:"http_redirect_code"`
	Protocol             supertypes.StringValue `tfsdk:"protocol"`
	ReplaceKeyPrefixWith supertypes.StringValue `tfsdk:"replace_key_prefix_with"`
	ReplaceKeyWith       supertypes.StringValue `tfsdk:"replace_key_with"`
}

type BucketWebsiteConfigurationModelRedirectAllRequestsTo

type BucketWebsiteConfigurationModelRedirectAllRequestsTo struct {
	HostName supertypes.StringValue `tfsdk:"hostname"`
	Protocol supertypes.StringValue `tfsdk:"protocol"`
}

type BucketWebsiteConfigurationModelRoutingRule

type BucketWebsiteConfigurationModelRoutingRule struct {
	Condition supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelCondition] `tfsdk:"condition"`
	Redirect  supertypes.SingleNestedObjectValueOf[BucketWebsiteConfigurationModelRedirect]  `tfsdk:"redirect"`
}

type BucketWebsiteConfigurationResource

type BucketWebsiteConfigurationResource struct {
	// contains filtered or unexported fields
}

BucketWebsiteConfigurationResource is the resource implementation.

func (*BucketWebsiteConfigurationResource) Configure

func (*BucketWebsiteConfigurationResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BucketWebsiteConfigurationResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BucketWebsiteConfigurationResource) ImportState

func (*BucketWebsiteConfigurationResource) Init

Init Initializes the resource.

func (*BucketWebsiteConfigurationResource) Metadata

Metadata returns the resource type name.

func (*BucketWebsiteConfigurationResource) Read

Read refreshes the Terraform state with the latest data.

func (*BucketWebsiteConfigurationResource) Schema

Schema defines the schema for the resource.

func (*BucketWebsiteConfigurationResource) Update

Update updates the resource and sets the updated Terraform state on success.

type CredentialModel

type CredentialModel struct {
	ID            supertypes.StringValue `tfsdk:"id"`
	Username      supertypes.StringValue `tfsdk:"username"`
	FileName      supertypes.StringValue `tfsdk:"file_name"`
	SaveInFile    supertypes.BoolValue   `tfsdk:"save_in_file"`
	PrintToken    supertypes.BoolValue   `tfsdk:"print_token"`
	SaveInTFState supertypes.BoolValue   `tfsdk:"save_in_tfstate"`
	AccessKey     supertypes.StringValue `tfsdk:"access_key"`
	SecretKey     supertypes.StringValue `tfsdk:"secret_key"`
}

func (*CredentialModel) Copy

func (rm *CredentialModel) Copy() *CredentialModel

type CredentialResource

type CredentialResource struct {
	// contains filtered or unexported fields
}

CredentialResource is the resource implementation.

func (*CredentialResource) Configure

func (*CredentialResource) Create

Create creates the resource and sets the initial Terraform state.

func (*CredentialResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*CredentialResource) Init

Init Initializes the resource.

func (*CredentialResource) Metadata

Metadata returns the resource type name.

func (*CredentialResource) ModifyPlan

func (*CredentialResource) Read

Read refreshes the Terraform state with the latest data.

func (*CredentialResource) Schema

Schema defines the schema for the resource.

func (*CredentialResource) Update

Update updates the resource and sets the updated Terraform state on success.

type RetryWhenConfig

type RetryWhenConfig[T any] struct {
	Timeout  time.Duration
	Interval time.Duration
	Function func() (T, error)
}

type UserDataSource added in v0.15.1

type UserDataSource struct {
	// contains filtered or unexported fields
}

func (*UserDataSource) Configure added in v0.15.1

func (*UserDataSource) Init added in v0.15.1

Init Initializes the data source.

func (*UserDataSource) Metadata added in v0.15.1

func (*UserDataSource) Read added in v0.15.1

func (*UserDataSource) Schema added in v0.15.1

type UserDataSourceModel added in v0.15.1

type UserDataSourceModel struct {
	ID          supertypes.StringValue `tfsdk:"id"`
	Username    supertypes.StringValue `tfsdk:"user_name"`
	UserID      supertypes.StringValue `tfsdk:"user_id"`
	FullName    supertypes.StringValue `tfsdk:"full_name"`
	CanonicalID supertypes.StringValue `tfsdk:"canonical_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL