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

panic in function implementation: must not call MapVal with empty map #25303

Closed
ipmb opened this issue Jun 18, 2020 · 2 comments · Fixed by zclconf/go-cty#58 or #25400
Closed

panic in function implementation: must not call MapVal with empty map #25303

ipmb opened this issue Jun 18, 2020 · 2 comments · Fixed by zclconf/go-cty#58 or #25400
Assignees
Labels
bug config v0.13 Issues (primarily bugs) reported against v0.13 releases

Comments

@ipmb
Copy link

ipmb commented Jun 18, 2020

Terraform Version

Terraform v0.13.0-beta2

Terraform Configuration Files

module "client_vpc" {
  source          = "terraform-aws-modules/vpc/aws"
  name            = "clients"
  azs             = ["us-east-1a", "us-east-1b", "us-east-1c"]
  cidr            = "10.3.0.0/16"
  public_subnets  = ["10.3.0.0/24", "10.3.1.0/24", "10.3.2.0/24"]
  private_subnets = ["10.3.100.0/22", "10.3.104.0/22", "10.3.108.0/22"]

  enable_dns_hostnames                            = true
  enable_flow_log                                 = true
  flow_log_traffic_type                           = "REJECT"
  create_flow_log_cloudwatch_iam_role             = true
  create_flow_log_cloudwatch_log_group            = true
  flow_log_cloudwatch_log_group_retention_in_days = 14
  flow_log_cloudwatch_log_group_name_prefix       = "/aws/vpc-flow-logs/"
}

Debug Output

Crash Output

https://gist.github.com/ipmb/fcac64a32f0cac1d50d59062dbaca21e

Expected Behavior

Not crash :)

Actual Behavior

Panic

Steps to Reproduce

terraform plan

Additional Context

References

@apparentlymart apparentlymart added bug config v0.13 Issues (primarily bugs) reported against v0.13 releases labels Jun 18, 2020
@jurgenweber
Copy link

jurgenweber commented Jun 22, 2020

I am using the same module, I do not get this error on plan but when I am import a completely unrelated resource. Seems a bit weird to me.

$ tf import module.secrets.aws_kms_key.tf_enc_key bc901111ade7-7e41-42111111a-86cf-1234
module.secrets.aws_kms_key.tf_enc_key: Importing from ID "bc901111ade7-7e41-42111111a-86cf-1234"...
module.secrets.aws_kms_key.tf_enc_key: Import prepared!
  Prepared aws_kms_key for import
module.secrets.aws_kms_key.tf_enc_key: Refreshing state... [id=bc901111ade7-7e41-42111111a-86cf-1234]

Error: Error in function call

  on .terraform/modules/cluster.vpc/terraform-aws-vpc-2.44.0/main.tf line 20, in locals:
  20:   vpce_tags = merge(
  21:     var.tags,
  22:     var.vpc_endpoint_tags,
  23:   )
    |----------------
    | var.tags is empty map of string
    | var.vpc_endpoint_tags is empty map of string

I also have set for the module inputs, tags and vpc_endpoint_tags so their should be maps/content.

@ghost
Copy link

ghost commented Jul 24, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Jul 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug config v0.13 Issues (primarily bugs) reported against v0.13 releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants