File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
apigw-lambda-qldb-terraform Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -565,7 +565,30 @@ resource "aws_lambda_permission" "apigw_lambda_function_delete_person" {
565
565
source_arn = " ${ aws_api_gateway_rest_api . api . execution_arn } /*/${ aws_api_gateway_method . personid_delete . http_method } ${ aws_api_gateway_resource . personid . path } "
566
566
}
567
567
568
+ resource "aws_api_gateway_deployment" "api" {
569
+ rest_api_id = aws_api_gateway_rest_api. api . id
570
+
571
+ triggers = {
572
+ redeployment = sha1 (jsonencode (aws_api_gateway_rest_api. api . body ))
573
+ }
574
+
575
+ lifecycle {
576
+ create_before_destroy = true
577
+ }
578
+ }
579
+
580
+ resource "aws_api_gateway_stage" "prod" {
581
+ deployment_id = aws_api_gateway_deployment. api . id
582
+ rest_api_id = aws_api_gateway_rest_api. api . id
583
+ stage_name = " Prod"
584
+ }
585
+
568
586
output "PersonLedger" {
569
587
value = aws_qldb_ledger. ledger . id
570
588
description = " QLDB Ledger for the sample application"
571
589
}
590
+
591
+ output "PersonApi" {
592
+ value = " ${ aws_api_gateway_stage . prod . invoke_url } /person"
593
+ description = " API Gateway endpoint URL for Prod stage for Person functions"
594
+ }
You can’t perform that action at this time.
0 commit comments