Skip to content

Commit ea5596e

Browse files
authored
Merge pull request #2802 from bentsku/apigw-data-validation-tf
apigw-data-validation-tf: Update AWS provider and remove duplicate body validation resource
2 parents 39e75c3 + a2aa488 commit ea5596e

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

apigw-data-validation-tf/main.tf

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ terraform {
77
required_providers {
88
aws = {
99
source = "hashicorp/aws"
10-
version = "~> 4.0"
10+
version = "~> 5.0"
1111
}
1212
archive = {
1313
source = "hashicorp/archive"
@@ -31,38 +31,6 @@ data "archive_file" "lambda_zip" {
3131
resource "aws_api_gateway_rest_api" "main_api" {
3232
name = "validation-api"
3333
description = "API Gateway with data validation"
34-
35-
body = jsonencode({
36-
openapi = "3.0.1"
37-
info = {
38-
title = "validation-api"
39-
version = "1.0"
40-
}
41-
components = {
42-
schemas = {
43-
Vehicle = {
44-
type = "object"
45-
required = ["make", "model", "year"]
46-
properties = {
47-
make = {
48-
type = "string"
49-
}
50-
model = {
51-
type = "string"
52-
}
53-
year = {
54-
type = "integer"
55-
minimum = 2010
56-
}
57-
color = {
58-
type = "string"
59-
enum = ["green", "red", "blue"]
60-
}
61-
}
62-
}
63-
}
64-
}
65-
})
6634
}
6735

6836
# Lambda Function

0 commit comments

Comments
 (0)