-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,476 additions
and
288 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
.terraform/providers/registry.terraform.io/hashicorp/aws/5.94.1/linux_amd64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /data/terraform/workspaces/arnol377/terraform-plugin-cache/registry.terraform.io/hashicorp/aws/5.94.1/linux_amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| [ | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T13:12:39.190090" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T13:13:33.377155" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T13:14:04.341717" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T13:46:26.319927" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T14:39:49.477391" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T14:41:30.994495" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T16:03:19.141297" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T16:06:13.577362" | ||
| }, | ||
| { | ||
| "commit_hash": "018399a6523b3c5c1d7503b2c0de8cd66eb8d8e5", | ||
| "commit_message": "Merge branch 'main' of github.e.it.census.gov:SCT-Engineering/eks-automation-lambda", | ||
| "author": "arnol377", | ||
| "timestamp": "2025-04-16T16:07:17.588493" | ||
| } | ||
| ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # API Gateway HTTP API without CORS (we'll add CORS separately) | ||
| resource "aws_apigatewayv2_api" "lambda_api" { | ||
| name = "${var.name}-api-gateway" | ||
| protocol_type = "HTTP" | ||
| cors_configuration { | ||
| allow_credentials = false | ||
| allow_headers = [ | ||
| "*", | ||
| ] | ||
| allow_methods = [ | ||
| "POST", | ||
| ] | ||
| allow_origins = [ | ||
| "*", | ||
| ] | ||
| expose_headers = [ | ||
| "*", | ||
| ] | ||
| max_age = 86400 | ||
| } | ||
| lifecycle { | ||
| ignore_changes = [ | ||
| cors_configuration | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| # API Gateway Integration with Lambda | ||
| resource "aws_apigatewayv2_integration" "lambda_integration" { | ||
| api_id = aws_apigatewayv2_api.lambda_api.id | ||
| integration_type = "AWS_PROXY" | ||
| integration_uri = aws_lambda_function.eks_automation.invoke_arn | ||
| payload_format_version = "2.0" | ||
| } | ||
|
|
||
| # API Gateway Route for POST requests | ||
| resource "aws_apigatewayv2_route" "lambda_route" { | ||
| api_id = aws_apigatewayv2_api.lambda_api.id | ||
| route_key = "POST /" | ||
| target = "integrations/${aws_apigatewayv2_integration.lambda_integration.id}" | ||
| } | ||
|
|
||
| # API Gateway Stage | ||
| resource "aws_apigatewayv2_stage" "lambda_stage" { | ||
| api_id = aws_apigatewayv2_api.lambda_api.id | ||
| name = "$default" | ||
| auto_deploy = true | ||
| } | ||
|
|
||
| # Lambda Permission for API Gateway | ||
| resource "aws_lambda_permission" "api_gateway_permission" { | ||
| statement_id = "AllowAPIGatewayInvoke" | ||
| action = "lambda:InvokeFunction" | ||
| function_name = aws_lambda_function.eks_automation.function_name | ||
| principal = "apigateway.amazonaws.com" | ||
| source_arn = "${aws_apigatewayv2_api.lambda_api.execution_arn}/*/*" | ||
| } | ||
|
|
||
| # Add API Gateway URL to outputs | ||
| output "api_gateway_invoke_url" { | ||
| value = "${aws_apigatewayv2_stage.lambda_stage.invoke_url}" | ||
| description = "API Gateway URL for invoking the Lambda function" | ||
| } |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| data aws_partition current {} | ||
|
|
||
| data "aws_caller_identity" "current" {} | ||
|
|
||
| data aws_region current {} |
Oops, something went wrong.