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_instance security_groups when provide id throwing error #3798

Closed
pawelsawicz opened this issue Nov 6, 2015 · 3 comments · Fixed by #4240
Closed

aws_instance security_groups when provide id throwing error #3798

pawelsawicz opened this issue Nov 6, 2015 · 3 comments · Fixed by #4240

Comments

@pawelsawicz
Copy link

Hey all

According to this documentation in security_group should be only name of security groups. But I came up with that after big confusion because when I tried to provide ID I got that kind of error :

Error during applying

Which in my opinion is misleading, and if it's possible it should throw a syntax error.

Another misleading is that originally I looked up eventstore-terraform and here it seems working when you pass id

This issue is more about understanding and to clarify it might be helpful for other that struggling with that error/problem.

Thanks,
Pawel

@catsby
Copy link
Contributor

catsby commented Nov 9, 2015

Hey @pawelsawicz – are you creating this security group inside a default VPC? I checked out your example repos (thanks, by the way!) and I don't see a VPC declared. This leads me to believe you're inside a default VPC, which allows the name usage but not id. Is my understanding correct?

Regarding the misleading error, that's the error we're getting back from the AWS API, and is certainly not helping anyone figure out the root case here 😄

Regarding throwing a syntax error, I don't believe Terraform has the context to make that kind of validation here. The resource is simply receiving a value. It's valid it certain situations. That said, do you think if we attempted to capture that error around here and provide additional warning logs, that would be sufficient? Let me know if I'm missing something here, and thanks again

@catsby catsby added bug waiting-response An issue/pull request is waiting for a response from the community provider/aws labels Nov 9, 2015
@pawelsawicz
Copy link
Author

Hey @catsby
Ah yes I should mention that, I don't create VPC, I am using default one. Yes your understanding is correct. Does it mean that if you define VPC then you can use id ?

Yes we could try to capture error, which is "Value () for parameter groupId is invalid. The value cannot be empty" and maybe modify that error a little bit to

  1. "Value () for parameter groupId is invalid. The value cannot be empty, check https://goo.gl/BwlZnp"
  2. "Value () for parameter groupId is invalid. The value cannot be empty, if you use default VPC security groups have to contain names instead of id"

on the other hand I don't think so that terraform should overwrite/modify errors that AWS returns, maybe it's something that we could open a ticket at AWS to make this error message better ?

@catsby catsby removed the waiting-response An issue/pull request is waiting for a response from the community label Dec 9, 2015
omeid pushed a commit to omeid/terraform that referenced this issue Mar 30, 2018
@ghost
Copy link

ghost commented Apr 28, 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.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants