File tree Expand file tree Collapse file tree 4 files changed +97
-3
lines changed
Expand file tree Collapse file tree 4 files changed +97
-3
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,13 @@ locals {
1717 }
1818
1919 sso_role_patterns = {
20- dev = " AWSReservedSSO_vdselid_dev_*"
21- test = " AWSReservedSSO_vdselid_test_*"
20+ dev = " AWSReservedSSO_vdselid_dev_*"
21+ test = " AWSReservedSSO_vdselid_test_*"
2222 preprod = " AWSReservedSSO_vdselid_preprod_*"
2323 }
2424
2525 terraform_state_bucket_name = " eligibility-signposting-api-${ var . environment } -tfstate"
26- terraform_state_bucket_arn = " arn:aws:s3:::eligibility-signposting-api-${ var . environment } -tfstate"
26+ terraform_state_bucket_arn = " arn:aws:s3:::eligibility-signposting-api-${ var . environment } -tfstate"
2727
2828 account_ids = {
2929 dev = " 448049830832"
Original file line number Diff line number Diff line change 1+ module "eligibility_signposting_api_gateway" {
2+ source = " ../../modules/api_gateway"
3+ api_gateway_name = " eligibility-signposting-api"
4+ disable_default_endpoint = var. environment == " dev" && local. workspace != " dev" ? false : true
5+ workspace = local. workspace
6+ stack_name = local. stack_name
7+ environment = var. environment
8+ tags = local. tags
9+ }
10+
11+ resource "aws_api_gateway_resource" "_status" {
12+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
13+ parent_id = module. eligibility_signposting_api_gateway . root_resource_id
14+ path_part = " _status"
15+ }
16+
17+ resource "aws_api_gateway_resource" "patient_check" {
18+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
19+ parent_id = module. eligibility_signposting_api_gateway . root_resource_id
20+ path_part = " patient-check"
21+ }
22+
23+ resource "aws_api_gateway_resource" "id" {
24+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
25+ parent_id = aws_api_gateway_resource. patient_check . id
26+ path_part = " {id}"
27+ }
Original file line number Diff line number Diff line change 1+ resource "aws_api_gateway_method" "_status" {
2+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
3+ resource_id = aws_api_gateway_resource. _status. id
4+ http_method = " GET"
5+ authorization = " NONE"
6+
7+ depends_on = [
8+ aws_api_gateway_resource . _status,
9+ ]
10+ }
11+
12+ resource "aws_api_gateway_integration" "_status" {
13+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
14+ resource_id = aws_api_gateway_resource. _status. id
15+ http_method = aws_api_gateway_method. _status. http_method
16+ type = " MOCK"
17+
18+ request_templates = {
19+ " application/json" = jsonencode ({
20+ statusCode = 200
21+ })
22+ }
23+ }
24+
25+ resource "aws_api_gateway_method_response" "_status" {
26+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
27+ resource_id = aws_api_gateway_resource. _status. id
28+ http_method = aws_api_gateway_method. _status. http_method
29+ status_code = " 200"
30+
31+ response_models = {
32+ " application/json" = " Empty"
33+ }
34+ }
35+
36+ resource "aws_api_gateway_integration_response" "_status" {
37+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
38+ resource_id = aws_api_gateway_resource. _status. id
39+ http_method = aws_api_gateway_method. _status. http_method
40+ status_code = aws_api_gateway_method_response. _status. status_code
41+
42+ response_templates = {
43+ " application/json" = jsonencode ({
44+ status = " pass" ,
45+ version = " " ,
46+ revision = " " ,
47+ releaseId = " " ,
48+ commitId = " " ,
49+ checks = {
50+ " healthcheckService:status" = [
51+ {
52+ status = " pass" ,
53+ timeout = false ,
54+ responseCode = 200 ,
55+ outcome = " <html><h1>Ok</h1></html>" ,
56+ links = {
57+ self = " http://healthcheckService.example.com/_status"
58+ }
59+ }
60+ ]
61+ }
62+ })
63+ }
64+ }
Original file line number Diff line number Diff line change 1+ locals {
2+ stack_name = " ApiLayer"
3+ }
You can’t perform that action at this time.
0 commit comments