From 66f729f6b275ae66be068a95e50f3c9f462a3a4c Mon Sep 17 00:00:00 2001 From: Claude AI Date: Tue, 6 Jan 2026 14:22:43 +0000 Subject: [PATCH] docs(terraform): Add quick start guide --- .../aws-infrastructure/docs/QUICKSTART.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 terraform/aws-infrastructure/docs/QUICKSTART.md diff --git a/terraform/aws-infrastructure/docs/QUICKSTART.md b/terraform/aws-infrastructure/docs/QUICKSTART.md new file mode 100644 index 0000000..16ee923 --- /dev/null +++ b/terraform/aws-infrastructure/docs/QUICKSTART.md @@ -0,0 +1,133 @@ +# 🚀 Quick Start Guide + +## 5-Minute Setup + +### Step 1: Clone Repository +```bash +git clone http://git.thedevops.dev/admin/k3s-gitops.git +cd k3s-gitops/terraform/aws-infrastructure +``` + +### Step 2: Configure AWS +```bash +export AWS_ACCESS_KEY_ID="your-key" +export AWS_SECRET_ACCESS_KEY="your-secret" +export AWS_DEFAULT_REGION="us-east-1" +``` + +### Step 3: Create Configuration +```bash +cp environments/dev.tfvars terraform.tfvars +vim terraform.tfvars +``` + +**Required variables:** +```hcl +project_name = "myapp" +environment = "dev" +db_username = "admin" +db_password = "SecurePassword123!" +``` + +### Step 4: Deploy +```bash +terraform init +terraform plan +terraform apply +``` + +**Deployment time:** 15-20 minutes +**Cost:** ~$50-100/month (dev) + +--- + +## Post-Deployment + +### Get ALB DNS +```bash +terraform output alb_dns_name +``` + +### Test Application +```bash +curl http://$(terraform output -raw alb_dns_name)/health +``` + +### View All Outputs +```bash +terraform output +terraform output -json > outputs.json +``` + +--- + +## Common Tasks + +### Update Infrastructure +```bash +vim terraform.tfvars # Make changes +terraform plan +terraform apply +``` + +### Scale Application +```bash +# Edit terraform.tfvars +asg_desired_capacity = 5 + +terraform apply +``` + +### View Logs +```bash +# CloudWatch Console +open https://console.aws.amazon.com/cloudwatch + +# Or AWS CLI +aws logs tail /aws/ec2/dev/system --follow +``` + +--- + +## Cleanup + +### Development +```bash +terraform destroy -var-file="environments/dev.tfvars" +``` + +### Production (⚠️ Dangerous) +```bash +# Create backup first! +terraform destroy -var-file="environments/production.tfvars" +``` + +--- + +## Troubleshooting + +**Issue:** "Error creating VPC" +**Solution:** Check AWS limits + +**Issue:** "Insufficient permissions" +**Solution:** Ensure IAM user has required permissions + +**Issue:** "State lock timeout" +**Solution:** `terraform force-unlock ` + +--- + +## Next Steps + +1. Read [README.md](../README.md) +2. Review security best practices +3. Setup CI/CD pipeline +4. Configure monitoring + +--- + +## Getting Help + +- Issues: http://git.thedevops.dev/admin/k3s-gitops/issues +- Slack: #infrastructure +- Email: devops@example.com