Carina

Resource

aws.s3.BucketWebsiteConfiguration

Example

let bucket = aws.s3.Bucket {
  bucket = 'carina-example-website-bucket'

  tags = {
    Environment = 'example'
  }
}

aws.s3.BucketWebsiteConfiguration {
  bucket = bucket.bucket

  index_document = {
    # Upload an index object for each served prefix, or replace this suffix.
    suffix = 'index.html'
  }

  error_document = {
    # Upload this error object, or replace the key with one that exists.
    key = 'error.html'
  }
}

Argument Reference

bucket

The bucket name.

index_document

Index document for the bucket's website.

error_document

Custom error document key.

redirect_all_requests_to

Redirect all bucket-website requests to another host (alternative to index_document).

Enum Values

redirect_all_requests_to.protocol (Protocol)

Value DSL Identifier
http aws.s3.BucketWebsiteConfiguration.RedirectAllRequestsTo.Protocol.http
https aws.s3.BucketWebsiteConfiguration.RedirectAllRequestsTo.Protocol.https

Shorthand formats: http or Protocol.http

Struct Definitions

error_document

Field Type Required Description
key String Yes

index_document

Field Type Required Description
suffix String (pattern: /^[^/]+\z/ (Full)) Yes

redirect_all_requests_to

Field Type Required Description
host_name String Yes
protocol Protocol No