Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 10, 2023
1 parent a9e4136 commit 06bed40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subnets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ No modules.
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | AWS Account ID (default: will pull from current user) | `string` | `""` | no |
| <a name="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones) | AWS Availability Zones to use (by default will use all available) | `list(string)` | `[]` | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_private_subnets"></a> [private\_subnets](#input\_private\_subnets) | List of objects with private subnet information to be created | <pre>list(object({<br> base_cidr = string<br> label = string<br> bits = number<br> offset = optional(number, 0)<br> private = bool<br> tags = map(string)<br> enabled = optional(bool, true)<br> availability_zone = optional(string)<br> availability_zones = optional(list(string))<br> # subnets = list(string)<br> # labels = list(string)<br> }))</pre> | `[]` | no |
| <a name="input_public_subnets"></a> [public\_subnets](#input\_public\_subnets) | List of objects with public subnet information to be created | <pre>list(object({<br> base_cidr = string<br> label = string<br> bits = number<br> offset = optional(number, 0)<br> private = bool<br> tags = map(string)<br> enabled = optional(bool, true)<br> availability_zone = optional(string)<br> availability_zones = optional(list(string))<br> # subnets = list(string)<br> # labels = list(string)<br> }))</pre> | `[]` | no |
| <a name="input_private_subnets"></a> [private\_subnets](#input\_private\_subnets) | List of objects with private subnet information to be created | <pre>list(object({<br> base_cidr = string<br> label = string<br> bits = number<br> offset = optional(number, 0)<br> private = bool<br> tags = map(string)<br> enabled = optional(bool, true)<br> availability_zone = optional(string)<br> availability_zones = optional(list(string), [])<br> # subnets = list(string)<br> # labels = list(string)<br> }))</pre> | `[]` | no |
| <a name="input_public_subnets"></a> [public\_subnets](#input\_public\_subnets) | List of objects with public subnet information to be created | <pre>list(object({<br> base_cidr = string<br> label = string<br> bits = number<br> offset = optional(number, 0)<br> private = bool<br> tags = map(string)<br> enabled = optional(bool, true)<br> availability_zone = optional(string)<br> availability_zones = optional(list(string), [])<br> # subnets = list(string)<br> # labels = list(string)<br> }))</pre> | `[]` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources (S3, KMS). Do not include safeguard tags here, use the data\_safeguard field for such things. | `map(string)` | `{}` | no |
| <a name="input_vpc_environment"></a> [vpc\_environment](#input\_vpc\_environment) | VPC environment purpose (infrastructure, common, shared, dev, stage, ite, prod) | `string` | `null` | no |
| <a name="input_vpc_full_name"></a> [vpc\_full\_name](#input\_vpc\_full\_name) | VPC full name component (vpc{index}-{vpc\_name}) | `string` | `null` | no |
Expand Down
2 changes: 2 additions & 0 deletions subnets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ locals {
label = v.label
bits = v.bits
private = v.private
offset = v.offset
# subnets = [for i in local.az_count_list : cidrsubnet(v.base_cidr, v.bits, v.offset + i)]
# labels = [for az in local.availability_zones : format("%v-%v", v.label, az)]
availability_zones = length(lookup(v, "availability_zones", [])) != 0 ? lookup(v, "availability_zones") : local.availability_zones
Expand Down Expand Up @@ -129,6 +130,7 @@ locals {
label = v.label
bits = v.bits
private = v.private
offset = v.offset
# subnets = [for i in local.az_count_list : cidrsubnet(v.base_cidr, v.bits, v.offset + i)]
# labels = [for az in local.availability_zones : format("%v-%v", v.label, az)]
availability_zones = length(lookup(v, "availability_zones", [])) != 0 ? lookup(v, "availability_zones") : local.availability_zones
Expand Down

0 comments on commit 06bed40

Please sign in to comment.