Skip to content

Commit 6ba213e

Browse files
committed
fix: Update upgrade template; only deploy when not an HTTP API
1 parent 01010b8 commit 6ba213e

File tree

5 files changed

+65
-86
lines changed

5 files changed

+65
-86
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module "api_gateway" {
153153
| <a name="input_create_routes_and_integrations"></a> [create\_routes\_and\_integrations](#input\_create\_routes\_and\_integrations) | Whether to create routes and integrations resources | `bool` | `true` | no |
154154
| <a name="input_create_stage"></a> [create\_stage](#input\_create\_stage) | Whether to create default stage | `bool` | `true` | no |
155155
| <a name="input_credentials_arn"></a> [credentials\_arn](#input\_credentials\_arn) | Part of quick create. Specifies any credentials required for the integration. Applicable for HTTP APIs | `string` | `null` | no |
156-
| <a name="input_deploy_stage"></a> [deploy\_stage](#input\_deploy\_stage) | Whether to deploy the stage | `bool` | `true` | no |
156+
| <a name="input_deploy_stage"></a> [deploy\_stage](#input\_deploy\_stage) | Whether to deploy the stage. `HTTP` APIs are auto-deployed by default | `bool` | `true` | no |
157157
| <a name="input_description"></a> [description](#input\_description) | The description of the API. Must be less than or equal to 1024 characters in length | `string` | `null` | no |
158158
| <a name="input_disable_execute_api_endpoint"></a> [disable\_execute\_api\_endpoint](#input\_disable\_execute\_api\_endpoint) | Whether clients can invoke the API by using the default execute-api endpoint. By default, clients can invoke the API with the default `{api_id}.execute-api.{region}.amazonaws.com endpoint`. To require that clients use a custom domain name to invoke the API, disable the default endpoint | `bool` | `null` | no |
159159
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | The domain name to use for API gateway | `string` | `""` | no |

UPGRADE-3.0.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

UPGRADE-5.0.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Upgrade from v4.x to v5.x
2+
3+
Please consult the `examples` directory for reference example configurations. If you find a bug, please open an issue with supporting configuration to reproduce.
4+
5+
## List of backwards incompatible changes
6+
7+
- Minimum supported Terraform version increased to `v1.3` to support Terraform state `moved` blocks as well as other advanced features
8+
9+
## Additional changes
10+
11+
### Added
12+
13+
-
14+
15+
### Modified
16+
17+
-
18+
19+
### Removed
20+
21+
-
22+
23+
### Variable and output changes
24+
25+
1. Removed variables:
26+
27+
-
28+
29+
2. Renamed variables:
30+
31+
-
32+
33+
3. Added variables:
34+
35+
-
36+
37+
4. Removed outputs:
38+
39+
-
40+
41+
5. Renamed outputs:
42+
43+
-
44+
45+
6. Added outputs:
46+
47+
-
48+
49+
## Upgrade Migrations
50+
51+
### Diff of Before (v4.0) vs After (v5.0)
52+
53+
```diff
54+
module "apigateway_v2" {
55+
source = "terraform-aws-modules/apigateway-v2/aws"
56+
- version = "~> 4.0"
57+
+ version = "~> 5.0"
58+
59+
}
60+
```
61+
62+
## Terraform State Moves

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ resource "aws_apigatewayv2_stage" "this" {
329329
################################################################################
330330

331331
resource "aws_apigatewayv2_deployment" "this" {
332-
count = local.create_stage && var.deploy_stage && var.stage_name != "$default" ? 1 : 0
332+
count = local.create_stage && var.deploy_stage && !local.is_http ? 1 : 0
333333

334334
api_id = aws_apigatewayv2_api.this[0].id
335335
description = var.description

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ variable "stage_tags" {
241241
################################################################################
242242

243243
variable "deploy_stage" {
244-
description = "Whether to deploy the stage"
244+
description = "Whether to deploy the stage. `HTTP` APIs are auto-deployed by default"
245245
type = bool
246246
default = true
247247
}

0 commit comments

Comments
 (0)