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_network_interface can't find securitygroupID. #3372

Closed
TheM0ng00se opened this issue Sep 30, 2015 · 2 comments
Closed

aws_network_interface can't find securitygroupID. #3372

TheM0ng00se opened this issue Sep 30, 2015 · 2 comments

Comments

@TheM0ng00se
Copy link

In Terraform 0.6.3 I'm noticing that attaching a security group to an ENI isn't working as expected.

I've tried both with {$aws_security_group.csr_sg_inside.name} AND {$aws_security_group.csr_sg_inside.id} and both throw the error.

Error applying plan:

2 error(s) occurred:

* aws_network_interface.csr_inside.0: Error creating ENI: InvalidSecurityGroupID.NotFound: The securityGroup ID '{$aws_security_group.csr_sg_inside.name}' does not exist
    status code: 400, request id: []
* aws_network_interface.csr_inside.1: Error creating ENI: InvalidSecurityGroupID.NotFound: The securityGroup ID '{$aws_security_group.csr_sg_inside.name}' does not exist
    status code: 400, request id: []

Terraform does indeed create the security group and it exists. I had a brief look at the source...seems like I should be able to do this..

resource "aws_network_interface" "csr_inside" {
    count = "2"
    subnet_id = "${element(aws_subnet.tools.*.id, count.index)}"
    source_dest_check = "false"
    security_groups = [ "{$aws_security_group.csr_sg_inside.id}" ]
    attachment {
        instance = "${element(aws_instance.csr.*.id, count.index)}"
        device_index = "2"
    }
}
@mslayton-abra
Copy link

mslayton-abra commented Nov 22, 2016

This problem also cropped up for me. Same scenario. Same error.
Also tried upgrading to terraform-0.7.11 with the same result.

@ghost
Copy link

ghost commented Apr 11, 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 Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants