@hasna/uptime 0.1.6 → 0.1.8
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/.dockerignore +0 -1
- package/CHANGELOG.md +35 -1
- package/Dockerfile +2 -1
- package/Dockerfile.package +22 -0
- package/README.md +13 -1
- package/dist/api.d.ts +2 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +81 -12
- package/dist/cli/index.js +148 -51
- package/dist/cloud-plan.d.ts +15 -4
- package/dist/cloud-plan.d.ts.map +1 -1
- package/dist/cloud-plan.js +55 -35
- package/dist/index.js +136 -47
- package/dist/mcp/index.js +38 -8
- package/dist/service.d.ts +1 -1
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +38 -8
- package/dist/store.d.ts +3 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +40 -9
- package/docs/aws-deployment-runbook.md +44 -22
- package/infra/aws/README.md +27 -6
- package/infra/aws/main.tf +374 -36
- package/infra/aws/outputs.tf +20 -0
- package/infra/aws/terraform.tfvars.example +13 -12
- package/infra/aws/variables.tf +48 -22
- package/package.json +2 -1
package/infra/aws/variables.tf
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
variable "account_name" {
|
|
2
2
|
description = "Human-readable AWS account/profile label."
|
|
3
3
|
type = string
|
|
4
|
-
default = "
|
|
4
|
+
default = "aws-profile"
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
variable "region" {
|
|
@@ -25,19 +25,36 @@ variable "service_name" {
|
|
|
25
25
|
variable "hostname" {
|
|
26
26
|
description = "Public/internal hostname for Open Uptime."
|
|
27
27
|
type = string
|
|
28
|
-
default = "uptime.
|
|
28
|
+
default = "uptime.example.com"
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
variable "workspace_id" {
|
|
32
32
|
description = "Hosted Open Uptime workspace id."
|
|
33
33
|
type = string
|
|
34
|
-
default = "
|
|
34
|
+
default = "workspace-id"
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
variable "vpc_id" {
|
|
38
38
|
description = "Existing VPC id."
|
|
39
39
|
type = string
|
|
40
|
-
default = "vpc-
|
|
40
|
+
default = "vpc-xxxxxxxx"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
variable "ecr_repository_name" {
|
|
44
|
+
description = "ECR repository name for the Open Uptime image."
|
|
45
|
+
type = string
|
|
46
|
+
default = "open-uptime"
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
variable "protected_access_mode" {
|
|
50
|
+
description = "Protected web access mode. cloudfront_default_domain uses the CloudFront HTTPS default domain and restricts ALB HTTP to CloudFront origin-facing ranges. alb_https_cert uses an ALB HTTPS listener with certificate_arn."
|
|
51
|
+
type = string
|
|
52
|
+
default = "cloudfront_default_domain"
|
|
53
|
+
|
|
54
|
+
validation {
|
|
55
|
+
condition = contains(["cloudfront_default_domain", "alb_https_cert"], var.protected_access_mode)
|
|
56
|
+
error_message = "protected_access_mode must be cloudfront_default_domain or alb_https_cert."
|
|
57
|
+
}
|
|
41
58
|
}
|
|
42
59
|
|
|
43
60
|
variable "public_subnet_ids" {
|
|
@@ -46,7 +63,7 @@ variable "public_subnet_ids" {
|
|
|
46
63
|
}
|
|
47
64
|
|
|
48
65
|
variable "alb_ingress_cidr_blocks" {
|
|
49
|
-
description = "Approved HTTPS source CIDR blocks for
|
|
66
|
+
description = "Approved HTTPS source CIDR blocks for ALB HTTPS mode. Keep empty until edge/source policy is approved."
|
|
50
67
|
type = list(string)
|
|
51
68
|
default = []
|
|
52
69
|
}
|
|
@@ -56,11 +73,6 @@ variable "private_subnet_ids" {
|
|
|
56
73
|
type = list(string)
|
|
57
74
|
}
|
|
58
75
|
|
|
59
|
-
variable "rds_security_group_id" {
|
|
60
|
-
description = "Existing RDS security group id that should allow Open Uptime client access."
|
|
61
|
-
type = string
|
|
62
|
-
}
|
|
63
|
-
|
|
64
76
|
variable "container_image" {
|
|
65
77
|
description = "Immutable Open Uptime image URI, preferably with digest."
|
|
66
78
|
type = string
|
|
@@ -71,27 +83,39 @@ variable "container_image" {
|
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
|
|
74
|
-
variable "
|
|
75
|
-
description = "
|
|
86
|
+
variable "runtime_package_version" {
|
|
87
|
+
description = "Published @hasna/uptime package version that CodeBuild should build into the ECR image."
|
|
76
88
|
type = string
|
|
89
|
+
default = "0.1.8"
|
|
90
|
+
|
|
91
|
+
validation {
|
|
92
|
+
condition = can(regex("^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?$", var.runtime_package_version))
|
|
93
|
+
error_message = "runtime_package_version must be a semver version without the package name."
|
|
94
|
+
}
|
|
77
95
|
}
|
|
78
96
|
|
|
79
|
-
variable "
|
|
80
|
-
description = "
|
|
97
|
+
variable "certificate_arn" {
|
|
98
|
+
description = "ACM certificate ARN for ALB HTTPS mode. Leave null when protected_access_mode is cloudfront_default_domain."
|
|
81
99
|
type = string
|
|
82
100
|
default = null
|
|
83
|
-
}
|
|
84
101
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
validation {
|
|
103
|
+
condition = var.certificate_arn == null || can(regex("^arn:aws:acm:", var.certificate_arn))
|
|
104
|
+
error_message = "certificate_arn must be null or an ACM certificate ARN."
|
|
105
|
+
}
|
|
88
106
|
|
|
89
107
|
validation {
|
|
90
|
-
condition =
|
|
91
|
-
error_message = "
|
|
108
|
+
condition = var.protected_access_mode != "alb_https_cert" || var.certificate_arn != null
|
|
109
|
+
error_message = "certificate_arn is required when protected_access_mode is alb_https_cert."
|
|
92
110
|
}
|
|
93
111
|
}
|
|
94
112
|
|
|
113
|
+
variable "hosted_zone_id" {
|
|
114
|
+
description = "Route53 hosted zone id. Leave null to skip DNS record creation."
|
|
115
|
+
type = string
|
|
116
|
+
default = null
|
|
117
|
+
}
|
|
118
|
+
|
|
95
119
|
variable "app_env_secret_arn" {
|
|
96
120
|
description = "Secrets Manager/SSM ARN containing hosted app environment refs."
|
|
97
121
|
type = string
|
|
@@ -154,8 +178,10 @@ variable "desired_counts" {
|
|
|
154
178
|
}
|
|
155
179
|
|
|
156
180
|
validation {
|
|
157
|
-
condition
|
|
158
|
-
|
|
181
|
+
condition = alltrue([for count in values(var.desired_counts) : count >= 0]) && lookup(var.desired_counts, "web", 0) <= 1 && alltrue([
|
|
182
|
+
for key in ["scheduler", "public-probe", "reporter", "migration"] : lookup(var.desired_counts, key, 0) == 0
|
|
183
|
+
])
|
|
184
|
+
error_message = "EFS SQLite bridge requires web desired count 0 or 1 and scheduler/public-probe/reporter/migration desired counts 0."
|
|
159
185
|
}
|
|
160
186
|
}
|
|
161
187
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/uptime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Local-first uptime and downtime monitoring service with CLI, MCP, SDK, SQLite persistence, and a dashboard.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"dist",
|
|
25
25
|
"README.md",
|
|
26
26
|
"Dockerfile",
|
|
27
|
+
"Dockerfile.package",
|
|
27
28
|
".dockerignore",
|
|
28
29
|
"infra/aws/README.md",
|
|
29
30
|
"infra/aws/.terraform.lock.hcl",
|