initial commit
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
variable "name" {
|
||||
type = string
|
||||
description = "Name of apigateway"
|
||||
}
|
||||
|
||||
variable "description" {
|
||||
type = string
|
||||
description = "Description of apigateway"
|
||||
}
|
||||
|
||||
variable "apigw-type" {
|
||||
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'"
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}))
|
||||
description = "apigateway stages"
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user