TechToSpeech / terraform-aws-serverless-static-wordpress

Terraform module for deploying Serverless Static Wordpress on AWS
GNU General Public License v3.0
196 stars 69 forks source link

Error Bootstrapping VPC #44

Closed krutisfood closed 3 years ago

krutisfood commented 3 years ago

Attempting to run terraform apply with the example gives the following error


│ Error: Invalid count argument
│
│   on vpc_setup/vpc.tf line 92, in resource "aws_route_table_association" "main_subnets_public":
│   92:   count          = length(data.aws_subnet_ids.main_public.ids)
│
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many
│ instances will be created. To work around this, use the -target argument to first apply only the resources that the count depends
│ on.
╵
╷
│ Error: Invalid count argument
│
│   on vpc_setup/vpc.tf line 101, in resource "aws_route_table_association" "main_subnets_private":
│  101:   count          = length(data.aws_subnet_ids.main_private.ids)
│
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many
│ instances will be created. To work around this, use the -target argument to first apply only the resources that the count depends
│ on.```
petewilcock commented 3 years ago

Duplicate of https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues/38

VPC set-up bundled in the example isn't curated and in the meantime seems to have become incompatible with the latest version of Terraform. I'd suggest setting up your VPC by other means, either manually or using a much better VPC module :)