You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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..
I was able to apply your config with a small tweak (replaced {$aws_security_group.csr_sg_inside.id} with ${aws_security_group.csr_sg_inside.id}).
I first thought we could provide an error in such case, but then {$...} could be a valid value in some other contexts, so we can't really perform such generic validation and field-specific validation would provide you pretty much the same error message as you get from the API above.
With that I believe there's nothing to fix, so I'm going to close this issue. Let me know if anything's unclear or if you keep having issues.
This issue was originally opened by @TheM0ng00se as hashicorp/terraform#3372. It was migrated here as part of the provider split. The original body of the issue is below.
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.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..
The text was updated successfully, but these errors were encountered: