Skip to content

Commit edfd283

Browse files
aws_security_group.vpc_origin must wait for CloudFront to create the VPC origin's SG
1 parent ddbc033 commit edfd283

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/complete/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,9 @@ module "security_group_ec2" {
479479
data "aws_availability_zones" "available" {}
480480

481481
data "aws_security_group" "vpc_origin" {
482-
name = "CloudFront-VPCOrigins-Service-SG"
483-
vpc_id = module.vpc.vpc_id
482+
name = "CloudFront-VPCOrigins-Service-SG"
483+
vpc_id = module.vpc.vpc_id
484+
depends_on = [module.cloudfront]
484485
}
485486

486487
data "aws_ami" "al2023" {

0 commit comments

Comments
 (0)