Skip to content

Error Bootstrapping VPC #44

Closed
Closed
@krutisfood

Description

@krutisfood

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.```

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions