Skip to content

Commit

Permalink
Update outputs and CDK configs for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
san99tiago committed Jul 10, 2024
1 parent 19ac8ab commit c359117
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
8 changes: 8 additions & 0 deletions cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
"api_gw_name": "wpp-poc",
"secret_name": "/dev/aws-whatsapp-chatbot",
"meta_endpoint": "https://graph.facebook.com/"
},
"prod": {
"deployment_environment": "prod",
"log_level": "DEBUG",
"table_name": "aws-whatsapp-prod",
"api_gw_name": "wpp-webhook",
"secret_name": "/prod/aws-whatsapp-chatbot",
"meta_endpoint": "https://graph.facebook.com/"
}
}
}
Expand Down
25 changes: 13 additions & 12 deletions cdk/stacks/cdk_chatbot_api_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,16 +509,17 @@ def generate_cloudformation_outputs(self) -> None:
description="Deployment environment",
)

CfnOutput(
self,
"APIDocs",
value=f"https://{self.api.rest_api_id}.execute-api.{self.region}.amazonaws.com/{self.deployment_environment}/api/v1/docs",
description="API endpoint Docs",
)
if self.deployment_environment != "prod":
CfnOutput(
self,
"APIDocs",
value=f"https://{self.api.rest_api_id}.execute-api.{self.region}.amazonaws.com/{self.deployment_environment}/api/v1/docs",
description="API endpoint Docs",
)

CfnOutput(
self,
"APIChatbot",
value=f"https://{self.api.rest_api_id}.execute-api.{self.region}.amazonaws.com/{self.deployment_environment}/api/v1/webhook",
description="API endpoint Chatbot",
)
CfnOutput(
self,
"APIChatbot",
value=f"https://{self.api.rest_api_id}.execute-api.{self.region}.amazonaws.com/{self.deployment_environment}/api/v1/webhook",
description="API endpoint Chatbot",
)

0 comments on commit c359117

Please sign in to comment.