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

aws_launch_template does not apply security groups defined in network_interfaces block #4358

Closed
george-richardson opened this issue Apr 26, 2018 · 4 comments
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@george-richardson
Copy link
Contributor

Terraform Version

Terraform v0.11.0

  • provider.aws v1.16.0

Affected Resource(s)

  • aws_launch_template

Terraform Configuration Files

resource "aws_launch_template" "example_failing_launch_template" {
  name          = "example_failing_launch_template"
  image_id      = "ami-5718412e"
  instance_type = "t2.micro"
  key_name      = "some_key_name"

  network_interfaces {
    associate_public_ip_address = true
    subnet_id                   = "subnet-05afea5e"
    security_groups             = ["sg-6f372715"]
    delete_on_termination       = true
  }
}

Debug Output

https://gist.github.com/george-richardson/9b9d7f7701433c8fd04c465c88b851f7

Expected Behavior

Terraform creates an aws_launch_template which has an associated network interface with the security group "sg-6f372715".

Actual Behavior

The launch template is created, as is the network interface. However the security group information is missing. Here is a screenshot from the AWS console showing the network interfaces section of the generated launch template.

image

@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 26, 2018
@bflad bflad added this to the v1.17.0 milestone Apr 26, 2018
@bflad
Copy link
Contributor

bflad commented Apr 26, 2018

The fix for this has been merged into master and will release with v1.17.0 of the AWS provider, likely mid next week.

@bflad bflad closed this as completed Apr 26, 2018
@george-richardson
Copy link
Contributor Author

Thanks @bflad and @kl4w for such a quick turn around 😄

@bflad
Copy link
Contributor

bflad commented May 2, 2018

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

@ghost
Copy link

ghost commented Apr 6, 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 Apr 6, 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. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

2 participants