From 7d30a246fbc4d636810decdad9b38e61b326d891 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Sat, 13 Apr 2024 00:25:41 +0200 Subject: [PATCH] feat(variables): add default to allow empty ingress and egress blocks --- README.md | 4 ++-- variables.tf | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ce304a..4461e56 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ No modules. |------|-------------|------|---------|:--------:| | [delete_default_rules](#input_delete_default_rules) | Whether or not to delete the default egress rules applied to the security group.
Default rules allow egress ipv4 and ipv6 to 0.0.0.0/0. | `bool` | `false` | no | | [description](#input_description) | Description for the security group. | `string` | `null` | no | -| [egress_rules](#input_egress_rules) | The list of egress rules to attach to the security group.
You can use all regular entries from the openstack_networking_secgroup_rule_v2 resource
provided by the openstack provider, except region, which defaults to the region of the provider used,
and direction, which defaults to egress.
By default, if ethertype is not specified, it will by IPv4. | `map(map(string))` | n/a | yes | -| [ingress_rules](#input_ingress_rules) | The list of ingress rules to attach to the security group.
You can use all regular entries from the openstack_networking_secgroup_rule_v2 resource
provided by the openstack provider, except region, which defaults to the region of the provider used,
and direction, which defaults to ingress.
By default, if ethertype is not specified, it will by IPv4. | `map(map(string))` | n/a | yes | +| [egress_rules](#input_egress_rules) | The list of egress rules to attach to the security group.
You can use all regular entries from the openstack_networking_secgroup_rule_v2 resource
provided by the openstack provider, except region, which defaults to the region of the provider used,
and direction, which defaults to egress.
By default, if ethertype is not specified, it will by IPv4. | `map(map(string))` | `{}` | no | +| [ingress_rules](#input_ingress_rules) | The list of ingress rules to attach to the security group.
You can use all regular entries from the openstack_networking_secgroup_rule_v2 resource
provided by the openstack provider, except region, which defaults to the region of the provider used,
and direction, which defaults to ingress.
By default, if ethertype is not specified, it will by IPv4. | `map(map(string))` | `{}` | no | | [name](#input_name) | The name of the security group. | `string` | n/a | yes | | [tags](#input_tags) | A list of tags (strings) to apply to the security group | `list(string)` | `[]` | no | | [tenant_id](#input_tenant_id) | The tenant for which to create the security group.
This is only required for admins creating security groups for other tenant. | `string` | `null` | no | diff --git a/variables.tf b/variables.tf index cdcd6b9..22f087f 100644 --- a/variables.tf +++ b/variables.tf @@ -36,6 +36,7 @@ variable "ingress_rules" { and direction, which defaults to ingress. By default, if ethertype is not specified, it will by IPv4. EOT + default = {} } variable "egress_rules" { @@ -47,6 +48,7 @@ variable "egress_rules" { and direction, which defaults to egress. By default, if ethertype is not specified, it will by IPv4. EOT + default = {} } variable "tags" {