aws_s3_bucket_cors_configuration

package
v0.0.0-...-4deecce Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// Bucket: string, required
	Bucket terra.StringValue `hcl:"bucket,attr" validate:"required"`
	// ExpectedBucketOwner: string, optional
	ExpectedBucketOwner terra.StringValue `hcl:"expected_bucket_owner,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// CorsRule: min=1,max=100
	CorsRule []CorsRule `hcl:"cors_rule,block" validate:"min=1,max=100"`
}

Args contains the configurations for aws_s3_bucket_cors_configuration.

type CorsRule

type CorsRule struct {
	// AllowedHeaders: set of string, optional
	AllowedHeaders terra.SetValue[terra.StringValue] `hcl:"allowed_headers,attr"`
	// AllowedMethods: set of string, required
	AllowedMethods terra.SetValue[terra.StringValue] `hcl:"allowed_methods,attr" validate:"required"`
	// AllowedOrigins: set of string, required
	AllowedOrigins terra.SetValue[terra.StringValue] `hcl:"allowed_origins,attr" validate:"required"`
	// ExposeHeaders: set of string, optional
	ExposeHeaders terra.SetValue[terra.StringValue] `hcl:"expose_headers,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// MaxAgeSeconds: number, optional
	MaxAgeSeconds terra.NumberValue `hcl:"max_age_seconds,attr"`
}

type CorsRuleAttributes

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

func (CorsRuleAttributes) AllowedHeaders

func (cr CorsRuleAttributes) AllowedHeaders() terra.SetValue[terra.StringValue]

func (CorsRuleAttributes) AllowedMethods

func (cr CorsRuleAttributes) AllowedMethods() terra.SetValue[terra.StringValue]

func (CorsRuleAttributes) AllowedOrigins

func (cr CorsRuleAttributes) AllowedOrigins() terra.SetValue[terra.StringValue]

func (CorsRuleAttributes) ExposeHeaders

func (cr CorsRuleAttributes) ExposeHeaders() terra.SetValue[terra.StringValue]

func (CorsRuleAttributes) Id

func (CorsRuleAttributes) InternalRef

func (cr CorsRuleAttributes) InternalRef() (terra.Reference, error)

func (CorsRuleAttributes) InternalTokens

func (cr CorsRuleAttributes) InternalTokens() (hclwrite.Tokens, error)

func (CorsRuleAttributes) InternalWithRef

func (cr CorsRuleAttributes) InternalWithRef(ref terra.Reference) CorsRuleAttributes

func (CorsRuleAttributes) MaxAgeSeconds

func (cr CorsRuleAttributes) MaxAgeSeconds() terra.NumberValue

type CorsRuleState

type CorsRuleState struct {
	AllowedHeaders []string `json:"allowed_headers"`
	AllowedMethods []string `json:"allowed_methods"`
	AllowedOrigins []string `json:"allowed_origins"`
	ExposeHeaders  []string `json:"expose_headers"`
	Id             string   `json:"id"`
	MaxAgeSeconds  float64  `json:"max_age_seconds"`
}

type Resource

type Resource struct {
	Name string
	Args Args

	DependsOn terra.Dependencies
	Lifecycle *terra.Lifecycle
	// contains filtered or unexported fields
}

Resource represents the Terraform resource aws_s3_bucket_cors_configuration.

func New

func New(name string, args Args) *Resource

New creates a new instance of Resource.

func (*Resource) Attributes

func (asbcc *Resource) Attributes() awsS3BucketCorsConfigurationAttributes

Attributes returns the attributes for Resource.

func (*Resource) Configuration

func (asbcc *Resource) Configuration() interface{}

Configuration returns the configuration (args) for Resource.

func (*Resource) DependOn

func (asbcc *Resource) DependOn() terra.Reference

DependOn is used for other resources to depend on Resource.

func (*Resource) Dependencies

func (asbcc *Resource) Dependencies() terra.Dependencies

Dependencies returns the list of resources Resource depends_on.

func (*Resource) ImportState

func (asbcc *Resource) ImportState(state io.Reader) error

ImportState imports the given attribute values into Resource's state.

func (*Resource) LifecycleManagement

func (asbcc *Resource) LifecycleManagement() *terra.Lifecycle

LifecycleManagement returns the lifecycle block for Resource.

func (*Resource) LocalName

func (asbcc *Resource) LocalName() string

LocalName returns the local name for Resource.

func (*Resource) State

func (asbcc *Resource) State() (*awsS3BucketCorsConfigurationState, bool)

State returns the state and a bool indicating if Resource has state.

func (*Resource) StateMust

func (asbcc *Resource) StateMust() *awsS3BucketCorsConfigurationState

StateMust returns the state for Resource. Panics if the state is nil.

func (*Resource) Type

func (asbcc *Resource) Type() string

Type returns the Terraform object type for Resource.

Jump to

Keyboard shortcuts

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