Skip to content

Commit 5756ad1

Browse files
benjohnson-devbjohnsonbbryantbiggs
authored
feat: Add bring-your-own-ip adresses capability (#9)
* feat: Add bring-your-own-ip adresses capability * bump required aws provider to 4.35 * remove ip_addresses from complete example * chore: Remove validation --------- Co-authored-by: Ben Johnson <[email protected]> Co-authored-by: Bryant Biggs <[email protected]>
1 parent 204e6d7 commit 5756ad1

File tree

8 files changed

+19
-11
lines changed

8 files changed

+19
-11
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.77.0
3+
rev: v1.83.6
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate
@@ -23,7 +23,7 @@ repos:
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.4.0
26+
rev: v4.5.0
2727
hooks:
2828
- id: check-merge-conflict
2929
- id: end-of-file-fixer

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
109109
| Name | Version |
110110
|------|---------|
111111
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
112-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
112+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.35 |
113113

114114
## Providers
115115

116116
| Name | Version |
117117
|------|---------|
118-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0 |
118+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.35 |
119119

120120
## Modules
121121

@@ -141,6 +141,7 @@ No modules.
141141
| <a name="input_flow_logs_s3_bucket"></a> [flow\_logs\_s3\_bucket](#input\_flow\_logs\_s3\_bucket) | The name of the Amazon S3 bucket for the flow logs. Required if `flow_logs_enabled` is `true` | `string` | `null` | no |
142142
| <a name="input_flow_logs_s3_prefix"></a> [flow\_logs\_s3\_prefix](#input\_flow\_logs\_s3\_prefix) | The prefix for the location in the Amazon S3 bucket for the flow logs. Required if `flow_logs_enabled` is `true` | `string` | `null` | no |
143143
| <a name="input_ip_address_type"></a> [ip\_address\_type](#input\_ip\_address\_type) | The value for the address type. Defaults to `IPV4`. Valid values: `IPV4` | `string` | `"IPV4"` | no |
144+
| <a name="input_ip_addresses"></a> [ip\_addresses](#input\_ip\_addresses) | The IP addresses to use for BYOIP accelerators. If not specified, the service assigns IP addresses. Valid values: 1 or 2 IPv4 addresses | `list(string)` | `[]` | no |
144145
| <a name="input_listeners"></a> [listeners](#input\_listeners) | A map of listener defintions to create | `any` | `{}` | no |
145146
| <a name="input_listeners_timeouts"></a> [listeners\_timeouts](#input\_listeners\_timeouts) | Create, update, and delete timeout configurations for the listeners | `map(string)` | `{}` | no |
146147
| <a name="input_name"></a> [name](#input\_name) | The name of the accelerator | `string` | `""` | no |

examples/complete/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Note that this example may create resources which will incur monetary charges on
2424
| Name | Version |
2525
|------|---------|
2626
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
27-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |
27+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.35 |
2828

2929
## Providers
3030

3131
| Name | Version |
3232
|------|---------|
33-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.0 |
33+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.35 |
3434

3535
## Modules
3636

@@ -40,7 +40,7 @@ Note that this example may create resources which will incur monetary charges on
4040
| <a name="module_global_accelerator"></a> [global\_accelerator](#module\_global\_accelerator) | ../.. | n/a |
4141
| <a name="module_global_accelerator_disabled"></a> [global\_accelerator\_disabled](#module\_global\_accelerator\_disabled) | ../.. | n/a |
4242
| <a name="module_s3_log_bucket"></a> [s3\_log\_bucket](#module\_s3\_log\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 3.0 |
43-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
43+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 5.0 |
4444

4545
## Resources
4646

examples/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ data "aws_caller_identity" "current" {}
2121

2222
module "vpc" {
2323
source = "terraform-aws-modules/vpc/aws"
24-
version = "~> 3.0"
24+
version = "~> 5.0"
2525

2626
name = local.name
2727
cidr = "10.99.0.0/18"

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4.35"
88
}
99
}
1010
}

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ resource "aws_globalaccelerator_accelerator" "this" {
77

88
name = var.name
99
ip_address_type = var.ip_address_type
10+
ip_addresses = var.ip_addresses
1011
enabled = var.enabled
1112

1213
dynamic "attributes" {
@@ -48,7 +49,7 @@ resource "aws_globalaccelerator_listener" "this" {
4849
}
4950

5051
################################################################################
51-
# Endpoing Group(s)
52+
# Endpoint Group(s)
5253
################################################################################
5354

5455
resource "aws_globalaccelerator_endpoint_group" "this" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ variable "ip_address_type" {
2626
default = "IPV4"
2727
}
2828

29+
variable "ip_addresses" {
30+
description = "The IP addresses to use for BYOIP accelerators. If not specified, the service assigns IP addresses. Valid values: 1 or 2 IPv4 addresses"
31+
type = list(string)
32+
default = []
33+
}
34+
2935
variable "enabled" {
3036
description = "Indicates whether the accelerator is enabled. Defaults to `true`. Valid values: `true`, `false`"
3137
type = bool

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4.35"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)