Terraform-provider-aws: aws_launch_template data source error setting network_interfaces

Created on 17 Feb 2020  ·  6Comments  ·  Source: hashicorp/terraform-provider-aws

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 v0.12.20
+ provider.archive v1.3.0
+ provider.aws v2.49.0
+ provider.external v1.2.0
+ provider.kubernetes v1.10.0
+ provider.local v1.4.0
+ provider.null v2.1.2
+ provider.random v2.2.1
+ provider.template v2.1.2

Affected Resource(s)

  • aws_launch_template data source

Terraform Configuration Files

data "aws_launch_template" "node_group" {
  name = "<launch_template_name_of_eks_node_group>"
}

Debug Output

Error: error setting network_interfaces: network_interfaces.0.associate_public_ip_address: '' expected type 'bool', got unconvertible type 'string'

Panic Output

Expected Behavior


Expected no error

Actual Behavior

Got error:
Error: error setting network_interfaces: network_interfaces.0.associate_public_ip_address: '' expected type 'bool', got unconvertible type 'string'

Steps to Reproduce

  1. terraform apply

Important Factoids


This error happened when trying to look up a launch template, which was automatically created for an EKS node group.

bug servicec2

Most helpful comment

The fix for this has been merged and will release with version 2.59.0 of the Terraform AWS Provider, likely tomorrow. Thanks to @jalaziz for the implementation. 👍

All 6 comments

Is there a workaround for this ? I actually need to update the launch template created by EKS Node Group

I'm seeing this error for non-EKS launch templates that were actually created by Terraform.

What's worse is that the launch templates have a value set for associate_public_ip_addresson the defined network interface.

The fix for this has been merged and will release with version 2.59.0 of the Terraform AWS Provider, likely tomorrow. Thanks to @jalaziz for the implementation. 👍

This has been released in version 2.59.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!

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!

Was this page helpful?
0 / 5 - 0 ratings