Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make healthcheck standard and available #35

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/workflow-pr-close.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR Workflow
name: PR Closed Workflow

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions docs/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ paths:
type: "aws_proxy"
contentHandling: "CONVERT_TO_TEXT"

/health:
/health-check:
get:
operationId: healthCheck
summary: Health check endpoint for external services to consume
Expand Down Expand Up @@ -145,7 +145,7 @@ paths:
example: Unhealthy
additionalProperties: false
x-amazon-apigateway-auth:
type: "AWS_IAM"
type: "NONE"
x-amazon-apigateway-integration:
type: "mock"
responses:
Expand Down
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
13 changes: 13 additions & 0 deletions terraform/environment/region/apigateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,19 @@ data "aws_iam_policy_document" "lpa_store" {
actions = ["execute-api:Invoke"]
resources = ["*"]
}

statement {
sid = "AllowHealthCheckExecutionFromAnyone"
effect = "Allow"

principals {
type = "*"
identifiers = ["*"]
}

actions = ["execute-api:Invoke"]
resources = ["execute-api:/${local.stage_name}/GET/health-check"]
}
}

resource "aws_lambda_permission" "api_gateway_invoke" {
Expand Down
Loading