It seems that there are missing information from the docs here [https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/apigatewayv2_api#cors_configuration].
I don’t see any example for the cors_configuration
param.
Here is the code of this module
I read about Schema Attributes and Types but still cannot deal with it https://www.terraform.io/docs/extend/schemas/schema-types.html.
Here is my configuration:
resource "aws_apigatewayv2_api" "_" {
name = "staging API"
protocol_type = "HTTP"
cors_configuration = [
"allow_origins" = ["api.test.com"],
"allow_methods" = ["POST", "GET"],
"allow_headers" = ["content-type"],
"max_age" = 300
]
}
1 post - 1 participant