Skip to content

Commit

Permalink
chore(script): adjust the default values and related docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance52259 committed Oct 22, 2024
1 parent b911eb6 commit da49794
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ Full contributing [guidelines are covered here](.github/how_to_contribute.md).
| enterprise_project_id | Used to specify whether the resource is created under the enterprise project (this parameter is only valid for enterprise users) | string | null | N |
| name_suffix | The suffix string of name for all Network resources | string | "" | N |
| is_vpc_create | Controls whether a VPC should be created (it affects all VPC related resources under this module) | bool | true | N |
| vpc_name | The name of the VPC resource | string | "" | N |
| vpc_name | The name of the VPC resource | string | "" | Y (Unless is_vpc_create is specified as false) |
| vpc_cidr | The CIDR block of the VPC resource | string | "192.168.0.0/16" | N |
| vpc_description | The description of the VPC resource | string | "" | N |
| vpc_secondary_cidrs | The secondary CIDR blocks of the VPC resource | list(string) | <pre>[]</pre> | N |
| vpc_tags | The key/value pairs to associte with the VPC resource | map(string) | <pre>{}</pre> | N |
| subnets_configuration | The configuration for the subnet resources to which the VPC belongs | <pre>list(object({<br> name = string<br> description = optional(string, null)<br> cidr = string<br> ipv6_enabled = optional(bool, true)<br> dhcp_enabled = optional(bool, true)<br> dns_list = optional(list(string), null)<br> tags = optional(map(string), {})<br> delete_timeout = optional(string, null)<br>}))</pre> | <pre>[<br> {<br> name = "module-default-subnet",<br> cidr = "192.168.16.0/20",<br> },<br>]</pre> | N |
| is_security_group_create | Controls whether a security group should be created (it affects all security group related resources under this module) | bool | true | N |
| security_group_name | The name of the security group resource" | string | "" | N |
| security_group_name | The name of the security group resource" | string | "" | Y (Unless is_security_group_create is specified as false) |
| security_group_description | The description of the security group resource | string | null | N |
| security_group_rules_configuration | The configuration for security group rule resources to which the security group belongs | <pre>list(object({<br> description = optional(string, null)<br> direction = optional(string, "ingress")<br> ethertype = optional(string, "IPv4")<br> protocol = optional(string, null)<br> ports = optional(string, null)<br> remote_ip_prefix = optional(string, "0.0.0.0/0")<br> remote_group_id = optional(string, null)<br> remote_address_group_id = optional(string, null)<br> action = optional(string, "allow")<br> priority = optional(number, null)<br>}))</pre> | <pre>[<br> {<br> protocol = "icmp"<br> }<br>]</pre> | N |
| remote_address_group_rules_configuration | The configuration of remote address group for security group rule resources | <pre>list(object({<br> address_group_name = string<br> description = optional(string, null)<br> direction = optional(string, "ingress")<br> ethertype = optional(string, "IPv4")<br> protocol = optional(string, null)<br> ports = optional(string, null)<br> remote_addresses = list(string)<br> action = optional(string, "allow")<br> priority = optional(number, null)<br>}))</pre> |<pre>[<br> {<br> direction = "ingress",<br> ethertype = "IPv4",<br> protocol = "icmp",<br> ports = "80",<br> remote_addresses = ["192.168.10.22,192.168.11.0-192.168.11.240"],<br> }<br>]<pre> | N |
| security_group_rules_configuration | The configuration for security group rule resources to which the security group belongs | <pre>list(object({<br> description = optional(string, null)<br> direction = optional(string, "ingress")<br> ethertype = optional(string, "IPv4")<br> protocol = optional(string, null)<br> ports = optional(string, null)<br> remote_ip_prefix = optional(string, "0.0.0.0/0")<br> remote_group_id = optional(string, null)<br> remote_address_group_id = optional(string, null)<br> action = optional(string, "allow")<br> priority = optional(number, null)<br>}))</pre> | <pre>[]</pre> | N |
| remote_address_group_rules_configuration | The configuration of remote address group for security group rule resources | <pre>list(object({<br> description = optional(string, null)<br> direction = optional(string, "ingress")<br> ethertype = optional(string, "IPv4")<br> protocol = optional(string, null)<br> ports = optional(string, null)<br> remote_addresses = list(string)<br> action = optional(string, "allow")<br> priority = optional(number, null)<br>}))</pre> | <pre>[]<pre> | N |
| query_vpc_names | The VPC name list used to query the resource IDs | list(string) | <pre>[]</pre> | N |
| query_subnet_names | The subnet name list used to query the resource IDs | list(string) | <pre>[]</pre> | N |
| query_security_group_names | The security group name list used to query the resource IDs | list(string) | <pre>[]</pre> | N |
Expand Down
8 changes: 2 additions & 6 deletions examples/full_resource_inputs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ variable "security_group_description" {
description = "The description of the security group resource"

type = string
default = null
default = ""
}

variable "security_group_rules_configuration" {
Expand All @@ -132,11 +132,7 @@ variable "security_group_rules_configuration" {
priority = optional(number, null)
}))

default = [
{
protocol = "icmp"
}
]
default = []
}

variable "remote_address_group_rules_configuration" {
Expand Down
8 changes: 2 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ variable "security_group_description" {
description = "The description of the security group resource"

type = string
default = null
default = ""
}

variable "security_group_rules_configuration" {
Expand All @@ -132,11 +132,7 @@ variable "security_group_rules_configuration" {
priority = optional(number, null)
}))

default = [
{
protocol = "icmp"
}
]
default = []
}

variable "remote_address_group_rules_configuration" {
Expand Down

0 comments on commit da49794

Please sign in to comment.