Skip to content

Commit a43f1e2

Browse files
eberriganclaude
andcommitted
Remove old schema fields from example configs and workflow
Updates all example config files and deployment workflow to use the new simplified DNS/SSL schema. Config Files Updated: - ci-test.example.yaml: Removed app_name, pattern, custom_subdomain, create_zone, staging - dev.example.yaml: Removed app_name, pattern, custom_subdomain, create_zone, staging - example.config.yaml: Removed app_name, pattern, custom_subdomain, create_zone, staging - prod.example.yaml: Removed app_name, pattern, custom_subdomain, create_zone, staging All configs now use: - dns.domain: Full domain name directly (no pattern construction) - ssl.certificate_arn: For ACM support - No ssl.staging: Let's Encrypt always uses production Workflow Updated: - terraform-deploy.yml: Removed pattern and custom_subdomain extraction - Now only displays full domain when DNS enabled Related: #17, talmolab/lablink#230 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 64aa48b commit a43f1e2

File tree

5 files changed

+38
-44
lines changed

5 files changed

+38
-44
lines changed

.github/workflows/terraform-deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,8 @@ jobs:
238238
echo "DNS is enabled in configuration"
239239
240240
DNS_DOMAIN=$(grep -A 10 "^dns:" "$CONFIG_FILE" | grep "domain:" | awk '{print $2}' | tr -d '"')
241-
DNS_PATTERN=$(grep -A 10 "^dns:" "$CONFIG_FILE" | grep "pattern:" | awk '{print $2}' | tr -d '"')
242-
DNS_SUBDOMAIN=$(grep -A 10 "^dns:" "$CONFIG_FILE" | grep "custom_subdomain:" | awk '{print $2}' | tr -d '"')
243241
244-
echo " Domain: $DNS_DOMAIN"
245-
echo " Subdomain: $DNS_SUBDOMAIN"
246-
echo " Pattern: $DNS_PATTERN"
242+
echo " Full Domain: $DNS_DOMAIN"
247243
248244
# Validate required fields are not empty
249245
if [ -z "$DNS_DOMAIN" ]; then

lablink-infrastructure/config/ci-test.example.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,27 @@ app:
5353
region: "us-west-2"
5454

5555
dns:
56-
# DNS enabled for testing (required to work around Caddy bug)
56+
# DNS enabled for testing
5757
enabled: true
5858
terraform_managed: true # Let Terraform manage DNS records
59-
domain: "lablink-template-testing.com" # Template testing domain
60-
zone_id: "" # Will be set by setup-aws-infrastructure.sh
61-
app_name: "" # Not used with custom pattern
62-
pattern: "custom" # Using custom pattern (workaround for allocator bug - see issue #212)
63-
custom_subdomain: "ci-test" # Creates: ci-test.lablink-template-testing.com
64-
create_zone: false # Use existing zone created by setup script
59+
domain: "ci-test.lablink-template-testing.com" # Full domain name
60+
zone_id: "Z1038183268T83E91AYJF" # Template testing zone
6561

6662
eip:
67-
# Use dynamic EIPs for ci-test (creates new, releases on destroy)
68-
strategy: "dynamic"
63+
# Use persistent EIP for ci-test
64+
strategy: "persistent"
6965
tag_name: "lablink-eip" # Will become lablink-eip-ci-test
7066

7167
ssl:
72-
# Use Let's Encrypt staging certs for testing (unlimited, not trusted)
68+
# Use Let's Encrypt for testing (production certs)
7369
provider: "letsencrypt"
74-
email: "[email protected]" # Update with maintainer email
75-
staging: true # Staging certs = HTTP only, no rate limits
70+
71+
certificate_arn: ""
72+
73+
startup_script:
74+
enabled: false
75+
path: "config/custom-startup.sh"
76+
on_error: "continue"
7677

7778
# S3 bucket for Terraform state (template testing infrastructure)
7879
# Separate from production deployments to avoid conflicts

lablink-infrastructure/config/dev.example.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,24 @@ dns:
5151
# Disable DNS for local dev (use IP only)
5252
enabled: false
5353
terraform_managed: false
54-
domain: "example.com" # Your base domain (not used when DNS disabled)
54+
domain: "" # Not used when DNS disabled
5555
zone_id: ""
56-
app_name: "" # Not used when DNS disabled
57-
pattern: "custom" # Using custom pattern (workaround for allocator bug - see issue #212)
58-
custom_subdomain: "dev" # Not used when DNS disabled
59-
create_zone: false
6056

6157
eip:
6258
# Always use dynamic for dev (don't reuse EIPs)
6359
strategy: "dynamic"
64-
# Use unique tag name to avoid conflicts with other environments
6560
tag_name: "lablink-eip-dev-YOURNAME" # Replace YOURNAME with your username
6661

6762
ssl:
6863
# No SSL for local dev (HTTP only)
6964
provider: "none"
70-
71-
staging: true
65+
email: ""
66+
certificate_arn: ""
67+
68+
startup_script:
69+
enabled: false
70+
path: "config/custom-startup.sh"
71+
on_error: "continue"
7272

7373
# S3 bucket NOT USED for dev environment (uses local state)
7474
# Dev uses backend-dev.hcl which stores state in ./terraform.tfstate

lablink-infrastructure/config/example.config.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,17 @@ app:
4545
dns:
4646
enabled: false # true = use DNS for allocator URL, false = IP-only access
4747
terraform_managed: false # false = manual DNS records (you create in Route53), true = Terraform creates/destroys records
48-
domain: "lablink.example.com" # Your Route53 hosted zone domain
48+
domain: "lablink.example.com" # Full domain name (e.g., lablink.example.com or test.lablink.example.com)
4949
zone_id: "" # (Optional) Hardcode zone ID to skip lookup - leave empty for auto-lookup
50-
app_name: "lablink" # Used with "auto" pattern
51-
pattern: "auto" # "auto" = {env}.{app_name}.{domain}, "custom" = {custom_subdomain}.{domain}
52-
custom_subdomain: "" # Only used with "custom" pattern
53-
create_zone: false # false = use existing zone, true = create new zone
5450

5551
eip:
56-
strategy: "dynamic" # "persistent" = reuse EIP with tag {tag_name}-{env}, "dynamic" = create new EIP with tag {tag_name}-{env}
57-
tag_name: "lablink-eip" # Tag prefix for EIP name. Both strategies use {tag_name}-{env} format (e.g., lablink-eip-prod).
52+
strategy: "dynamic" # "persistent" = reuse EIP with tag {tag_name}-{env}, "dynamic" = create new EIP
53+
tag_name: "lablink-eip" # Tag prefix for EIP name (becomes lablink-eip-{env})
5854

5955
ssl:
60-
provider: "none" # "letsencrypt" = Caddy auto-SSL, "cloudflare" = CloudFlare proxy, "none" = HTTP only
56+
provider: "none" # "letsencrypt" = Caddy auto-SSL, "cloudflare" = CloudFlare proxy, "acm" = AWS Certificate Manager, "none" = HTTP only
6157
email: "[email protected]" # Email for Let's Encrypt notifications
62-
staging: true # true = staging/testing certs (unlimited), false = production Let's Encrypt certs (rate limited)
58+
certificate_arn: "" # Required when provider="acm" - ARN of ACM certificate
6359

6460
startup_script:
6561
enabled: true # true = run custom startup script on client VMs, false = no script

lablink-infrastructure/config/prod.example.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,24 @@ dns:
5252
# Enable DNS for production
5353
enabled: true
5454
terraform_managed: true # Let Terraform manage DNS records
55-
domain: "example.com" # Your base domain (Route53 hosted zone)
56-
zone_id: "" # Will be set by setup-aws-infrastructure.sh
57-
app_name: "" # Not used with custom pattern
58-
pattern: "custom" # Using custom pattern (workaround for allocator bug - see issue #212)
59-
custom_subdomain: "" # Leave empty for apex domain: example.com
60-
create_zone: false # Use existing zone
55+
domain: "lablink.example.com" # Full domain name
56+
zone_id: "" # (Optional) Hardcode zone ID or leave empty for auto-lookup
6157

6258
eip:
63-
# Consider persistent EIP for production (keeps IP across redeploys)
64-
strategy: "persistent" # Reuses existing EIP with tag
59+
# Use persistent EIP for production (keeps IP across redeploys)
60+
strategy: "persistent"
6561
tag_name: "lablink-eip" # Will become lablink-eip-prod
6662

6763
ssl:
68-
# Use Let's Encrypt production certs
64+
# Use Let's Encrypt for production
6965
provider: "letsencrypt"
7066
email: "[email protected]" # Your email for Let's Encrypt notifications
71-
staging: false # Production certs = trusted HTTPS (rate limited)
67+
certificate_arn: ""
68+
69+
startup_script:
70+
enabled: false
71+
path: "config/custom-startup.sh"
72+
on_error: "continue"
7273

7374
# S3 bucket for Terraform state (must be unique across ALL of AWS)
7475
# Example: if your org is "acme", use "tf-state-lablink-acme-prod"

0 commit comments

Comments
 (0)