Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug with tags module #73

Closed
jslevin4 opened this issue Aug 10, 2022 · 6 comments
Closed

Possible bug with tags module #73

jslevin4 opened this issue Aug 10, 2022 · 6 comments

Comments

@jslevin4
Copy link

jslevin4 commented Aug 10, 2022

We are seeing an error recently. Our use of the module looks like this:

module "vpc" {
  source  = "aws-ia/vpc/aws"
  version = ">= 1.0.0"
...

And we're seeing this now in the terraform output:

Error: Unsupported argument

  on .terraform/modules/vpc/data.tf line 68, in module "tags":
  68:   tags = var.tags

An argument named "tags" is not expected here.

Hmm. Any ideas? Thanks!

@jslevin4
Copy link
Author

Not sure what this is. I know this line 68 in data.tf hasn't changed in a while, so maybe this is something unrelated. Thanks.

@jslevin4
Copy link
Author

This appeared to only happen when we were using terraform v1.2.7. Reverting to v1.2.6 caused it to start working again.

@drewmullen
Copy link
Contributor

drewmullen commented Aug 11, 2022

👋 Thanks for opening this issue! I'm not currently able to replicate 🤔

I've updated to 1.2.7 and I'm passing

module "vpc" {
  source  = "aws-ia/vpc/aws"
  version = ">= 2.0.0"

  name       = "multi-az-vpc"
  cidr_block = "10.0.0.0/20"
  az_count   = 2

  subnets = {
    public = {
      name_prefix               = "my-public" # omit to prefix with "public"
      netmask                   = 24
      nat_gateway_configuration = "all_azs" # options: "single_az", "none"
    }

    private = {
      # omitting name_prefix defaults value to "private"
      # name_prefix  = "private"
      netmask                 = 24
      connect_to_public_natgw = true
    }
  }

  vpc_flow_logs = {
    log_destination_type = "cloud-watch-logs"
    retention_in_days    = 180
    kms_key_id           = var.kms_key_id
  }

  tags = {
    "key" = "value"
  }
}

@jslevin4
Copy link
Author

Ah that's great that it's still working for you. Our team here at ASU seemed to think it was related to this issue in Terraform 1.2.7: hashicorp/terraform#31615
And we're still on version 1 of the vpc module for now until we migrate. But I think we have a workaround for now. Thanks!

@jslevin4
Copy link
Author

And apparently it seems that issue is related to caching of modules in the terraform registry, not necessarily to any changes in terraform 1.2.7. What a tangled web we weave.. Hehe.

@drewmullen
Copy link
Contributor

very glad there was no issue! again, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants