Skip to content

Commit 57eff29

Browse files
authored
feat: updated the root module and the DA to create and attach a public gateway to all subnets (#1066)
1 parent 2b952db commit 57eff29

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.secrets.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-08-29T15:52:09Z",
6+
"generated_at": "2024-08-29T15:52:08Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ To attach access management tags to resources in this module, you need the follo
245245
| <a name="input_security_group_rules"></a> [security\_group\_rules](#input\_security\_group\_rules) | A list of security group rules to be added to the default vpc security group (default empty) | <pre>list(<br/> object({<br/> name = string<br/> direction = string<br/> remote = optional(string)<br/> local = optional(string)<br/> ip_version = optional(string)<br/> tcp = optional(<br/> object({<br/> port_max = optional(number)<br/> port_min = optional(number)<br/> })<br/> )<br/> udp = optional(<br/> object({<br/> port_max = optional(number)<br/> port_min = optional(number)<br/> })<br/> )<br/> icmp = optional(<br/> object({<br/> type = optional(number)<br/> code = optional(number)<br/> })<br/> )<br/> })<br/> )</pre> | `[]` | no |
246246
| <a name="input_skip_custom_resolver_hub_creation"></a> [skip\_custom\_resolver\_hub\_creation](#input\_skip\_custom\_resolver\_hub\_creation) | Indicates whether to skip the configuration of a custom resolver in the hub VPC. Only relevant if enable\_hub is set to true. | `bool` | `false` | no |
247247
| <a name="input_skip_spoke_auth_policy"></a> [skip\_spoke\_auth\_policy](#input\_skip\_spoke\_auth\_policy) | Set to true to skip the creation of an authorization policy between the DNS resolution spoke and hub, only enable this if a policy already exists between these two VPCs. See https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-dns-sharing-s2s-auth&interface=ui for more details. | `bool` | `false` | no |
248-
| <a name="input_subnets"></a> [subnets](#input\_subnets) | List of subnets for the vpc. For each item in each array, a subnet will be created. Items can be either CIDR blocks or total ipv4 addresses. Public gateways will be enabled only in zones where a gateway has been created | <pre>object({<br/> zone-1 = list(object({<br/> name = string<br/> cidr = string<br/> public_gateway = optional(bool)<br/> acl_name = string<br/> no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true<br/> subnet_tags = optional(list(string), [])<br/> }))<br/> zone-2 = optional(list(object({<br/> name = string<br/> cidr = string<br/> public_gateway = optional(bool)<br/> acl_name = string<br/> no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true<br/> subnet_tags = optional(list(string), [])<br/> })))<br/> zone-3 = optional(list(object({<br/> name = string<br/> cidr = string<br/> public_gateway = optional(bool)<br/> acl_name = string<br/> no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true<br/> subnet_tags = optional(list(string), [])<br/> })))<br/> })</pre> | <pre>{<br/> "zone-1": [<br/> {<br/> "acl_name": "vpc-acl",<br/> "cidr": "10.10.10.0/24",<br/> "name": "subnet-a",<br/> "no_addr_prefix": false,<br/> "public_gateway": true<br/> }<br/> ],<br/> "zone-2": [<br/> {<br/> "acl_name": "vpc-acl",<br/> "cidr": "10.20.10.0/24",<br/> "name": "subnet-b",<br/> "no_addr_prefix": false,<br/> "public_gateway": true<br/> }<br/> ],<br/> "zone-3": [<br/> {<br/> "acl_name": "vpc-acl",<br/> "cidr": "10.30.10.0/24",<br/> "name": "subnet-c",<br/> "no_addr_prefix": false,<br/> "public_gateway": false<br/> }<br/> ]<br/>}</pre> | no |
248+
| <a name="input_subnets"></a> [subnets](#input\_subnets) | List of subnets for the vpc. For each item in each array, a subnet will be created. Items can be either CIDR blocks or total ipv4 addresses. Public gateways will be enabled only in zones where a gateway has been created | <pre>object({<br/> zone-1 = list(object({<br/> name = string<br/> cidr = string<br/> public_gateway = optional(bool)<br/> acl_name = string<br/> no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true<br/> subnet_tags = optional(list(string), [])<br/> }))<br/> zone-2 = optional(list(object({<br/> name = string<br/> cidr = string<br/> public_gateway = optional(bool)<br/> acl_name = string<br/> no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true<br/> subnet_tags = optional(list(string), [])<br/> })))<br/> zone-3 = optional(list(object({<br/> name = string<br/> cidr = string<br/> public_gateway = optional(bool)<br/> acl_name = string<br/> no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true<br/> subnet_tags = optional(list(string), [])<br/> })))<br/> })</pre> | <pre>{<br/> "zone-1": [<br/> {<br/> "acl_name": "vpc-acl",<br/> "cidr": "10.10.10.0/24",<br/> "name": "subnet-a",<br/> "no_addr_prefix": false,<br/> "public_gateway": true<br/> }<br/> ],<br/> "zone-2": [<br/> {<br/> "acl_name": "vpc-acl",<br/> "cidr": "10.20.10.0/24",<br/> "name": "subnet-b",<br/> "no_addr_prefix": false,<br/> "public_gateway": true<br/> }<br/> ],<br/> "zone-3": [<br/> {<br/> "acl_name": "vpc-acl",<br/> "cidr": "10.30.10.0/24",<br/> "name": "subnet-c",<br/> "no_addr_prefix": false,<br/> "public_gateway": true<br/> }<br/> ]<br/>}</pre> | no |
249249
| <a name="input_tags"></a> [tags](#input\_tags) | List of Tags for the resource created | `list(string)` | `null` | no |
250250
| <a name="input_update_delegated_resolver"></a> [update\_delegated\_resolver](#input\_update\_delegated\_resolver) | If set to true, and if the vpc is configured to be a spoke for DNS resolution (enable\_hub\_vpc\_crn or enable\_hub\_vpc\_id set), then the spoke VPC resolver will be updated to a delegated resolver. | `bool` | `false` | no |
251251
| <a name="input_use_existing_dns_instance"></a> [use\_existing\_dns\_instance](#input\_use\_existing\_dns\_instance) | Whether to use an existing dns instance. If true, existing\_dns\_instance\_id must be set. | `bool` | `false` | no |
252-
| <a name="input_use_public_gateways"></a> [use\_public\_gateways](#input\_use\_public\_gateways) | Create a public gateway in any of the three zones with `true`. | <pre>object({<br/> zone-1 = optional(bool)<br/> zone-2 = optional(bool)<br/> zone-3 = optional(bool)<br/> })</pre> | <pre>{<br/> "zone-1": true,<br/> "zone-2": false,<br/> "zone-3": false<br/>}</pre> | no |
252+
| <a name="input_use_public_gateways"></a> [use\_public\_gateways](#input\_use\_public\_gateways) | Create a public gateway in any of the three zones with `true`. | <pre>object({<br/> zone-1 = optional(bool)<br/> zone-2 = optional(bool)<br/> zone-3 = optional(bool)<br/> })</pre> | <pre>{<br/> "zone-1": true,<br/> "zone-2": true,<br/> "zone-3": true<br/>}</pre> | no |
253253
| <a name="input_vpc_flow_logs_name"></a> [vpc\_flow\_logs\_name](#input\_vpc\_flow\_logs\_name) | The name to give the provisioned VPC flow logs. If not set, the module generates a name based on the `prefix` and `name` variables. | `string` | `null` | no |
254254
| <a name="input_vpn_gateways"></a> [vpn\_gateways](#input\_vpn\_gateways) | List of VPN gateways to create. | <pre>list(<br/> object({<br/> name = string<br/> subnet_name = string # Do not include prefix, use same name as in `var.subnets`<br/> mode = optional(string)<br/> resource_group = optional(string)<br/> access_tags = optional(list(string), [])<br/> })<br/> )</pre> | `[]` | no |
255255

solutions/fully-configurable/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ variable "subnets" {
123123
{
124124
name = "subnet-b"
125125
cidr = "10.20.10.0/24"
126-
public_gateway = false
126+
public_gateway = true
127127
acl_name = "vpc-acl"
128128
no_addr_prefix = false
129129
}
@@ -132,7 +132,7 @@ variable "subnets" {
132132
{
133133
name = "subnet-c"
134134
cidr = "10.30.10.0/24"
135-
public_gateway = false
135+
public_gateway = true
136136
acl_name = "vpc-acl"
137137
no_addr_prefix = false
138138
}

variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ variable "use_public_gateways" {
299299
})
300300
default = {
301301
zone-1 = true
302-
zone-2 = false
303-
zone-3 = false
302+
zone-2 = true
303+
zone-3 = true
304304
}
305305

306306
validation {
@@ -372,7 +372,7 @@ variable "subnets" {
372372
{
373373
name = "subnet-c"
374374
cidr = "10.30.10.0/24"
375-
public_gateway = false
375+
public_gateway = true
376376
acl_name = "vpc-acl"
377377
no_addr_prefix = false
378378
}

0 commit comments

Comments
 (0)