deploy-stack 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deploy-stack",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Provision production-ready AWS infrastructure and CI/CD pipelines in seconds.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,6 +37,7 @@
37
37
  ],
38
38
  "license": "MIT",
39
39
  "dependencies": {
40
+ "@aws-sdk/client-dynamodb": "3.1119.0",
40
41
  "@aws-sdk/client-s3": "3.1115.0",
41
42
  "@aws-sdk/client-secrets-manager": "3.1112.0",
42
43
  "@aws-sdk/client-sts": "3.1115.0",
@@ -1,6 +1,12 @@
1
1
  # deploy-stack generated infrastructure
2
2
  provider "aws" {
3
3
  region = "{{REGION}}"
4
+
5
+ default_tags {
6
+ tags = {
7
+ ManagedBy = "deploy-stack"
8
+ }
9
+ }
4
10
  }
5
11
 
6
12
  locals {
@@ -191,4 +197,21 @@ output "website_url" {
191
197
  output "ecr_repository_url" {
192
198
  description = "The URL of the ECR repository"
193
199
  value = aws_ecr_repository.app.repository_url
200
+ }
201
+
202
+ # --- CloudWatch Alarms ---
203
+ resource "aws_cloudwatch_metric_alarm" "alb_5xx_errors" {
204
+ alarm_name = "{{PROJECT_NAME}}-high-5xx-errors"
205
+ comparison_operator = "GreaterThanThreshold"
206
+ evaluation_periods = "2"
207
+ metric_name = "HTTPCode_Target_5XX_Count"
208
+ namespace = "AWS/ApplicationELB"
209
+ period = "60"
210
+ statistic = "Sum"
211
+ threshold = "10"
212
+ alarm_description = "Triggers if the ALB receives more than 10 5XX errors in 2 minutes."
213
+
214
+ dimensions = {
215
+ LoadBalancer = aws_lb.main.arn_suffix
216
+ }
194
217
  }