Skip to content

Commit

Permalink
add assign_generated_ipv6_cidr_block variable to toggle IPv6 VPC asso…
Browse files Browse the repository at this point in the history
…ciation (#81)
  • Loading branch information
1david5 authored Feb 19, 2021
1 parent 7b608d3 commit fbbee77
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,29 @@ Available targets:
|------|---------|
| aws | >= 2.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| label | cloudposse/label/null | 0.24.1 |
| this | cloudposse/label/null | 0.24.1 |

## Resources

| Name |
|------|
| [aws_default_security_group](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/default_security_group) |
| [aws_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/internet_gateway) |
| [aws_vpc_ipv4_cidr_block_association](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/vpc_ipv4_cidr_block_association) |
| [aws_vpc](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/vpc) |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| additional\_cidr\_blocks | A list of additional IPv4 CIDR blocks to associate with the VPC | `list(string)` | `null` | no |
| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
| assign\_generated\_ipv6\_cidr\_block | Whether to assign generated ipv6 cidr block to the VPC | `bool` | `true` | no |
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
| cidr\_block | CIDR for the VPC | `string` | n/a | yes |
| context | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {}<br>}</pre> | no |
Expand Down Expand Up @@ -199,7 +216,6 @@ Available targets:
| vpc\_id | The ID of the VPC |
| vpc\_ipv6\_association\_id | The association ID for the IPv6 CIDR block |
| vpc\_main\_route\_table\_id | The ID of the main route table associated with this VPC |

<!-- markdownlint-restore -->


Expand Down
18 changes: 17 additions & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,29 @@
|------|---------|
| aws | >= 2.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| label | cloudposse/label/null | 0.24.1 |
| this | cloudposse/label/null | 0.24.1 |

## Resources

| Name |
|------|
| [aws_default_security_group](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/default_security_group) |
| [aws_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/internet_gateway) |
| [aws_vpc_ipv4_cidr_block_association](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/vpc_ipv4_cidr_block_association) |
| [aws_vpc](https://registry.terraform.io/providers/hashicorp/aws/2.0/docs/resources/vpc) |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| additional\_cidr\_blocks | A list of additional IPv4 CIDR blocks to associate with the VPC | `list(string)` | `null` | no |
| additional\_tag\_map | Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. | `map(string)` | `{}` | no |
| assign\_generated\_ipv6\_cidr\_block | Whether to assign generated ipv6 cidr block to the VPC | `bool` | `true` | no |
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
| cidr\_block | CIDR for the VPC | `string` | n/a | yes |
| context | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {}<br>}</pre> | no |
Expand Down Expand Up @@ -58,5 +75,4 @@
| vpc\_id | The ID of the VPC |
| vpc\_ipv6\_association\_id | The association ID for the IPv6 CIDR block |
| vpc\_main\_route\_table\_id | The ID of the main route table associated with this VPC |

<!-- markdownlint-restore -->
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "aws_vpc" "default" {
enable_dns_support = var.enable_dns_support
enable_classiclink = var.enable_classiclink
enable_classiclink_dns_support = var.enable_classiclink_dns_support
assign_generated_ipv6_cidr_block = true
assign_generated_ipv6_cidr_block = var.assign_generated_ipv6_cidr_block
tags = module.label.tags
}

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ variable "additional_cidr_blocks" {
description = "A list of additional IPv4 CIDR blocks to associate with the VPC"
default = null
}

variable "assign_generated_ipv6_cidr_block" {
type = bool
description = "Whether to assign generated ipv6 cidr block to the VPC"
default = true
}

0 comments on commit fbbee77

Please sign in to comment.