Skip to content

feat: deploy dev AWS infrastructure (Terraform) - live & verified - #14

Merged
suletetes merged 6 commits into
mainfrom
fix/taskly-deployment-issues
Aug 30, 2026
Merged

feat: deploy dev AWS infrastructure (Terraform) - live & verified#14
suletetes merged 6 commits into
mainfrom
fix/taskly-deployment-issues

Conversation

@suletetes

Copy link
Copy Markdown
Owner

Summary

Deploys the full Taskly AWS infrastructure to the dev environment via Terraform, on top of the app fixes already merged in #13. The stack is live and verified healthy in account 583168584925 / us-east-1.

Result: live and healthy

  • terraform plan -detailed-exitcode0 / "No changes" (fully converged, idempotent).
  • 219 resources applied.
  • GET https://bvju0gyni7.execute-api.us-east-1.amazonaws.com/api/healthHTTP 200 {"status":"OK",...,"database":"connected"} — proves the full API Gateway → Lambda (VPC) → DocumentDB path works.
  • Lambda taskly-dev-api + 3 processors: Active. DocumentDB taskly-dev-docdb-cluster: available.

Key outputs

Output Value
API endpoint https://bvju0gyni7.execute-api.us-east-1.amazonaws.com
Cognito user pool us-east-1_l0jRjqILW
Cognito client a1i9m0h2tqf5hu2ddpsq6bcdf
Uploads bucket taskly-dev-uploads-583168584925
Lambda taskly-dev-api

Blockers resolved

  1. State backend mismatch — reconciled environments/dev/backend.tf to the existing bucket taskly-terraform-state-583168584925; created the missing DynamoDB lock table taskly-terraform-locks.
  2. Unwired required variables — added declarations + pass-throughs (secrets, DNS/email, sizing) in the dev wrapper; added environments/dev/outputs.tf. Secrets kept in a gitignored secret.auto.tfvars (not committed).
  3. Lambda zip chicken-and-egg — added scripts/build-lambda.sh (full-backend bundle for all four handlers, pruned to fit the 250 MB limit); staged zips via targeted module.s3 apply before full apply.
  4. Route53 hard blocker — made DR DNS failover conditional on non-empty hosted_zone_id.
  5. Apply-time fixes: conditional CloudFront + WAF association, S3 cross-region replication ordering/schema, monitoring log-group ordering race.

Manual prerequisites (account limitations — not fabricated)

  • CloudFront disabled — account not CloudFront-verified (AccessDenied: account must be verified). Open an AWS Support case, then set enable_cloudfront = true and re-apply.
  • SES identity for taskly.app stays pending (account does not own the domain) — needs DNS records.
  • Route53 DNS failover skipped — set hosted_zone_id + domain_name once a hosted zone exists.
  • WAF WebACL created but not attached (WAFv2 cannot associate with HTTP API v2) — attach via CloudFront (CLOUDFRONT-scope) or a REST API.

Cost & teardown

Estimated ~$130/mo (DocumentDB ~$60, NAT ~$32, VPC endpoints ~$28). Teardown: terraform destroy from infrastructure/environments/dev.

Review

Semantic review verdict: APPROVED (4 non-blocking notes documented). Plan + deployment report + review under .tasks/task-deploy-infra/.

No real secrets committed (verified: no secret.auto.tfvars, state files, or credentials tracked).

…e wiring

- Point environments/dev/backend.tf at existing state bucket taskly-terraform-state-583168584925
- Create DynamoDB lock table taskly-terraform-locks (done via AWS CLI, ACTIVE)
- Declare required secrets, DNS/email, and sizing variables in dev variables.tf
  plus previously-undeclared tfvars to avoid undeclared-variable warnings
- Pass required root-module variables through environments/dev/main.tf
- Gate DR route53 records (api_primary/api_secondary) on hosted_zone_id != ""
  so no DNS records are planned when the account has no hosted zone
- Add infrastructure/.gitignore to exclude secret-bearing tfvars and state

Verified: terraform init + validate succeed; plan (dummy secrets) = 211 to add,
0 errors, 0 aws_route53_record resources.
…f, fix S3 replication & monitoring ordering (FEAT-003)
@github-actions

Copy link
Copy Markdown

PR Validation Failed

One or more checks failed. Please review the workflow logs for details.

@suletetes
suletetes merged commit 05d297e into main Aug 30, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants