mysystem-cli 1.0.0 → 1.0.1
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/AGENTS.md +66 -0
- package/copy-templates.js +47 -0
- package/package.json +2 -2
- package/templates/docker/fastapi.Dockerfile +32 -0
- package/templates/docker/nextjs.Dockerfile +45 -0
- package/templates/docker/node.Dockerfile +32 -0
- package/templates/docker/react.Dockerfile +38 -0
- package/templates/github/deploy-ec2.yml +163 -0
- package/templates/github/deploy.yml +94 -0
- package/templates/github/destroy.yml +43 -0
- package/templates/terraform/alb.tf +69 -0
- package/templates/terraform/bootstrap-oidc.yaml +69 -0
- package/templates/terraform/budget.tf +40 -0
- package/templates/terraform/db.tf +46 -0
- package/templates/terraform/dns.tf +89 -0
- package/templates/terraform/ecs.tf +110 -0
- package/templates/terraform/outputs.tf +14 -0
- package/templates/terraform/provider.tf +21 -0
- package/templates/terraform/rds_proxy.tf +157 -0
- package/templates/terraform/redis.tf +69 -0
- package/templates/terraform/security.tf +156 -0
- package/templates/terraform/variables.tf +46 -0
- package/templates/terraform/vpc.tf +68 -0
- package/templates/terraform/waf.tf +97 -0
- package/templates/terraform-ec2/budget.tf +40 -0
- package/templates/terraform-ec2/dns.tf +85 -0
- package/templates/terraform-ec2/ec2.tf +124 -0
- package/templates/terraform-ec2/ecr.tf +10 -0
- package/templates/terraform-ec2/outputs.tf +19 -0
- package/templates/terraform-ec2/provider.tf +22 -0
- package/templates/terraform-ec2/variables.tf +58 -0
- package/templates/terraform-ec2/vpc.tf +50 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
variable "aws_region" {
|
|
2
|
+
type = string
|
|
3
|
+
description = "AWS region to deploy resources"
|
|
4
|
+
default = "us-east-1"
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
variable "app_name" {
|
|
8
|
+
type = string
|
|
9
|
+
description = "Application name"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
variable "environment" {
|
|
13
|
+
type = string
|
|
14
|
+
description = "Deployment environment"
|
|
15
|
+
default = "production"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
variable "container_port" {
|
|
19
|
+
type = number
|
|
20
|
+
description = "Port the application container listens on"
|
|
21
|
+
default = 3000
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
variable "instance_type" {
|
|
25
|
+
type = string
|
|
26
|
+
description = "EC2 instance class (t3.micro is AWS Free Tier)"
|
|
27
|
+
default = "t3.micro"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
variable "billing_email" {
|
|
31
|
+
type = string
|
|
32
|
+
description = "Email address to send AWS budget and billing alerts"
|
|
33
|
+
default = ""
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
variable "budget_limit" {
|
|
37
|
+
type = string
|
|
38
|
+
description = "Monthly budget limit in USD"
|
|
39
|
+
default = "20"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
variable "enable_custom_domain" {
|
|
43
|
+
type = bool
|
|
44
|
+
description = "Enable custom domain routing"
|
|
45
|
+
default = false
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
variable "domain_name" {
|
|
49
|
+
type = string
|
|
50
|
+
description = "Custom domain name (e.g., app.example.com)"
|
|
51
|
+
default = ""
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
variable "dns_provider" {
|
|
55
|
+
type = string
|
|
56
|
+
description = "DNS provider for validation ('route53' or 'external')"
|
|
57
|
+
default = "external"
|
|
58
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
data "aws_availability_zones" "available" {
|
|
2
|
+
state = "available"
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
resource "aws_vpc" "main" {
|
|
6
|
+
cidr_block = "10.0.0.0/16"
|
|
7
|
+
enable_dns_hostnames = true
|
|
8
|
+
enable_dns_support = true
|
|
9
|
+
|
|
10
|
+
tags = {
|
|
11
|
+
Name = "${var.app_name}-vpc"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
resource "aws_subnet" "public" {
|
|
16
|
+
vpc_id = aws_vpc.main.id
|
|
17
|
+
cidr_block = "10.0.1.0/24"
|
|
18
|
+
availability_zone = data.aws_availability_zones.available.names[0]
|
|
19
|
+
map_public_ip_on_launch = true
|
|
20
|
+
|
|
21
|
+
tags = {
|
|
22
|
+
Name = "${var.app_name}-public-subnet"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
resource "aws_internet_gateway" "gw" {
|
|
27
|
+
vpc_id = aws_vpc.main.id
|
|
28
|
+
|
|
29
|
+
tags = {
|
|
30
|
+
Name = "${var.app_name}-igw"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
resource "aws_route_table" "public" {
|
|
35
|
+
vpc_id = aws_vpc.main.id
|
|
36
|
+
|
|
37
|
+
route {
|
|
38
|
+
cidr_block = "0.0.0.0/0"
|
|
39
|
+
gateway_id = aws_internet_gateway.gw.id
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
tags = {
|
|
43
|
+
Name = "${var.app_name}-public-rt"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
resource "aws_route_table_association" "public" {
|
|
48
|
+
subnet_id = aws_subnet.public.id
|
|
49
|
+
route_table_id = aws_route_table.public.id
|
|
50
|
+
}
|