diff --git a/tf/step2_cf_rt53/cloudfront.tf b/tf/step2_cf_rt53/cloudfront.tf index 3218bcb..bfb78db 100644 --- a/tf/step2_cf_rt53/cloudfront.tf +++ b/tf/step2_cf_rt53/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" @@ -54,4 +56,4 @@ resource "aws_cloudfront_distribution" "cdn_static_site" { aliases = [ var.domain_name ] -} \ No newline at end of file +}