Terraform resource: aws s3 bucket cors configuration
Jump to navigation
Jump to search
Official example[edit]
resource "aws_s3_bucket" "example" { bucket = "mybucket" } resource "aws_s3_bucket_cors_configuration" "example" { bucket = aws_s3_bucket.example.id cors_rule { allowed_headers = ["*"] allowed_methods = ["PUT", "POST"] allowed_origins = ["https://s3-website-test.hashicorp.com"] expose_headers = ["ETag"] max_age_seconds = 3000 } cors_rule { allowed_methods = ["GET"] allowed_origins = ["*"] } }
Related[edit]
See also[edit]
- Terraform S3 resources:
aws_s3_bucket, aws_s3_object, aws_s3_bucket_policy, aws_s3_bucket_acl, aws_s3_bucket_website_configuration, aws_s3_bucket cors_configuration, aws_s3_account_public_access_block
, Terraform module: s3-bucket,aws_s3_bucket_versioning, aws_s3_bucket_server_side_encryption_configuration, aws_s3_bucket_logging
- CORS, HSTS,
Access-Control-Allow-Origin
, Enabling CORS for a REST API resource, Lighthouse bn --http --http-allow-origin,Caddyfile, gsutil cors, cors_rule, aws_s3_bucket_cors_configuration
,geth --http.corsdomain
, Preflighted requests, CORS (golang)
Advertising: