mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: Improvde the Cloudfront documentation when using s3 origins (#10087)
This commit is contained in:
parent
b03af1416e
commit
7f69f37318
@ -25,9 +25,18 @@ want to wait, you need to use the `retain_on_delete` flag.
|
|||||||
The following example below creates a CloudFront distribution with an S3 origin.
|
The following example below creates a CloudFront distribution with an S3 origin.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
resource "aws_s3_bucket" "b" {
|
||||||
|
bucket = "mybucket"
|
||||||
|
acl = "private"
|
||||||
|
|
||||||
|
tags {
|
||||||
|
Name = "My bucket"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_cloudfront_distribution" "s3_distribution" {
|
resource "aws_cloudfront_distribution" "s3_distribution" {
|
||||||
origin {
|
origin {
|
||||||
domain_name = "mybucket.s3.amazonaws.com"
|
domain_name = "${aws_s3_bucket.b.bucket}.s3.amazonaws.com"
|
||||||
origin_id = "myS3Origin"
|
origin_id = "myS3Origin"
|
||||||
|
|
||||||
s3_origin_config {
|
s3_origin_config {
|
||||||
|
Loading…
Reference in New Issue
Block a user