diff --git a/tf/step2_cf-only/cloudfront.tf b/tf/step2_cf-only/cloudfront.tf index b0a9e26..216e0fa 100644 --- a/tf/step2_cf-only/cloudfront.tf +++ b/tf/step2_cf-only/cloudfront.tf @@ -14,6 +14,8 @@ resource "aws_cloudfront_distribution" "cdn_static_site" { default_root_object = "index.html" comment = "Cloudfront in front of s3 bucket" + wait_for_deployment = true + origin { domain_name = aws_s3_bucket.week1-bucket.bucket_regional_domain_name origin_id = "s3-origin" @@ -48,4 +50,4 @@ resource "aws_cloudfront_distribution" "cdn_static_site" { viewer_certificate { cloudfront_default_certificate = true } -} \ No newline at end of file +}