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 :
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
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 :smile:
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
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
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 ?
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.
Most helpful comment
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 notid
. 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 :smile:
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