-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Can't pass self when other non-self rules specified #12
Comments
This is a Terraform bug/feature after all hashicorp/terraform#26265 |
I'm also having same exact issue:
|
What if you set the undefined key values explicitly to null so the keys for each element were the same.
|
@nitrocode already tried and that crashes Terraform hard. |
I have found a work around with optional values. (experimental future)
define "rules" variable as following:
|
Which Terraform version? It's their bug after all. |
Terraform 14 with the experimental flag enabled. It's experimental so it won't be enabled in this module until it's a stable feature presumably in terraform 15. The issue hashicorp/terraform#19898 tracks the optional feature |
To the extent Hashicorp supports it, this is fixed in #15 (and maybe before). Terraform requires that all the elements of the So this will work going forward and probably works with earlier versions: rules = [
{
type = "egress"
from_port = 0
to_port = 65535
protocol = "all"
cidr_blocks = ["0.0.0.0/0"]
self = null
},
{
type = "ingress"
from_port = 0
to_port = 65535
protocol = "tcp"
cidr_blocks = []
self = true
}
] |
Passing rules as below will fail with:
Environment (please complete the following information):
Terraform 0.13.6 and module version 0.1.4 on macOS
The text was updated successfully, but these errors were encountered: