terraform.aws-baseline-infra/modules/ApplicationIntegration/apigw-lambda/variables.tf

90 lines
2.0 KiB
Terraform
Raw Normal View History

2024-03-04 11:15:34 +08:00
variable "name" {
type = string
description = "Name of apigateway"
}
variable "description" {
type = string
description = "Description of apigateway"
}
variable "apigw-type" {
2024-03-04 11:15:34 +08:00
type = string
description = "Type of apigateway: private or regional"
validation {
condition = can(regex("^(private|regional)$", var.apigw-type))
error_message = "Invalid apigw type, only allowed types are: 'private', 'regional'"
}
2024-03-04 11:15:34 +08:00
}
variable "resources" {
type = map(object({
method = string
authorization = string
integration_type = string
content_handling = string
}))
description = "Apigateway resources (path_part)"
}
variable "stages" {
type = map(object({
description = string
variables = map(string)
}))
2024-03-04 14:12:59 +08:00
description = "apigateway stages"
2024-03-04 11:15:34 +08:00
}
variable "lambda-archive-file" {
type = string
description = "Path to lambda zip archive"
}
variable "lambda-runtime-version" {
type = string
description = "Lambda runtime version"
default = "python3.12"
}
variable "lambda-main-function-name" {
type = string
2024-03-04 11:15:34 +08:00
description = "Main python file without the .py extension"
}
variable "apigw-vpc-id" {
type = string
description = "VPC id of apigateway"
}
variable "apigw-subnet-ids" {
type = list(string)
description = "Subnet IDs of apigateway"
}
variable "apigw-security-group-id" {
type = string
description = "Security group id of apigateway"
}
variable "create-vpc-link" {
type = bool
description = "Set true to create vpc link for outbound access to specific targets"
}
variable "apigw-vpc-link-target-arns" {
type = list(string)
description = "Target arns for apigateway VPC link"
default = []
}
variable "cloudwatchlog-retention" {
type = number
description = "Cloudwatch log group retention days"
default = 14
}
variable "cwl-cmk-key-id" {
type = string
description = "CMK arn for cloudwatch logs encryption"
default = null
2024-03-04 11:15:34 +08:00
}