Skip to content

Commit 92e29d7

Browse files
committed
Update README and CHANGELOG ahead of release.
1 parent ab786ea commit 92e29d7

File tree

9 files changed

+143
-91
lines changed

9 files changed

+143
-91
lines changed

CHANGELOG.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# Changelog
2-
All notable changes to this project will be documented in this file.
1+
## Unreleased
32

4-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3+
## 1.0.0 (December 28th, 2022)
64

7-
## [Unreleased]
5+
IMPROVEMENTS
86

9-
### Added
10-
-
11-
12-
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/HEAD
7+
* Configuration to manage a private integration has been added including an
8+
API Gateway integration, a set of API Gateway routes and optionally, a VPC
9+
link.

README.md

Lines changed: 94 additions & 51 deletions
Large diffs are not rendered by default.

examples/basic/prerequisites.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ data "aws_availability_zones" "zones" {}
22

33
module "base_networking" {
44
source = "infrablocks/base-networking/aws"
5-
version = "4.0.0"
5+
version = "5.0.0"
66

77
region = var.region
88
availability_zones = data.aws_availability_zones.zones.names
@@ -18,7 +18,7 @@ module "base_networking" {
1818

1919
module "api_gateway" {
2020
source = "infrablocks/api-gateway-v2/aws"
21-
version = "1.0.0-rc.3"
21+
version = "1.0.0"
2222

2323
component = var.component
2424
deployment_identifier = var.deployment_identifier
@@ -33,7 +33,7 @@ module "api_gateway" {
3333

3434
module "application_load_balancer" {
3535
source = "infrablocks/application-load-balancer/aws"
36-
version = "3.1.0-rc.8"
36+
version = "4.0.0"
3737

3838
region = var.region
3939
vpc_id = module.base_networking.vpc_id

outputs.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
output "integration_id" {
2-
value = aws_apigatewayv2_integration.integration.id
2+
description = "The ID of the managed private integration."
3+
value = aws_apigatewayv2_integration.integration.id
34
}
45

56
output "vpc_link_id" {
6-
value = try(module.api_gateway_vpc_link[0].vpc_link_id, var.vpc_link_id)
7+
description = "Either the ID of the managed VPC link, if included, otherwise the provided VPC link ID."
8+
value = try(module.api_gateway_vpc_link[0].vpc_link_id, var.vpc_link_id)
79
}
810

911
output "vpc_link_default_security_group_id" {
10-
value = try(module.api_gateway_vpc_link[0].vpc_link_default_security_group_id, "")
12+
description = "The ID of the default security group created for the managed VPC link.This is an empty string if the security group is not included."
13+
value = try(module.api_gateway_vpc_link[0].vpc_link_default_security_group_id, "")
1114
}
1215

1316
output "routes" {
14-
value = {for route in local.routes: route.route_key => aws_apigatewayv2_route.route[route.route_key].id }
17+
description = "A map of the routes added to the private integration."
18+
value = {for route in local.routes : route.route_key => aws_apigatewayv2_route.route[route.route_key].id}
1519
}

spec/integration/basic_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
end
99

1010
after(:context) do
11-
destroy(role: :basic)
11+
destroy(
12+
role: :basic,
13+
only_if: -> { !ENV['FORCE_DESTROY'].nil? || ENV['SEED'].nil? }
14+
)
1215
end
1316

1417
describe 'integration' do

spec/integration/spec_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
config.terraform_configuration_provider =
2626
RSpec::Terraform::Configuration.chain_provider(
2727
providers: [
28-
RSpec::Terraform::Configuration.seed_provider,
28+
RSpec::Terraform::Configuration.seed_provider(
29+
generator: -> { SecureRandom.hex[0, 8] }
30+
),
2931
RSpec::Terraform::Configuration.in_memory_provider(
3032
no_color: true
3133
),

spec/unit/infra/prerequisites/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ data "aws_availability_zones" "zones" {}
22

33
module "base_networking" {
44
source = "infrablocks/base-networking/aws"
5-
version = "4.0.0"
5+
version = "5.0.0"
66

77
region = var.region
88
availability_zones = data.aws_availability_zones.zones.names
@@ -18,7 +18,7 @@ module "base_networking" {
1818

1919
module "api_gateway" {
2020
source = "infrablocks/api-gateway-v2/aws"
21-
version = "1.0.0-rc.3"
21+
version = "1.0.0"
2222

2323
component = var.component
2424
deployment_identifier = var.deployment_identifier
@@ -33,7 +33,7 @@ module "api_gateway" {
3333

3434
module "application_load_balancer" {
3535
source = "infrablocks/application-load-balancer/aws"
36-
version = "3.1.0-rc.8"
36+
version = "4.0.0"
3737

3838
region = var.region
3939
vpc_id = module.base_networking.vpc_id

spec/unit/spec_helper.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
config.terraform_configuration_provider =
3333
RSpec::Terraform::Configuration.chain_provider(
3434
providers: [
35-
RSpec::Terraform::Configuration.seed_provider,
35+
RSpec::Terraform::Configuration.seed_provider(
36+
generator: -> { SecureRandom.hex[0, 8] }
37+
),
3638
RSpec::Terraform::Configuration.in_memory_provider(
3739
no_color: true
3840
),
@@ -55,7 +57,7 @@
5557
config.after(:suite) do
5658
destroy(
5759
role: :prerequisites,
58-
only_if: -> { ENV['SEED'].nil? }
60+
only_if: -> { !ENV['FORCE_DESTROY'].nil? || ENV['SEED'].nil? }
5961
)
6062
end
6163
end

variables.tf

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,36 @@ variable "component" {
33
type = string
44
}
55
variable "deployment_identifier" {
6-
type = string
76
description = "An identifier for this instantiation."
7+
type = string
88
}
99

1010
variable "api_id" {
11-
type = string
1211
description = "The ID of the API gateway API for which to create the integration."
12+
type = string
1313
}
1414
variable "integration_uri" {
15-
type = string
1615
description = "The integration URI to use for the private integration, typically the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service."
16+
type = string
1717
}
1818
variable "tls_server_name_to_verify" {
19-
type = string
2019
description = "The server name of the target to verify for TLS communication. Only required when `use_tls` is `true`."
20+
type = string
2121
default = null
2222
}
2323

2424
variable "routes" {
25+
description = "The routes to configure for this private integration. Required when `include_routes` is `true`. Defaults to a single route with key \"ANY /{proxy+}\"."
2526
type = list(object({
2627
route_key: string
2728
}))
28-
description = "The routes to configure for this private integration. Required when `include_routes` is `true`. Defaults to a single route with key \"ANY /{proxy+}\"."
2929
default = [{
3030
route_key: "ANY /{proxy+}"
3131
}]
3232
}
3333

3434
variable "request_parameters" {
35+
description = "The request parameters to configure for this private integration."
3536
type = list(object({
3637
parameter: string,
3738
type: string,
@@ -42,66 +43,66 @@ variable "request_parameters" {
4243

4344
# Needs tests
4445
variable "vpc_id" {
45-
type = string
4646
description = "The ID of the VPC in which to create the VPC link for this private integration. Required when `include_vpc_link` and `include_vpc_link_default_security_group` are both `true`."
47+
type = string
4748
default = null
4849
}
4950
variable "vpc_link_id" {
50-
type = string
5151
description = "The ID of a VPC link to use when creating the private integration. Only required if `include_vpc_link` is `false`."
52+
type = string
5253
default = null
5354
}
5455
variable "vpc_link_subnet_ids" {
55-
type = list(string)
5656
description = "The subnet IDs in which to create the VPC link for this private integration. Required when `include_vpc_link` is `true`."
57+
type = list(string)
5758
default = []
5859
}
5960
# Needs tests
6061
variable "vpc_link_default_ingress_cidrs" {
61-
type = list(string)
6262
description = "The CIDRs allowed access to the VPC via the VPC link when using the default ingress rule."
63+
type = list(string)
6364
default = ["0.0.0.0/0"]
6465
}
6566
# Needs tests
6667
variable "vpc_link_default_egress_cidrs" {
67-
type = list(string)
6868
description = "The CIDRs accessible within the VPC via the VPC link when using the default egress rule."
69+
type = list(string)
6970
default = ["0.0.0.0/0"]
7071
}
7172

7273
variable "tags" {
73-
type = map(string)
7474
description = "Additional tags to set on created resources."
75+
type = map(string)
7576
default = {}
7677
}
7778

7879
variable "include_default_tags" {
79-
type = bool
8080
description = "Whether or not to include default tags on created resources. Defaults to `true`."
81+
type = bool
8182
default = true
8283
}
8384
variable "include_vpc_link" {
84-
type = bool
8585
description = "Whether or not to create a VPC link for the private integration. Defaults to `true`."
86+
type = bool
8687
default = true
8788
}
8889
variable "include_vpc_link_default_security_group" {
89-
type = bool
9090
description = "Whether or not to create a default security group for the VPC link for the private integration. Defaults to `true`."
91+
type = bool
9192
default = true
9293
}
9394
variable "include_vpc_link_default_ingress_rule" {
94-
type = bool
9595
description = "Whether or not to create the default ingress rule on the security group created for the VPC link. Defaults to `true`."
96+
type = bool
9697
default = true
9798
}
9899
variable "include_vpc_link_default_egress_rule" {
99-
type = bool
100100
description = "Whether or not to create the default egress rule on the security group created for the VPC link. Defaults to `true`."
101+
type = bool
101102
default = true
102103
}
103104
variable "use_tls" {
104-
type = bool
105105
description = "Whether or not to use TLS when communicating with the target of this integration. Defaults to `true`."
106+
type = bool
106107
default = true
107108
}

0 commit comments

Comments
 (0)