terraform-community-modules / tf_aws_vpc

[DEPRECATED] Use https://github.com/terraform-aws-modules/terraform-aws-vpc
Other
210 stars 203 forks source link

v1.0.3 syntax error during terraform get #38

Closed rjminsha closed 7 years ago

rjminsha commented 7 years ago

Summary

Version 1.0.3 appears to fail with the basic example (parse error) while 1.0.2 does not.

Details

Using the example for the readme

module "vpc" {
  source = "github.com/terraform-community-modules/tf_aws_vpc?ref=v1.0.3"

  name = "my-vpc"

  cidr = "10.0.0.0/16"
  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]

  enable_nat_gateway = "true"

  azs      = ["us-west-2a", "us-west-2b", "us-west-2c"]

#  tags {
#    "Terraform" = "true"
#    "Environment" = "${var.environment}"
#  }
}

results in Error loading Terraform: Error downloading modules: module vpc: Error loading .terraform/modules/f683cc22d7f23e2714d32c75c7088cd4/main.tf: parse error: syntax error

Backing up to 1.0.2 does not have this problem.

antonbabenko commented 7 years ago

Here is the diff - https://github.com/terraform-community-modules/tf_aws_vpc/compare/v1.0.2...v1.0.3

I can't reproduce it on 0.9.1, but I can see that there should be tags = { instead of tags { in the README example.

Does it help if you empty .terraform/modules directory before running get or init ?

antonbabenko commented 7 years ago

Silence = problem solved. Please comment, if not.