Difference between revisions of "Terraform resource: aws s3 bucket website configuration"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== Example == | == Example == | ||
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration | https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration | ||
− | |||
− | |||
− | |||
− | + | resource "aws_s3_bucket_website_configuration" "example" { | |
− | + | bucket = aws_s3_bucket.example.bucket | |
− | + | ||
− | + | index_document { | |
− | + | suffix = "[[index.html]]" | |
− | + | } | |
− | + | ||
− | + | error_document { | |
− | + | key = "error.html" | |
− | + | } | |
− | + | ||
− | + | routing_rule { | |
− | + | condition { | |
− | + | key_prefix_equals = "docs/" | |
− | + | } | |
− | + | redirect { | |
− | } | + | replace_key_prefix_with = "documents/" |
− | + | } | |
+ | } | ||
+ | } | ||
== Related == | == Related == |
Revision as of 12:43, 7 March 2023
Example
resource "aws_s3_bucket_website_configuration" "example" { bucket = aws_s3_bucket.example.bucket index_document { suffix = "index.html" } error_document { key = "error.html" } routing_rule { condition { key_prefix_equals = "docs/" } redirect { replace_key_prefix_with = "documents/" } } }
Related
See also
- AWS S3,
aws s3, aws s3api, aws s3control, s3:
, Amazon S3 Storage Lens, AWS S3 replication, CRR, SSR, CAR, S3 Replication Time Control (S3 RTC), Website endpoint, Amazon Macie, Versioning, Lifecycle, Encryption, logging, Amazon S3 Inventory, Amazon S3 Batch Operations, Storage Classes, Amazon S3 clients, Terraform S3, AWS canned ACLs, Directory buckets, security,PutObject
Advertising: