-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi_gateway.tf
72 lines (66 loc) · 2.13 KB
/
api_gateway.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
################################################################################
# API Gateway
################################################################################
module "api_gateway" {
source = "./modules/api-gateway"
name = local.name
integrations = {
"ANY /" = {
description = "/ route for razzle dazzle"
connection_type = "VPC_LINK"
vpc_link = "this-link"
integration_uri = data.aws_service_discovery_service.this.arn
integration_type = "HTTP_PROXY"
integration_method = "ANY"
}
"GET /hello" = {
description = "/hello route for razzle dazzle"
connection_type = "VPC_LINK"
vpc_link = "this-link"
integration_uri = data.aws_service_discovery_service.this.arn
integration_type = "HTTP_PROXY"
integration_method = "GET"
}
"GET /healthz" = {
description = "/healthz route for razzle dazzle"
connection_type = "VPC_LINK"
vpc_link = "this-link"
integration_uri = data.aws_service_discovery_service.this.arn
integration_type = "HTTP_PROXY"
integration_method = "GET"
}
"GET /goodbye" = {
description = "/goodbye route for razzle dazzle"
connection_type = "VPC_LINK"
vpc_link = "this-link"
integration_uri = data.aws_service_discovery_service.this.arn
integration_type = "HTTP_PROXY"
integration_method = "GET"
}
}
vpc_links = {
this-link = {
name = local.name
subnet_ids = module.vpc.private_subnets
}
}
vpc_id = module.vpc.vpc_id
security_group_rules = {
container_port_ingress = {
type = "ingress"
from_port = local.container.port
to_port = local.container.port
protocol = "tcp"
description = "Container port access from internet"
cidr_blocks = ["0.0.0.0/0"]
}
prviate_subnet_egress_all = {
type = "egress"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = module.vpc.private_subnets_cidr_blocks
}
}
tags = module.tags.tags
}