Skip to content

Commit

Permalink
feat: custome stage name and auto-deploy variable (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
h1manshu98 committed Nov 14, 2023
1 parent 007c3d8 commit 233d34b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ resource "aws_apigatewayv2_stage" "default" {
count = var.enabled && var.create_default_stage_enabled ? 1 : 0

api_id = aws_apigatewayv2_api.default[0].id
name = format("%s-stage", module.labels.id)
auto_deploy = false
name = var.stage_name != null ? var.stage_name : format("%s-stage", module.labels.id)
auto_deploy = var.auto_deploy
dynamic "access_log_settings" {
for_each = var.access_log_settings
content {
Expand Down
14 changes: 13 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,16 @@ variable "passthrough_behavior" {
type = string
default = "WHEN_NO_MATCH"
description = "Pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the request_templates attribute. "
}
}

variable "stage_name" {
type = string
default = null
description = "Stage Name to be used, set to `$default` to use Invoke URL as your default webpage for lambda"
}

variable "auto_deploy" {
type = bool
default = false
description = "Set this to true to enable stage Auto Deployment"
}

0 comments on commit 233d34b

Please sign in to comment.