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

Terraform AWS Provider plugin v2.64.0 failed on err: unexpected EOF panic: unknown value type in TypeMap bool #13549

Closed
izzyleung opened this issue May 29, 2020 · 18 comments · Fixed by #13604
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Milestone

Comments

@izzyleung
Copy link

izzyleung commented May 29, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform: 0.10.8
AWS Provider: 2.64

Affected Resource(s)

TBD

  • aws_XXXXX

Terraform Configuration Files

TBD

Debug Output

TBD

Panic Output

[19:14:36]W:   [Step 2/2]  [1m [31mError:  [0m [0m [1mError running plan: 1 error(s) occurred:
[19:14:36]W:   [Step 2/2] 
[19:14:36]W:   [Step 2/2] * module.MY_MODULE.aws_autoscaling_group.app: 1 error(s) occurred:
[19:14:36]W:   [Step 2/2] 
[19:14:36]W:   [Step 2/2] * module.MY_MODULE.aws_autoscaling_group.app: unexpected EOF [0m
[19:14:36]W:   [Step 2/2] 
[19:14:36]W:   [Step 2/2]  [0m [0m [0m
[19:14:36]W:   [Step 2/2] panic: unknown value type in TypeMap bool
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: 
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: goroutine 2395 [running]:
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.SerializeValueForHash(0xc004cd8a80, 0x4d37480, 0xc0001f15c0, 0xc0035e48c0)
[19:14:36] :   [Step 2/2] 
[19:14:36] :   [Step 2/2] 
[19:14:36] :   [Step 2/2] !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go:61 +0x8ca
[19:14:36] :   [Step 2/2] 
[19:14:36] :   [Step 2/2] Terraform crashed! This is always indicative of a bug within Terraform.
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.HashSchema.func1(0x4d37480, 0xc0001f15c0, 0x1)
[19:14:36] :   [Step 2/2] A crash log has been placed at "crash.log" relative to your current
[19:14:36] :   [Step 2/2] working directory. It would be immensely helpful if you could please
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go:43 +0x68
[19:14:36] :   [Step 2/2] report the crash with Terraform[1] so that we can fix this.
[19:14:36] :   [Step 2/2] 
[19:14:36] :   [Step 2/2] When reporting bugs, please include your terraform version. That
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).hash(0xc0013f8260, 0x4d37480, 0xc0001f15c0, 0xc00256aa00, 0x0)
[19:14:36] :   [Step 2/2] information is available on the first line of crash.log. You can also
[19:14:36] :   [Step 2/2] get it by running 'terraform --version' on the command line.
[19:14:36] :   [Step 2/2] 
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go:254 +0x3d
[19:14:36] :   [Step 2/2] [1]: https://github.com/hashicorp/terraform/issues
[19:14:36] :   [Step 2/2] 
[19:14:36] :   [Step 2/2] !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).add(0xc0013f8260, 0x4d37480, 0xc0001f15c0, 0xc0035e4a00, 0x0, 0xc004caf9b0)
[19:14:36] :   [Step 2/2] /opt/buildagent/work/a0dd5e64201c1a18
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go:231 +0x83
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readSet(0xc0001f03f0, 0xc000c57d10, 0x1, 0x1, 0xc0035e4a00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_config.go:309 +0x329
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readField(0xc0001f03f0, 0xc000c57d10, 0x1, 0x1, 0xc003200d00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_config.go:132 +0x97f
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).ReadField(0xc0001f03f0, 0xc000c57d10, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc003375ec0, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_config.go:28 +0xae
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*MultiLevelFieldReader).ReadFieldExact(0xc0025b9b60, 0xc000c57d10, 0x1, 0x1, 0x5a108b6, 0x6, 0x0, 0x0, 0x0, 0x0, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_multi.go:31 +0xd0
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).get(0xc002cc0700, 0xc000c57d10, 0x1, 0x1, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go:535 +0xfa
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).getChange(0xc002cc0700, 0x5a0e900, 0x4, 0x1201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go:511 +0x122
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).diffChange(0xc002cc0700, 0x5a0e900, 0x4, 0x198, 0x5a9ed94, 0x1, 0x0, 0x0)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go:488 +0x97
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.diffSet(0xc0035c4d50, 0x5a0e900, 0x4, 0xc0035e4a00, 0xc004cd97a8, 0x6434860, 0xc002cc0700, 0x42d200, 0x0, 0x0)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:1217 +0x66
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.diff(0xc0035c4d50, 0x5a0e900, 0x4, 0xc0035e4a00, 0xc0025b9a00, 0x6434860, 0xc002cc0700, 0x0, 0x0, 0x0)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:958 +0x558
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.Diff(0xc0035c4d50, 0xc003136460, 0xc004c9f440, 0xc004ad8100, 0x4f27dc0, 0xc004080500, 0xc00430f101, 0x412a06, 0x5a4ddc2, 0xc004c54f40)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:506 +0x215
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Diff(0xc0035d8990, 0xc003136460, 0xc004c9f440, 0x4f27dc0, 0xc004080500, 0x1, 0xc000bedba8, 0x40be26)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:335 +0x178
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Diff(0xc004a2c480, 0xc004c91200, 0xc003136460, 0xc004c9f440, 0xc0001f0180, 0xc00430f110, 0x18)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:307 +0x99
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/plugin.(*ResourceProviderServer).Diff(0xc002a77e60, 0xc0025b8f40, 0xc000c379f0, 0x0, 0x0)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/plugin/resource_provider.go:541 +0x57
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: reflect.Value.call(0xc000e3cfc0, 0xc002300d48, 0x13, 0x5a0dfd4, 0x4, 0xc000bedf18, 0x3, 0x3, 0xc001bf4738, 0x62171c, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/goenv/versions/1.13.7/src/reflect/value.go:460 +0x5f6
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: reflect.Value.Call(0xc000e3cfc0, 0xc002300d48, 0x13, 0xc001bf4718, 0x3, 0x3, 0x3, 0x641d9a0, 0x2c)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/goenv/versions/1.13.7/src/reflect/value.go:321 +0xb4
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: net/rpc.(*service).call(0xc00331b180, 0xc003213e00, 0xc00366bf60, 0xc00366bf70, 0xc003950080, 0xc003116a00, 0x4709fe0, 0xc0025b8f40, 0x16, 0x470a020, ...)
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/goenv/versions/1.13.7/src/net/rpc/server.go:377 +0x16f
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: created by net/rpc.(*Server).ServeCodec
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.554Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:  /opt/goenv/versions/1.13.7/src/net/rpc/server.go:474 +0x42b
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [ERROR] root.MY_MODULE: eval: *terraform.EvalDiff, err: unexpected EOF
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [ERROR] root.MY_MODULE: eval: *terraform.EvalSequence, err: unexpected EOF
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.564Z [DEBUG] plugin: plugin process exited: path=/opt/buildagent/work/a0dd5e64201c1a18/terraform/MY_MODULE/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.64.0_x4
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] [walkPlan] Exiting eval tree: module.MY_MODULE.aws_autoscaling_group.app
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "module.MY_MODULE.output.asg_name"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "aws_autoscaling_policy.MY_MODULE-scaling-policy"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "module.MY_MODULE.aws_autoscaling_lifecycle_hook.my-asg-lifecycle-hook"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "module.MY_MODULE.output.asg_name_array"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "provider.aws (close)"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [TRACE] dag/walk: upstream errored, not walking "root"
[19:14:36]W:   [Step 2/2] 2020/05/29 02:14:36 [DEBUG] plugin: waiting for all plugin processes to complete...
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.565Z [WARN ] plugin: error closing client during Kill: err="connection is shut down"
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.565Z [DEBUG] plugin.terraform-provider-template_v2.1.2_x4: 2020/05/29 02:14:36 [ERR] plugin: plugin server: accept unix /opt/buildagent/temp/buildTmp/plugin481085501: use of closed network connection
[19:14:36]W:   [Step 2/2] 2020-05-29T02:14:36.566Z [DEBUG] plugin: plugin process exited: path=/opt/buildagent/work/a0dd5e64201c1a18/terraform/MY_MODULE/.terraform/plugins/linux_amd64/terraform-provider-template_v2.1.2_x4

Expected Behavior

Terraform should run plan without any issue. Which is the case if provider version 2.63 is used.

Actual Behavior

Terraform quitted with panic as a result of the above log.

Steps to Reproduce

  1. terraform plan
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 29, 2020
@izzyleung izzyleung changed the title Terraform Terraform AWS Provider plugin v2.64.0 failed on eval: *terraform.EvalSequence, err: unexpected EOF May 29, 2020
@ghost ghost added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels May 29, 2020
@izzyleung izzyleung changed the title Terraform AWS Provider plugin v2.64.0 failed on eval: *terraform.EvalSequence, err: unexpected EOF Terraform AWS Provider plugin v2.64.0 failed on err: unexpected EOF panic: unknown value type in TypeMap bool May 29, 2020
@franzramadhan
Copy link

franzramadhan commented May 29, 2020

Same issue with below setup:

Terraform: v0.11.14
AWS Provider: 2.64

@rajaganeshh
Copy link

rajaganeshh commented May 29, 2020

We are also facing the same Issue.

Terraform: 0.11
AWS: 2.64

panic: unknown value type in TypeMap bool
2020-05-29T10:37:09.580Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:

We haven't faced any issue with the below versions.

Terraform: 0.11
AWS: 2.63

@HongChenTW
Copy link

HongChenTW commented May 29, 2020

Facing same issue, too.
Version:

Terraform: v0.11.14
AWS Provider: 2.64

We temporary make the bool value surrounded by double quotes " to solve the issue.
e.g.

 tags = [
   {
     key                 = "env"
     value               = "prod"
     propagate_at_launch = "true"
   }
]

Since terraform 0.11 document mentions:

It is recommended for now to specify boolean values for variables as the strings "true" and "false", to avoid some caveats in the conversion process. A future version of Terraform will properly support boolean values and so relying on the current behavior could result in backwards-incompatibilities at that time.

reference:
https://www.terraform.io/docs/configuration-0-11/variables.html#booleans

@bflad bflad added service/autoscaling Issues and PRs that pertain to the autoscaling service. and removed needs-triage Waiting for first response or review from a maintainer. labels May 29, 2020
@bflad bflad added this to the v2.65.0 milestone May 29, 2020
@rajaganeshh
Copy link

Facing same issue, too.
Version:

Terraform: v0.11.14
AWS Provider: 2.64

We temporary make the bool value surrounded double quote " to solve the issue.
e.g.

 tags = [
   {
     key                 = "env"
     value               = "prod"
     propagate_at_launch = "true"
   }
]

Since terraform 0.11 document mentions:

It is recommended for now to specify boolean values for variables as the strings "true" and "false", to avoid some caveats in the conversion process. A future version of Terraform will properly support boolean values and so relying on the current behavior could result in backwards-incompatibilities at that time.

reference:
https://www.terraform.io/docs/configuration-0-11/variables.html#booleans

Thanks for sharing the details

@bflad
Copy link
Contributor

bflad commented May 29, 2020

Quick question: Is anyone experiencing this with Terraform 0.12?

bflad added a commit to bflad/terraform-plugin-sdk that referenced this issue May 29, 2020
Reference: hashicorp/terraform-provider-aws#13549

This may only be an issue with Terraform 0.11 and earlier with an obscure schema of:

```go
"attr": {
	Type:     schema.TypeSet,
	Optional: true,
	Elem: &schema.Schema{
		Type: schema.TypeMap,
		Elem: &schema.Schema{
			Type: schema.TypeString,
		},
},
```

Previously, this would panic (with updated test):

```console
$ go test ./helper/schema -run=TestSerializeForHash
--- FAIL: TestSerializeForHash (0.00s)
panic: unknown value type in TypeMap bool [recovered]
  panic: unknown value type in TypeMap bool

goroutine 5 [running]:
testing.tRunner.func1.1(0x1a4a5e0, 0xc0004b9920)
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:940 +0x2f5
testing.tRunner.func1(0xc000372c60)
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:943 +0x3f9
panic(0x1a4a5e0, 0xc0004b9920)
  /usr/local/Cellar/go/1.14.3/libexec/src/runtime/panic.go:969 +0x166
github.com/hashicorp/terraform-plugin-sdk/helper/schema.SerializeValueForHash(0xc000085bb8, 0x1aaef40, 0xc000528450, 0xc000531400)
  /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go:61 +0x8c9
github.com/hashicorp/terraform-plugin-sdk/helper/schema.TestSerializeForHash(0xc000372c60)
  /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize_test.go:230 +0x1520
testing.tRunner(0xc000372c60, 0x1c2e848)
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:991 +0xdc
created by testing.(*T).Run
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:1042 +0x357
FAIL  github.com/hashicorp/terraform-plugin-sdk/helper/schema 5.797s
```
appilon pushed a commit to hashicorp/terraform-plugin-sdk that referenced this issue May 29, 2020
Reference: hashicorp/terraform-provider-aws#13549

This may only be an issue with Terraform 0.11 and earlier with an obscure schema of:

```go
"attr": {
	Type:     schema.TypeSet,
	Optional: true,
	Elem: &schema.Schema{
		Type: schema.TypeMap,
		Elem: &schema.Schema{
			Type: schema.TypeString,
		},
},
```

Previously, this would panic (with updated test):

```console
$ go test ./helper/schema -run=TestSerializeForHash
--- FAIL: TestSerializeForHash (0.00s)
panic: unknown value type in TypeMap bool [recovered]
  panic: unknown value type in TypeMap bool

goroutine 5 [running]:
testing.tRunner.func1.1(0x1a4a5e0, 0xc0004b9920)
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:940 +0x2f5
testing.tRunner.func1(0xc000372c60)
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:943 +0x3f9
panic(0x1a4a5e0, 0xc0004b9920)
  /usr/local/Cellar/go/1.14.3/libexec/src/runtime/panic.go:969 +0x166
github.com/hashicorp/terraform-plugin-sdk/helper/schema.SerializeValueForHash(0xc000085bb8, 0x1aaef40, 0xc000528450, 0xc000531400)
  /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go:61 +0x8c9
github.com/hashicorp/terraform-plugin-sdk/helper/schema.TestSerializeForHash(0xc000372c60)
  /Users/bflad/src/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize_test.go:230 +0x1520
testing.tRunner(0xc000372c60, 0x1c2e848)
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:991 +0xdc
created by testing.(*T).Run
  /usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:1042 +0x357
FAIL  github.com/hashicorp/terraform-plugin-sdk/helper/schema 5.797s
```
@rindeastwood
Copy link

Same issue with:

  • Terraform: v0.11.11
  • AWS Provider: 2.64

@williamzoop
Copy link

Quick question: Is anyone experiencing this with Terraform 0.12?

I tested with terraform 0.12.20 and 0.12.26 with no problems.

@jcmcken
Copy link

jcmcken commented May 29, 2020

Same issue with 0.11.13 and 2.64

1 similar comment
@a1sethi
Copy link

a1sethi commented May 29, 2020

Same issue with 0.11.13 and 2.64

@tsouza85
Copy link

Same issue with:

Terraform: v0.11.14
AWS Provider: 2.64

@mstanlis
Copy link

One of my team members found that if we change propagate_on_launch = true to propagate_on_launch = "true" it works around this issue.

@arunjayanth
Copy link

arunjayanth commented Jun 1, 2020

Same issue with terraform v0.11.11 and aws provider 2.64.0


* module.ecs.module.proxy_ASGs.aws_autoscaling_group.launch_tmpl: 1 error(s) occurred:

* module.ecs.module.proxy_ASGs.aws_autoscaling_group.launch_tmpl: unexpected EOF
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam: 8 error(s) occurred:

* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[1]: connection is shut down
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[5]: unexpected EOF
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[0]: unexpected EOF
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[6]: connection is shut down
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[3]: connection is shut down
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[7]: unexpected EOF
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[4]: unexpected EOF
* module.ecs.module.ecs_listeners.module.vault_internal_certs.data.aws_iam_server_certificate.vault_cert_iam[2]: connection is shut down


panic: unknown value type in TypeMap bool

@abhishek-srivastava-1183

Same issue with terraform v0.11.11 and aws provider 2.64.0

22:14:25 panic: unknown value type in TypeMap bool
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4:
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: goroutine 1617 [running]:
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.SerializeValueForHash(0xc000166a80, 0x4d37480, 0xc000e509f0, 0xc0009ef680)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go:61 +0x8ca
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.HashSchema.func1(0x4d37480, 0xc000e509f0, 0x1)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go:43 +0x68
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).hash(0xc0006ec5a0, 0x4d37480, 0xc000e509f0, 0xc00057d780, 0x1)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go:254 +0x3d
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Set).add(0xc0006ec5a0, 0x4d37480, 0xc000e509f0, 0xc0009ef700, 0x0, 0xc0006ea8d0)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go:231 +0x83
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readSet(0xc0010cc240, 0xc0006ba990, 0x1, 0x1, 0xc0009ef7c0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_config.go:309 +0x329
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).readField(0xc0010cc240, 0xc0006ba990, 0x1, 0x1, 0xc00000e500, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_config.go:132 +0x97f
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ConfigFieldReader).ReadField(0xc0010cc240, 0xc0006ba990, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00074b0c0, ...)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_config.go:28 +0xae
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*MultiLevelFieldReader).ReadFieldExact(0xc00000dbc0, 0xc0006ba990, 0x1, 0x1, 0x5a108b6, 0x6, 0x0, 0x0, 0x0, 0x0, ...)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader_multi.go:31 +0xd0
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).get(0xc000872850, 0xc0006ba990, 0x1, 0x1, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go:535 +0xfa
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).getChange(0xc000872850, 0x5a0e900, 0x4, 0x4a1201, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go:511 +0x122
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*ResourceData).diffChange(0xc000872850, 0x5a0e900, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go:488 +0x97
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.diffSet(0xc0011c8f60, 0x5a0e900, 0x4, 0xc0009ef7c0, 0xc0001677a8, 0x6434860, 0xc000872850, 0x42d200, 0x0, 0x0)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:1217 +0x66
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.diff(0xc0011c8f60, 0x5a0e900, 0x4, 0xc0009ef7c0, 0xc0004cdc00, 0x6434860, 0xc000872850, 0x0, 0x0, 0x0)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:958 +0x558
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.Diff(0xc0011c8f60, 0xc00098ce10, 0xc0010216b0, 0xc0004ee240, 0x4f27dc0, 0xc0004b2500, 0xc000477701, 0x412a06, 0x5a4ddc2, 0xc000df3460)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:506 +0x215
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Diff(0xc0009f0120, 0xc00098ce10, 0xc0010216b0, 0x4f27dc0, 0xc0004b2500, 0x1, 0xc00019dba8, 0x40be26)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:335 +0x178
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Diff(0xc000a0a000, 0xc000dcb5c0, 0xc00098ce10, 0xc0010216b0, 0xc001131f80, 0xc000477770, 0x18)
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:307 +0x99
22:14:25 2020-06-01T16:44:25.801Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: github.com/hashicorp/terraform-plugin-sdk/plugin.(*ResourceProviderServer).Diff(0xc0004f5160, 0xc00042fa20, 0xc00110f6b0, 0x0, 0x0)
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/plugin/resource_provider.go:541 +0x57
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: reflect.Value.call(0xc000962360, 0xc0010743d0, 0x13, 0x5a0dfd4, 0x4, 0xc00019df18, 0x3, 0x3, 0x40523a, 0xc00004ca80, ...)
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/goenv/versions/1.13.7/src/reflect/value.go:460 +0x5f6
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: reflect.Value.Call(0xc000962360, 0xc0010743d0, 0x13, 0xc000018f18, 0x3, 0x3, 0xc00004ca80, 0xc000018ef8, 0x404d15)
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/goenv/versions/1.13.7/src/reflect/value.go:321 +0xb4
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: net/rpc.(*service).call(0xc00023e200, 0xc0008aa780, 0xc0004f1590, 0xc0004f15a0, 0xc000a0a280, 0xc0004f5740, 0x4709fe0, 0xc00042fa20, 0x16, 0x470a020, ...)
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/goenv/versions/1.13.7/src/net/rpc/server.go:377 +0x16f
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: created by net/rpc.(*Server).ServeCodec
22:14:25 2020-06-01T16:44:25.802Z [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4: /opt/goenv/versions/1.13.7/src/net/rpc/server.go:474 +0x42b
22:14:25 2020/06/01 16:44:25 [TRACE] root.APIGateway: eval: *terraform.EvalGetProvider
22:14:25 2020/06/01 16:44:25 [TRACE] root.APIGateway: eval: *terraform.EvalValidateResource
22:14:25 2020/06/01 16:44:25 [ERROR] root.APIGateway: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [ERROR] root.APIGateway: eval: *terraform.EvalSequence, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [ERROR] root.DocumentDB: eval: *terraform.EvalDiff, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [ERROR] root.DocumentDB: eval: *terraform.EvalSequence, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.DocumentDB.aws_docdb_cluster.docdb
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.APIGateway.aws_api_gateway_method_settings.api_settings
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.DocumentDB.output.documentdb-endpoint"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.S3-And-Lambda.var.docdb_endpoint"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.S3-And-Lambda.aws_lambda_function.metadata_writer"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.S3-And-Lambda.output.aws_lambda_function_name"
22:14:25 2020/06/01 16:44:25 [ERROR] root.ec2-start-stop: eval: *terraform.EvalDiff, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [ERROR] root.LoadBalancer-And-Instances: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [ERROR] root.LoadBalancer-And-Instances: eval: *terraform.EvalSequence, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.LoadBalancer-And-Instances.aws_alb_listener.alb-listener
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.DocumentDB.output.aws_docdb_cluster_id"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.var.aws_docdb_cluster_id"
22:14:25 2020/06/01 16:44:25 [ERROR] root.monitoring: eval: *terraform.EvalDiff, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [ERROR] root.monitoring: eval: *terraform.EvalSequence, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.monitoring.aws_cloudwatch_metric_alarm.ecs-alert-high-cpu
22:14:25 2020-06-01T16:44:25.805Z [DEBUG] plugin: plugin process exited: path=/var/lib/jenkins/workspace/Loyalty-LSA-Phase1-Deployment-apply/project_onboarding/Loyalty-LSA/prod/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.64.0_x4
22:14:25 2020/06/01 16:44:25 [ERROR] root.ec2-start-stop: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [ERROR] root.ec2-start-stop: eval: *terraform.EvalSequence, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.ec2-start-stop.aws_cloudwatch_event_target.StartEC2Instances_cloudwatch_event_target
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.var.docdb_endpoint"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.S3-And-Lambda.aws_lambda_permission.lambda_permission"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.data.template_file.loyalty_lsa_task"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.DocumentDB.aws_docdb_cluster_instance.docdb_instances"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.S3-And-Lambda.aws_s3_bucket_notification.loyalty_lsa_s3_lambda_execution"
22:14:25 2020/06/01 16:44:25 [ERROR] root.ec2-start-stop: eval: *terraform.EvalSequence, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.ec2-start-stop.aws_lambda_permission.StartEC2Instances_cloudwatch_lambda_permission
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.aws_ecs_task_definition.loyalty_lsa"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.data.aws_ecs_task_definition.loyalty_lsa"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.aws_ecs_service.loyalty_lsa"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "provisioner.local-exec (close)"
22:14:25 2020/06/01 16:44:25 [ERROR] root.LoadBalancer-And-Instances: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [ERROR] root.LoadBalancer-And-Instances: eval: *terraform.EvalSequence, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.LoadBalancer-And-Instances.aws_lb_listener.alb-listener-https
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.aws_appautoscaling_target.ecs_target"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.aws_appautoscaling_policy.ecs_memory_policy"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.var.aws_lambda_function_name"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.Containers.aws_appautoscaling_policy.ecs_cpu_policy"
22:14:25 2020/06/01 16:44:25 [ERROR] root.monitoring: eval: *terraform.EvalDiff, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [ERROR] root.monitoring: eval: *terraform.EvalSequence, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.monitoring.aws_cloudwatch_metric_alarm.health_check_status
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.aws_cloudwatch_metric_alarm.lambda-duration-alert"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.aws_cloudwatch_metric_alarm.lambda-duration-error-alert"
22:14:25 2020/06/01 16:44:25 [ERROR] root.LoadBalancer-And-Instances: eval: *terraform.EvalDiff, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [ERROR] root.LoadBalancer-And-Instances: eval: *terraform.EvalSequence, err: unexpected EOF
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.LoadBalancer-And-Instances.aws_autoscaling_group.asg
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.LoadBalancer-And-Instances.output.aws_autoscaling_group_name"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.var.aws_autoscaling_group_name"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.aws_cloudwatch_metric_alarm.ec2-asg-high-cpu"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.monitoring.aws_cloudwatch_metric_alarm.documentdb-high-cpu"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "provider.template (close)"
22:14:25 2020/06/01 16:44:25 [ERROR] root.APIGateway: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [ERROR] root.APIGateway: eval: *terraform.EvalSequence, err: Warnings: []. Errors: [unexpected EOF]
22:14:25 2020/06/01 16:44:25 [TRACE] [walkPlan] Exiting eval tree: module.APIGateway.aws_api_gateway_base_path_mapping.api_path_mapping
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.LoadBalancer-And-Instances.aws_autoscaling_policy.scaledown-asg-policy"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.LoadBalancer-And-Instances.aws_cloudwatch_metric_alarm.scale-down-request"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.LoadBalancer-And-Instances.aws_autoscaling_policy.scaleup-asg-policy"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.LoadBalancer-And-Instances.aws_autoscaling_notification.autoscaling_notifications"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "module.LoadBalancer-And-Instances.aws_cloudwatch_metric_alarm.scale-up-request"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "provider.aws (close)"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
22:14:25 2020/06/01 16:44:25 [TRACE] dag/walk: upstream errored, not walking "root"
22:14:25 2020/06/01 16:44:25 [DEBUG] plugin: waiting for all plugin processes to complete...
22:14:25 2020-06-01T16:44:25.806Z [WARN ] plugin: error closing client during Kill: err="connection is shut down"
22:14:25 2020-06-01T16:44:25.810Z [DEBUG] plugin.terraform: local-exec-provisioner (internal) 2020/06/01 16:44:25 [ERR] plugin: plugin server: accept unix /tmp/plugin218321958: use of closed network connection
22:14:25 2020-06-01T16:44:25.810Z [DEBUG] plugin.terraform: local-exec-provisioner (internal) 2020/06/01 16:44:25 [DEBUG] plugin: waiting for all plugin processes to complete...
22:14:25 2020-06-01T16:44:25.810Z [DEBUG] plugin.terraform-provider-template_v2.1.2_x4: 2020/06/01 16:44:25 [ERR] plugin: plugin server: accept unix /tmp/plugin783903142: use of closed network connection
22:14:25 2020-06-01T16:44:25.810Z [DEBUG] plugin: plugin process exited: path=/var/lib/jenkins/workspace/Loyalty-LSA-Phase1-Deployment-apply/project_onboarding/Loyalty-LSA/prod/.terraform/plugins/linux_amd64/terraform-provider-template_v2.1.2_x4
22:14:25 2020-06-01T16:44:25.810Z [DEBUG] plugin: plugin process exited: path=/opt/terraform
22:14:25
22:14:25
22:14:25
22:14:25 !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
22:14:25
22:14:25 Terraform crashed! This is always indicative of a bug within Terraform.
22:14:25 A crash log has been placed at "crash.log" relative to your current
22:14:25 working directory. It would be immensely helpful if you could please
22:14:25 report the crash with Terraform[1] so that we can fix this.
22:14:25
22:14:25 When reporting bugs, please include your terraform version. That
22:14:25 information is available on the first line of crash.log. You can also
22:14:25 get it by running 'terraform --version' on the command line.
22:14:25
22:14:25 [1]: https://github.com/hashicorp/terraform/issues
22:14:25
22:14:25 !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

@bflad
Copy link
Contributor

bflad commented Jun 4, 2020

Hi folks 👋 Please note that the fix for this crash (verified with Terraform CLI v0.11.14) has been merged and will release with version 2.65.0 of the Terraform AWS Provider, later today. 👍

@ghost
Copy link

ghost commented Jun 5, 2020

This has been released in version 2.65.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@jcmcken
Copy link

jcmcken commented Jun 5, 2020

This might be fixed in 2.65.0, but that version is also broken in another way. Can we get a bug fix release without any additional cruft?

bflad added a commit that referenced this issue Jun 23, 2020
…gs` for Terraform 0.11 and earlier with boolean `propagate_at_launch` values

Reference: #13312
Reference: #13360
Reference: #13469
Reference: #13549
Reference: #13635

One of the major improvements internally with Terraform 0.12's type system is that providers and the core logic agree on a resource schema and its normalization during configuration parsing so the state and difference handling is more consistent. In Terraform 0.11 and earlier, a quirky behavior with raw boolean values is that they could be converted to string "0" and "1" values based on various factors such as passing through functions. With recent changes to the `aws_autoscaling_group` resource to fix its handling of the `tags` attribute (to prevent `d.Set()` errors and testing panics in the upcoming Terraform Plugin SDK 2.0.0), this behavior was highlighted as unexpected perpetual differences. This cannot be caught in the 0.12 shimmed acceptance testing framework and therefore is manually tested by the below configuration and reproduction steps.

**NOTE:** The `tags` argument will be deprecated and removed in a future major version of the Terraform AWS Provider since it was designed as a workaround for Terraform 0.11 and earlier configurations. There are very few, if any, other Terraform AWS Provider attributes represented as a set of maps. In Terraform 0.12 and later, the `tag` argument more appropriately represents Auto Scaling Group resource tags as configuration blocks with strongly typed nested arguments and can be dynamically built via the `dynamic` configuration language feature. That deprecation is out of scope for this changeset though and likely will not occur until after Terraform AWS Provider version 3.0.0.

Given the following Terraform 0.11 compatible configuration with raw boolean values:

```hcl
terraform {
  required_version = "0.11.14"
}

provider "aws" {
  region  = "us-east-2"
  version = "2.67.0"
}

locals {
  test = [
    {
      key                 = "localkey1"
      value               = "localvalue1"
      propagate_at_launch = true
    },
    {
      key                 = "localkey2"
      value               = "localvalue2"
      propagate_at_launch = true
    },
  ]
}

data "aws_ami" "test" {
  most_recent = true
  owners      = ["amazon"]

  filter {
    name   = "name"
    values = ["amzn-ami-hvm-*-x86_64-gp2"]
  }
}

data "aws_availability_zones" "available" {
  state = "available"

  filter {
    name   = "opt-in-status"
    values = ["opt-in-not-required"]
  }
}

resource "aws_launch_template" "test" {
  name_prefix   = "test"
  image_id      = "${data.aws_ami.test.id}"
  instance_type = "t2.micro"
}

resource "aws_autoscaling_group" "test" {
  availability_zones = ["${data.aws_availability_zones.available.names[0]}"]
  desired_capacity   = 0
  max_size           = 0
  min_size           = 0
  tags               = ["${concat(list(map("key", "resourcekey1", "value", "resourcevalue1", "propagate_at_launch", true)), local.test)}"]

  launch_template {
    id      = "${aws_launch_template.test.id}"
    version = "${aws_launch_template.test.default_version}"
  }
}

output "tags" {
  value = "${aws_autoscaling_group.test.tags}"
}

```

Applying twice has a perpetual difference:

```console
$ terraform0.11.14 init

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "aws" (2.67.0)...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

$ terraform0.11.14 apply
data.aws_ami.test: Refreshing state...
data.aws_availability_zones.available: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + aws_autoscaling_group.test
      id:                                  <computed>
      arn:                                 <computed>
      availability_zones.#:                "1"
      availability_zones.4293815384:       "us-east-2a"
      default_cooldown:                    <computed>
      desired_capacity:                    "0"
      force_delete:                        "false"
      health_check_grace_period:           "300"
      health_check_type:                   <computed>
      launch_template.#:                   "1"
      launch_template.0.id:                "${aws_launch_template.test.id}"
      launch_template.0.name:              <computed>
      launch_template.0.version:           "${aws_launch_template.test.default_version}"
      load_balancers.#:                    <computed>
      max_size:                            "0"
      metrics_granularity:                 "1Minute"
      min_size:                            "0"
      name:                                <computed>
      protect_from_scale_in:               "false"
      service_linked_role_arn:             <computed>
      tags.#:                              "3"
      tags.2825254636.%:                   "3"
      tags.2825254636.key:                 "localkey1"
      tags.2825254636.propagate_at_launch: "1"
      tags.2825254636.value:               "localvalue1"
      tags.2888644505.%:                   "3"
      tags.2888644505.key:                 "resourcekey1"
      tags.2888644505.propagate_at_launch: "1"
      tags.2888644505.value:               "resourcevalue1"
      tags.3299348900.%:                   "3"
      tags.3299348900.key:                 "localkey2"
      tags.3299348900.propagate_at_launch: "1"
      tags.3299348900.value:               "localvalue2"
      target_group_arns.#:                 <computed>
      vpc_zone_identifier.#:               <computed>
      wait_for_capacity_timeout:           "10m"

  + aws_launch_template.test
      id:                                  <computed>
      arn:                                 <computed>
      default_version:                     <computed>
      image_id:                            "ami-083ebc5a49573896a"
      instance_type:                       "t2.micro"
      latest_version:                      "0"
      metadata_options.#:                  <computed>
      name:                                <computed>
      name_prefix:                         "test"

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_launch_template.test: Creating...
  arn:                "" => "<computed>"
  default_version:    "" => "<computed>"
  image_id:           "" => "ami-083ebc5a49573896a"
  instance_type:      "" => "t2.micro"
  latest_version:     "" => "<computed>"
  metadata_options.#: "" => "<computed>"
  name:               "" => "<computed>"
  name_prefix:        "" => "test"
aws_launch_template.test: Creation complete after 0s (ID: lt-0d8e6f4f94a683778)
aws_autoscaling_group.test: Creating...
  arn:                                 "" => "<computed>"
  availability_zones.#:                "" => "1"
  availability_zones.4293815384:       "" => "us-east-2a"
  default_cooldown:                    "" => "<computed>"
  desired_capacity:                    "" => "0"
  force_delete:                        "" => "false"
  health_check_grace_period:           "" => "300"
  health_check_type:                   "" => "<computed>"
  launch_template.#:                   "" => "1"
  launch_template.0.id:                "" => "lt-0d8e6f4f94a683778"
  launch_template.0.name:              "" => "<computed>"
  launch_template.0.version:           "" => "1"
  load_balancers.#:                    "" => "<computed>"
  max_size:                            "" => "0"
  metrics_granularity:                 "" => "1Minute"
  min_size:                            "" => "0"
  name:                                "" => "<computed>"
  protect_from_scale_in:               "" => "false"
  service_linked_role_arn:             "" => "<computed>"
  tags.#:                              "" => "3"
  tags.2825254636.%:                   "" => "3"
  tags.2825254636.key:                 "" => "localkey1"
  tags.2825254636.propagate_at_launch: "" => "1"
  tags.2825254636.value:               "" => "localvalue1"
  tags.2888644505.%:                   "" => "3"
  tags.2888644505.key:                 "" => "resourcekey1"
  tags.2888644505.propagate_at_launch: "" => "1"
  tags.2888644505.value:               "" => "resourcevalue1"
  tags.3299348900.%:                   "" => "3"
  tags.3299348900.key:                 "" => "localkey2"
  tags.3299348900.propagate_at_launch: "" => "1"
  tags.3299348900.value:               "" => "localvalue2"
  target_group_arns.#:                 "" => "<computed>"
  vpc_zone_identifier.#:               "" => "<computed>"
  wait_for_capacity_timeout:           "" => "10m"
aws_autoscaling_group.test: Creation complete after 2s (ID: tf-asg-20200623194008467200000003)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Outputs:

tags = [
    {
        key = localkey2,
        propagate_at_launch = 1,
        value = localvalue2
    },
    {
        key = localkey1,
        propagate_at_launch = 1,
        value = localvalue1
    },
    {
        key = resourcekey1,
        propagate_at_launch = 1,
        value = resourcevalue1
    }
]

$ terraform0.11.14 apply
data.aws_ami.test: Refreshing state...
data.aws_availability_zones.available: Refreshing state...
aws_launch_template.test: Refreshing state... (ID: lt-0d8e6f4f94a683778)
aws_autoscaling_group.test: Refreshing state... (ID: tf-asg-20200623194008467200000003)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ aws_autoscaling_group.test
      tags.2131493069.%:                   "3" => "0"
      tags.2131493069.key:                 "localkey2" => ""
      tags.2131493069.propagate_at_launch: "true" => ""
      tags.2131493069.value:               "localvalue2" => ""
      tags.2825254636.%:                   "0" => "3"
      tags.2825254636.key:                 "" => "localkey1"
      tags.2825254636.propagate_at_launch: "" => "1"
      tags.2825254636.value:               "" => "localvalue1"
      tags.2888644505.%:                   "0" => "3"
      tags.2888644505.key:                 "" => "resourcekey1"
      tags.2888644505.propagate_at_launch: "" => "1"
      tags.2888644505.value:               "" => "resourcevalue1"
      tags.3299348900.%:                   "0" => "3"
      tags.3299348900.key:                 "" => "localkey2"
      tags.3299348900.propagate_at_launch: "" => "1"
      tags.3299348900.value:               "" => "localvalue2"
      tags.3593646732.%:                   "3" => "0"
      tags.3593646732.key:                 "localkey1" => ""
      tags.3593646732.propagate_at_launch: "true" => ""
      tags.3593646732.value:               "localvalue1" => ""
      tags.3707627218.%:                   "3" => "0"
      tags.3707627218.key:                 "resourcekey1" => ""
      tags.3707627218.propagate_at_launch: "true" => ""
      tags.3707627218.value:               "resourcevalue1" => ""

Plan: 0 to add, 1 to change, 0 to destroy.
```

Building this version of the provider, the difference is no longer present:

```console
$ cp ~/go/bin/terraform-provider-aws .terraform/plugins/darwin_amd64/terraform-provider-aws_v2.67.0_x4; terraform0.11.14 init; terraform0.11.14 apply

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
data.aws_availability_zones.available: Refreshing state...
data.aws_ami.test: Refreshing state...
aws_launch_template.test: Refreshing state... (ID: lt-0d8e6f4f94a683778)
aws_autoscaling_group.test: Refreshing state... (ID: tf-asg-20200623194008467200000003)

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

tags = [
    {
        key = localkey1,
        propagate_at_launch = 1,
        value = localvalue1
    },
    {
        key = resourcekey1,
        propagate_at_launch = 1,
        value = resourcevalue1
    },
    {
        key = localkey2,
        propagate_at_launch = 1,
        value = localvalue2
    }
]
```

Output from acceptance testing (Terraform 0.12 compatible):

```
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (176.05s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (342.40s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (89.91s)
--- PASS: TestAccAWSAutoScalingGroup_basic (259.25s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (93.45s)
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (92.72s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (174.98s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (271.36s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (62.35s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (61.69s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (143.24s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (77.30s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (695.77s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (80.89s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (108.93s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (49.98s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (82.14s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (96.59s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (83.60s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (90.32s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (112.90s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_UpdateToZeroOnDemandBaseCapacity (73.62s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (86.69s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (85.84s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (85.29s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (205.06s)
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (45.70s)
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (83.67s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (267.51s)
--- PASS: TestAccAWSAutoScalingGroup_tags (299.92s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (249.92s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (151.45s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (236.40s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (389.18s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (384.27s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (96.85s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (200.69s)
```
bflad added a commit that referenced this issue Jul 1, 2020
…gs` for Terraform 0.11 and earlier with boolean `propagate_at_launch` values (#13912)

Reference: #13312
Reference: #13360
Reference: #13469
Reference: #13549
Reference: #13635

One of the major improvements internally with Terraform 0.12's type system is that providers and the core logic agree on a resource schema and its normalization during configuration parsing so the state and difference handling is more consistent. In Terraform 0.11 and earlier, a quirky behavior with raw boolean values is that they could be converted to string "0" and "1" values based on various factors such as passing through functions. With recent changes to the `aws_autoscaling_group` resource to fix its handling of the `tags` attribute (to prevent `d.Set()` errors and testing panics in the upcoming Terraform Plugin SDK 2.0.0), this behavior was highlighted as unexpected perpetual differences. This cannot be caught in the 0.12 shimmed acceptance testing framework and therefore is manually tested by the below configuration and reproduction steps.

**NOTE:** The `tags` argument will be deprecated and removed in a future major version of the Terraform AWS Provider since it was designed as a workaround for Terraform 0.11 and earlier configurations. There are very few, if any, other Terraform AWS Provider attributes represented as a set of maps. In Terraform 0.12 and later, the `tag` argument more appropriately represents Auto Scaling Group resource tags as configuration blocks with strongly typed nested arguments and can be dynamically built via the `dynamic` configuration language feature. That deprecation is out of scope for this changeset though and likely will not occur until after Terraform AWS Provider version 3.0.0.

Given the following Terraform 0.11 compatible configuration with raw boolean values:

```hcl
terraform {
  required_version = "0.11.14"
}

provider "aws" {
  region  = "us-east-2"
  version = "2.67.0"
}

locals {
  test = [
    {
      key                 = "localkey1"
      value               = "localvalue1"
      propagate_at_launch = true
    },
    {
      key                 = "localkey2"
      value               = "localvalue2"
      propagate_at_launch = true
    },
  ]
}

data "aws_ami" "test" {
  most_recent = true
  owners      = ["amazon"]

  filter {
    name   = "name"
    values = ["amzn-ami-hvm-*-x86_64-gp2"]
  }
}

data "aws_availability_zones" "available" {
  state = "available"

  filter {
    name   = "opt-in-status"
    values = ["opt-in-not-required"]
  }
}

resource "aws_launch_template" "test" {
  name_prefix   = "test"
  image_id      = "${data.aws_ami.test.id}"
  instance_type = "t2.micro"
}

resource "aws_autoscaling_group" "test" {
  availability_zones = ["${data.aws_availability_zones.available.names[0]}"]
  desired_capacity   = 0
  max_size           = 0
  min_size           = 0
  tags               = ["${concat(list(map("key", "resourcekey1", "value", "resourcevalue1", "propagate_at_launch", true)), local.test)}"]

  launch_template {
    id      = "${aws_launch_template.test.id}"
    version = "${aws_launch_template.test.default_version}"
  }
}

output "tags" {
  value = "${aws_autoscaling_group.test.tags}"
}

```

Applying twice has a perpetual difference:

```console
$ terraform0.11.14 init

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "aws" (2.67.0)...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

$ terraform0.11.14 apply
data.aws_ami.test: Refreshing state...
data.aws_availability_zones.available: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + aws_autoscaling_group.test
      id:                                  <computed>
      arn:                                 <computed>
      availability_zones.#:                "1"
      availability_zones.4293815384:       "us-east-2a"
      default_cooldown:                    <computed>
      desired_capacity:                    "0"
      force_delete:                        "false"
      health_check_grace_period:           "300"
      health_check_type:                   <computed>
      launch_template.#:                   "1"
      launch_template.0.id:                "${aws_launch_template.test.id}"
      launch_template.0.name:              <computed>
      launch_template.0.version:           "${aws_launch_template.test.default_version}"
      load_balancers.#:                    <computed>
      max_size:                            "0"
      metrics_granularity:                 "1Minute"
      min_size:                            "0"
      name:                                <computed>
      protect_from_scale_in:               "false"
      service_linked_role_arn:             <computed>
      tags.#:                              "3"
      tags.2825254636.%:                   "3"
      tags.2825254636.key:                 "localkey1"
      tags.2825254636.propagate_at_launch: "1"
      tags.2825254636.value:               "localvalue1"
      tags.2888644505.%:                   "3"
      tags.2888644505.key:                 "resourcekey1"
      tags.2888644505.propagate_at_launch: "1"
      tags.2888644505.value:               "resourcevalue1"
      tags.3299348900.%:                   "3"
      tags.3299348900.key:                 "localkey2"
      tags.3299348900.propagate_at_launch: "1"
      tags.3299348900.value:               "localvalue2"
      target_group_arns.#:                 <computed>
      vpc_zone_identifier.#:               <computed>
      wait_for_capacity_timeout:           "10m"

  + aws_launch_template.test
      id:                                  <computed>
      arn:                                 <computed>
      default_version:                     <computed>
      image_id:                            "ami-083ebc5a49573896a"
      instance_type:                       "t2.micro"
      latest_version:                      "0"
      metadata_options.#:                  <computed>
      name:                                <computed>
      name_prefix:                         "test"

Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_launch_template.test: Creating...
  arn:                "" => "<computed>"
  default_version:    "" => "<computed>"
  image_id:           "" => "ami-083ebc5a49573896a"
  instance_type:      "" => "t2.micro"
  latest_version:     "" => "<computed>"
  metadata_options.#: "" => "<computed>"
  name:               "" => "<computed>"
  name_prefix:        "" => "test"
aws_launch_template.test: Creation complete after 0s (ID: lt-0d8e6f4f94a683778)
aws_autoscaling_group.test: Creating...
  arn:                                 "" => "<computed>"
  availability_zones.#:                "" => "1"
  availability_zones.4293815384:       "" => "us-east-2a"
  default_cooldown:                    "" => "<computed>"
  desired_capacity:                    "" => "0"
  force_delete:                        "" => "false"
  health_check_grace_period:           "" => "300"
  health_check_type:                   "" => "<computed>"
  launch_template.#:                   "" => "1"
  launch_template.0.id:                "" => "lt-0d8e6f4f94a683778"
  launch_template.0.name:              "" => "<computed>"
  launch_template.0.version:           "" => "1"
  load_balancers.#:                    "" => "<computed>"
  max_size:                            "" => "0"
  metrics_granularity:                 "" => "1Minute"
  min_size:                            "" => "0"
  name:                                "" => "<computed>"
  protect_from_scale_in:               "" => "false"
  service_linked_role_arn:             "" => "<computed>"
  tags.#:                              "" => "3"
  tags.2825254636.%:                   "" => "3"
  tags.2825254636.key:                 "" => "localkey1"
  tags.2825254636.propagate_at_launch: "" => "1"
  tags.2825254636.value:               "" => "localvalue1"
  tags.2888644505.%:                   "" => "3"
  tags.2888644505.key:                 "" => "resourcekey1"
  tags.2888644505.propagate_at_launch: "" => "1"
  tags.2888644505.value:               "" => "resourcevalue1"
  tags.3299348900.%:                   "" => "3"
  tags.3299348900.key:                 "" => "localkey2"
  tags.3299348900.propagate_at_launch: "" => "1"
  tags.3299348900.value:               "" => "localvalue2"
  target_group_arns.#:                 "" => "<computed>"
  vpc_zone_identifier.#:               "" => "<computed>"
  wait_for_capacity_timeout:           "" => "10m"
aws_autoscaling_group.test: Creation complete after 2s (ID: tf-asg-20200623194008467200000003)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Outputs:

tags = [
    {
        key = localkey2,
        propagate_at_launch = 1,
        value = localvalue2
    },
    {
        key = localkey1,
        propagate_at_launch = 1,
        value = localvalue1
    },
    {
        key = resourcekey1,
        propagate_at_launch = 1,
        value = resourcevalue1
    }
]

$ terraform0.11.14 apply
data.aws_ami.test: Refreshing state...
data.aws_availability_zones.available: Refreshing state...
aws_launch_template.test: Refreshing state... (ID: lt-0d8e6f4f94a683778)
aws_autoscaling_group.test: Refreshing state... (ID: tf-asg-20200623194008467200000003)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ aws_autoscaling_group.test
      tags.2131493069.%:                   "3" => "0"
      tags.2131493069.key:                 "localkey2" => ""
      tags.2131493069.propagate_at_launch: "true" => ""
      tags.2131493069.value:               "localvalue2" => ""
      tags.2825254636.%:                   "0" => "3"
      tags.2825254636.key:                 "" => "localkey1"
      tags.2825254636.propagate_at_launch: "" => "1"
      tags.2825254636.value:               "" => "localvalue1"
      tags.2888644505.%:                   "0" => "3"
      tags.2888644505.key:                 "" => "resourcekey1"
      tags.2888644505.propagate_at_launch: "" => "1"
      tags.2888644505.value:               "" => "resourcevalue1"
      tags.3299348900.%:                   "0" => "3"
      tags.3299348900.key:                 "" => "localkey2"
      tags.3299348900.propagate_at_launch: "" => "1"
      tags.3299348900.value:               "" => "localvalue2"
      tags.3593646732.%:                   "3" => "0"
      tags.3593646732.key:                 "localkey1" => ""
      tags.3593646732.propagate_at_launch: "true" => ""
      tags.3593646732.value:               "localvalue1" => ""
      tags.3707627218.%:                   "3" => "0"
      tags.3707627218.key:                 "resourcekey1" => ""
      tags.3707627218.propagate_at_launch: "true" => ""
      tags.3707627218.value:               "resourcevalue1" => ""

Plan: 0 to add, 1 to change, 0 to destroy.
```

Building this version of the provider, the difference is no longer present:

```console
$ cp ~/go/bin/terraform-provider-aws .terraform/plugins/darwin_amd64/terraform-provider-aws_v2.67.0_x4; terraform0.11.14 init; terraform0.11.14 apply

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
data.aws_availability_zones.available: Refreshing state...
data.aws_ami.test: Refreshing state...
aws_launch_template.test: Refreshing state... (ID: lt-0d8e6f4f94a683778)
aws_autoscaling_group.test: Refreshing state... (ID: tf-asg-20200623194008467200000003)

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

tags = [
    {
        key = localkey1,
        propagate_at_launch = 1,
        value = localvalue1
    },
    {
        key = resourcekey1,
        propagate_at_launch = 1,
        value = resourcevalue1
    },
    {
        key = localkey2,
        propagate_at_launch = 1,
        value = localvalue2
    }
]
```

Output from acceptance testing (Terraform 0.12 compatible):

```
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups (176.05s)
--- PASS: TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity (342.40s)
--- PASS: TestAccAWSAutoScalingGroup_autoGeneratedName (89.91s)
--- PASS: TestAccAWSAutoScalingGroup_basic (259.25s)
--- PASS: TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier (93.45s)
--- PASS: TestAccAWSAutoScalingGroup_emptyAvailabilityZones (92.72s)
--- PASS: TestAccAWSAutoScalingGroup_enablingMetrics (174.98s)
--- PASS: TestAccAWSAutoScalingGroup_initialLifecycleHook (271.36s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate (62.35s)
--- PASS: TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile (61.69s)
--- PASS: TestAccAWSAutoScalingGroup_launchTemplate_update (143.24s)
--- PASS: TestAccAWSAutoScalingGroup_launchTempPartitionNum (77.30s)
--- PASS: TestAccAWSAutoScalingGroup_LoadBalancers (695.77s)
--- PASS: TestAccAWSAutoScalingGroup_MaxInstanceLifetime (80.89s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy (108.93s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandAllocationStrategy (49.98s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandBaseCapacity (82.14s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_OnDemandPercentageAboveBaseCapacity (96.59s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotAllocationStrategy (83.60s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotInstancePools (90.32s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_SpotMaxPrice (112.90s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_InstancesDistribution_UpdateToZeroOnDemandBaseCapacity (73.62s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_LaunchTemplateName (86.69s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_LaunchTemplateSpecification_Version (85.84s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_InstanceType (85.29s)
--- PASS: TestAccAWSAutoScalingGroup_MixedInstancesPolicy_LaunchTemplate_Override_WeightedCapacity (205.06s)
--- PASS: TestAccAWSAutoScalingGroup_namePrefix (45.70s)
--- PASS: TestAccAWSAutoScalingGroup_serviceLinkedRoleARN (83.67s)
--- PASS: TestAccAWSAutoScalingGroup_suspendingProcesses (267.51s)
--- PASS: TestAccAWSAutoScalingGroup_tags (299.92s)
--- PASS: TestAccAWSAutoScalingGroup_TargetGroupArns (249.92s)
--- PASS: TestAccAWSAutoScalingGroup_terminationPolicies (151.45s)
--- PASS: TestAccAWSAutoScalingGroup_VpcUpdates (236.40s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer (389.18s)
--- PASS: TestAccAWSAutoScalingGroup_WithLoadBalancer_ToTargetGroup (384.27s)
--- PASS: TestAccAWSAutoScalingGroup_withMetrics (96.85s)
--- PASS: TestAccAWSAutoScalingGroup_withPlacementGroup (200.69s)
```
@ghost
Copy link

ghost commented Jul 5, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.