From 59815f9bee370a2623ecadbf4ef8f3fe69f69c09 Mon Sep 17 00:00:00 2001 From: Byungjin Park Date: Sun, 22 Oct 2023 23:41:46 +0900 Subject: [PATCH] Fix vpc module --- modules/vpc/README.md | 2 +- modules/vpc/variables.tf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/vpc/README.md b/modules/vpc/README.md index 1b33b16..8f1ad20 100644 --- a/modules/vpc/README.md +++ b/modules/vpc/README.md @@ -70,7 +70,7 @@ This module creates following resources. | [egress\_only\_internet\_gateway](#input\_egress\_only\_internet\_gateway) | (Required) The configuration for an Egress-only Internet Gateway of the VPC. Egress-only Internet Gateway is VPC component that allows outbound only communication to the internet over IPv6, and prevents the Internet from initiating an IPv6 connection with your instances. `egress_only_internet_gateway` as defined below.
(Optional) `enabled` - Whether to create an egress-only Internet gateway for the VPC. Defaults to `false`.
(Optional) `name` - The name of the Egress-only Internet Gateway. Defaults to same name of the VPC. |
object({
enabled = optional(bool, false)
name = optional(string)
})
| `{}` | no | | [internet\_gateway](#input\_internet\_gateway) | (Required) The configuration for an Internet Gateway of the VPC. An internet gateway is a virtual router that connects a VPC to the internet. `internet_gateway` as defined below.
(Optional) `enabled` - Whether to create an Internet gateway for the VPC. Defaults to `true`.
(Optional) `name` - The name of the Internet Gateway. Defaults to same name of the VPC. |
object({
enabled = optional(bool, true)
name = optional(string)
})
| `{}` | no | | [ipv4\_cidrs](#input\_ipv4\_cidrs) | (Required) A list of IPv4 CIDR blocks for the VPC. At least one CIDR must be defined. Each block of `ipv4_cidrs` as defined below.
(Optional) `type` - Valid values are `MANUAL` and `IPAM_POOL`. Defaults to `MANUAL`.
(Optional) `cidr` - The CIDR block for the VPC. CIDR block size must be between /16 and /28.
(Optional) `ipam_pool` - The configuration to get an IPv4 CIDR from the IPAM pool to use for the VPC. Required if `type` is `IPAM_POOL`. `ipam_pool` as defined below.
(Required) `id` - The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR.
(Optional) `netmask_length` - The netmask length of the IPv4 CIDR you want to allocate to this VPC. |
list(object({
type = optional(string, "MANUAL")
cidr = optional(string)
ipam_pool = optional(object({
id = string
netmask_length = optional(number)
}))
}))
| `[]` | no | -| [ipv6\_cidrs](#input\_ipv6\_cidrs) | (Optional) A list of IPv6 CIDR blocks for the VPC. Each block of `ipv6_cidrs` as defined below.
(Optional) `type` - Valid values are `AMAZON` and `IPAM_POOL`. Defaults to `AMAZON`.
(Optional) `network_border_group` - The name of the network border group. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. Defaults to the region of the VPC.
(Optional) `ipam_pool` - The configuration to get an IPv6 CIDR from the IPAM pool to use for the VPC. Required if `type` is `IPAM_POOL`. `ipam_pool` as defined below.
(Required) `id` - The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR.
(Optional) `cidr` - The CIDR block for the VPC. The CIDR can be explicitly set. Required if `netmask_length` is not set and the IPAM pool does not have `allocation_default_netmask` set.
(Optional) `netmask_length` - The netmask length of the IPv6 CIDR you want to allocate to this VPC. |
list(object({
type = optional(string, "AMAZON")
amazon = optional(object({
network_border_group = optional(string)
}), {})
ipam_pool = optional(object({
id = string
cidr = optional(string)
netmask_length = optional(number)
}))
}))
| `[]` | no | +| [ipv6\_cidrs](#input\_ipv6\_cidrs) | (Optional) A list of IPv6 CIDR blocks for the VPC. Each block of `ipv6_cidrs` as defined below.
(Optional) `type` - Valid values are `AMAZON` and `IPAM_POOL`. Defaults to `AMAZON`.
(Optional) `amazon` - The configuration to get the Amazon-provided IPv6 CIDR to use for the VPC. Only used if `type` is `AMAZON`. `amazon` as defined below.
(Optional) `network_border_group` - The name of the network border group. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. Defaults to the region of the VPC.
(Optional) `ipam_pool` - The configuration to get an IPv6 CIDR from the IPAM pool to use for the VPC. Required if `type` is `IPAM_POOL`. `ipam_pool` as defined below.
(Required) `id` - The ID of an IPv6 IPAM pool you want to use for allocating this VPC's CIDR.
(Optional) `cidr` - The CIDR block for the VPC. The CIDR can be explicitly set. Required if `netmask_length` is not set and the IPAM pool does not have `allocation_default_netmask` set.
(Optional) `netmask_length` - The netmask length of the IPv6 CIDR you want to allocate to this VPC. |
list(object({
type = optional(string, "AMAZON")
amazon = optional(object({
network_border_group = optional(string)
}), {})
ipam_pool = optional(object({
id = string
cidr = optional(string)
netmask_length = optional(number)
}))
}))
| `[]` | no | | [module\_tags\_enabled](#input\_module\_tags\_enabled) | (Optional) Whether to create AWS Resource Tags for the module informations. | `bool` | `true` | no | | [network\_address\_usage\_metrics\_enabled](#input\_network\_address\_usage\_metrics\_enabled) | (Optional) Whether NAU (Network Address Usage) metrics are enabled for the VPC. Defaults to `false`. | `bool` | `false` | no | | [private\_hosted\_zones](#input\_private\_hosted\_zones) | (Optional) List of private Hosted Zone IDs to associate. | `list(string)` | `[]` | no | diff --git a/modules/vpc/variables.tf b/modules/vpc/variables.tf index 5e8e2cd..c73bdcc 100644 --- a/modules/vpc/variables.tf +++ b/modules/vpc/variables.tf @@ -41,7 +41,8 @@ variable "ipv6_cidrs" { description = <