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
- Type:
String - Required: Yes
The bucket name.
index_document
- Type: Struct(IndexDocument)
- Required: No
Index document for the bucket's website.
error_document
- Type: Struct(ErrorDocument)
- Required: No
Custom error document key.
redirect_all_requests_to
- Type: Struct(RedirectAllRequestsTo)
- Required: No
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 |