Skip to content

Commit d50a3cb

Browse files
Update variables description
1 parent 04ff3d9 commit d50a3cb

File tree

4 files changed

+67
-25
lines changed

4 files changed

+67
-25
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ No modules.
583583
| <a name="input_single_nat_gateway"></a> [single\_nat\_gateway](#input\_single\_nat\_gateway) | Should be true if you want to provision a single shared NAT Gateway across all of your private networks | `bool` | `false` | no |
584584
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
585585
| <a name="input_use_ipam_pool"></a> [use\_ipam\_pool](#input\_use\_ipam\_pool) | Determines whether IPAM pool is used for CIDR allocation | `bool` | `false` | no |
586-
| <a name="input_vpc_block_public_access_exclusions"></a> [vpc\_block\_public\_access\_exclusions](#input\_vpc\_block\_public\_access\_exclusions) | List of VPC Block Public Access Exclusions | `map(any)` | `{}` | no |
587-
| <a name="input_vpc_block_public_access_options"></a> [vpc\_block\_public\_access\_options](#input\_vpc\_block\_public\_access\_options) | Map of VPC Block Public Access Options | `map(string)` | `{}` | no |
586+
| <a name="input_vpc_block_public_access_exclusions"></a> [vpc\_block\_public\_access\_exclusions](#input\_vpc\_block\_public\_access\_exclusions) | List of VPC Block Public Access Exclusions e.g. to exclude the VPC:<br/><br/> vpc\_block\_public\_access\_exclusions = {<br/> exclude\_vpc = {<br/> exclude\_vpc = true<br/> internet\_gateway\_exclusion\_mode = "allow-bidirectional"<br/> }<br/> }<br/><br/> or to exclude specific subnets:<br/><br/> vpc\_block\_public\_access\_exclusions = {<br/> exclude\_subnet\_private1 = {<br/> exclude\_subnet = true<br/> subnet\_type = "private"<br/> subnet\_index = 1<br/> internet\_gateway\_exclusion\_mode = "allow-egress"<br/> }<br/> exclude\_subnet\_private2 = {<br/> exclude\_subnet = true<br/> subnet\_type = "private"<br/> subnet\_index = 2<br/> internet\_gateway\_exclusion\_mode = "allow-egress"<br/> }<br/> }<br/><br/> One of `exclude_vpc` or `exclude_subnet` must be set to true.<br/> Value of `subnet_type` can be `public`, `private`, `database`, `redshift`, `elasticache`, `intra` or `custom`.<br/> Value of `subnet_index` is the index of the subnet in the corresponding subnet list.<br/> Value of `internet_gateway_exclusion_mode` can be `allow-egress` and `allow-bidirectional`. | `map(any)` | `{}` | no |
587+
| <a name="input_vpc_block_public_access_options"></a> [vpc\_block\_public\_access\_options](#input\_vpc\_block\_public\_access\_options) | Map of VPC Block Public Access Options e.g.:<br/><br/> vpc\_block\_public\_access\_options = {<br/> internet\_gateway\_block\_mode = "block-bidirectional"<br/> }<br/><br/> Currently only `internet_gateway_block_mode` is supported, for which<br/> valid values are `block-bidirectional`, `block-ingress` and `off`. | `map(string)` | `{}` | no |
588588
| <a name="input_vpc_flow_log_iam_policy_name"></a> [vpc\_flow\_log\_iam\_policy\_name](#input\_vpc\_flow\_log\_iam\_policy\_name) | Name of the IAM policy | `string` | `"vpc-flow-log-to-cloudwatch"` | no |
589589
| <a name="input_vpc_flow_log_iam_policy_use_name_prefix"></a> [vpc\_flow\_log\_iam\_policy\_use\_name\_prefix](#input\_vpc\_flow\_log\_iam\_policy\_use\_name\_prefix) | Determines whether the name of the IAM policy (`vpc_flow_log_iam_policy_name`) is used as a prefix | `bool` | `true` | no |
590590
| <a name="input_vpc_flow_log_iam_role_name"></a> [vpc\_flow\_log\_iam\_role\_name](#input\_vpc\_flow\_log\_iam\_role\_name) | Name to use on the VPC Flow Log IAM role created | `string` | `"vpc-flow-log-role"` | no |

examples/block-public-access/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ This example defines VPC Block Public Access Exclusion at the subnet level, but
2222

2323
- configure VPC Block Public Access Options e.g.:
2424
```hcl
25-
internet_gateway_block_enabled = true
26-
internet_gateway_block_mode = "block-bidirectional"
25+
vpc_block_public_access_options = {
26+
internet_gateway_block_mode = "block-bidirectional"
27+
}
2728
```
2829

2930
- define VPC Block Public Access Exclusion at the VPC level e.g.:

examples/block-public-access/main.tf

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,28 @@ module "vpc" {
3737
}
3838

3939
### VPC Block Public Access Exclusion at the VPC level
40-
# vpc_block_public_access_exclusions = {
41-
# exclude_vpc = {
42-
# exclude_vpc = true
43-
# internet_gateway_exclusion_mode = "allow-bidirectional"
44-
# }
45-
# }
46-
47-
### VPC Block Public Access Exclusion at the subnet level
4840
vpc_block_public_access_exclusions = {
49-
exclude_subnet_private1 = {
50-
exclude_subnet = true
51-
subnet_type = "private"
52-
subnet_index = 1
53-
internet_gateway_exclusion_mode = "allow-egress"
54-
}
55-
exclude_subnet_private2 = {
56-
exclude_subnet = true
57-
subnet_type = "private"
58-
subnet_index = 2
59-
internet_gateway_exclusion_mode = "allow-egress"
41+
exclude_vpc = {
42+
exclude_vpc = true
43+
internet_gateway_exclusion_mode = "allow-bidirectional"
6044
}
6145
}
6246

47+
### VPC Block Public Access Exclusion at the subnet level
48+
# vpc_block_public_access_exclusions = {
49+
# exclude_subnet_private1 = {
50+
# exclude_subnet = true
51+
# subnet_type = "private"
52+
# subnet_index = 1
53+
# internet_gateway_exclusion_mode = "allow-egress"
54+
# }
55+
# exclude_subnet_private2 = {
56+
# exclude_subnet = true
57+
# subnet_type = "private"
58+
# subnet_index = 2
59+
# internet_gateway_exclusion_mode = "allow-egress"
60+
# }
61+
# }
62+
6363
tags = local.tags
6464
}

variables.tf

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,54 @@ variable "tags" {
117117
}
118118

119119
variable "vpc_block_public_access_options" {
120-
description = "Map of VPC Block Public Access Options"
120+
description = <<EOF
121+
Map of VPC Block Public Access Options e.g.:
122+
123+
vpc_block_public_access_options = {
124+
internet_gateway_block_mode = "block-bidirectional"
125+
}
126+
127+
Currently only `internet_gateway_block_mode` is supported, for which
128+
valid values are `block-bidirectional`, `block-ingress` and `off`.
129+
EOF
121130
type = map(string)
122131
default = {}
123132
}
124133

125134
variable "vpc_block_public_access_exclusions" {
126-
description = "List of VPC Block Public Access Exclusions"
135+
description = <<EOF
136+
List of VPC Block Public Access Exclusions e.g. to exclude the VPC:
137+
138+
vpc_block_public_access_exclusions = {
139+
exclude_vpc = {
140+
exclude_vpc = true
141+
internet_gateway_exclusion_mode = "allow-bidirectional"
142+
}
143+
}
144+
145+
or to exclude specific subnets:
146+
147+
vpc_block_public_access_exclusions = {
148+
exclude_subnet_private1 = {
149+
exclude_subnet = true
150+
subnet_type = "private"
151+
subnet_index = 1
152+
internet_gateway_exclusion_mode = "allow-egress"
153+
}
154+
exclude_subnet_private2 = {
155+
exclude_subnet = true
156+
subnet_type = "private"
157+
subnet_index = 2
158+
internet_gateway_exclusion_mode = "allow-egress"
159+
}
160+
}
161+
162+
One of `exclude_vpc` or `exclude_subnet` must be set to true.
163+
Value of `subnet_type` can be `public`, `private`, `database`, `redshift`, `elasticache`, `intra` or `custom`.
164+
Value of `subnet_index` is the index of the subnet in the corresponding subnet list.
165+
Value of `internet_gateway_exclusion_mode` can be `allow-egress` and `allow-bidirectional`.
166+
167+
EOF
127168
type = map(any)
128169
default = {}
129170
}

0 commit comments

Comments
 (0)