{"id":15151099,"url":"https://github.com/flexstack/rails-terraform","last_synced_at":"2026-01-20T13:01:34.560Z","repository":{"id":251984458,"uuid":"838995160","full_name":"flexstack/rails-terraform","owner":"flexstack","description":"An example for deploying a Rails app to AWS Fargate with Terraform","archived":false,"fork":false,"pushed_at":"2024-08-06T20:36:10.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T08:44:59.131Z","etag":null,"topics":["aws-fargate","rails","rails-examples","rails-template","terraform","terraform-example","terraform-examples","terraform-template","terraform-templates"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T18:51:20.000Z","updated_at":"2024-08-06T20:38:51.000Z","dependencies_parsed_at":"2024-08-07T00:52:45.656Z","dependency_job_id":"e9c912e1-545f-44b1-985b-1be3c8fabb79","html_url":"https://github.com/flexstack/rails-terraform","commit_stats":null,"previous_names":["flexstack/rails-terraform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flexstack/rails-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexstack%2Frails-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexstack%2Frails-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexstack%2Frails-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexstack%2Frails-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexstack","download_url":"https://codeload.github.com/flexstack/rails-terraform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexstack%2Frails-terraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-fargate","rails","rails-examples","rails-template","terraform","terraform-example","terraform-examples","terraform-template","terraform-templates"],"created_at":"2024-09-26T15:00:42.556Z","updated_at":"2026-01-20T13:01:34.541Z","avatar_url":"https://github.com/flexstack.png","language":"Ruby","readme":"# Rails on AWS Fargate with Terraform\n \n![Preview](./.readme/cloudfront-rails.png)\n\n## Architecture\n\nSee the [Terraform code](./infra/main.tf) for the full architecture.\n\n- A VPC with public, private, private isolated subnets\n- An ECS cluster with a Fargate service\n- A Route 53 private hosted zone for the ECS service (AWS CloudMap/Service Discovery)\n- API Gateway w/ VPC Link Integration to the ECS service using the private DNS name\n- An ECS task definition with a container that runs the Rails app\n- A CloudFront distribution with an API Gateway origin\n\n## Deploy to AWS with Terraform\n\nFirst, you need to install Terraform. You can download it from [here](https://www.terraform.io/downloads.html). You'll\nalso need Docker and the AWS CLI installed and configured with your AWS credentials.\n\nNext, create an [SSM parameter](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html)\nwith the Rails master key at `/rails-tf-example/prod/RAILS_MASTER_KEY`. Your master key can be found in the `config/master.key` file.\nThis key is used to decrypt the Rails credentials file in the ECS task definition.\n\n```bash\ncd infra\n# Initialize the Terraform providers\nterraform init\n# See the changes that will be applied\nterraform plan\n# Apply the changes to your default AWS profile\nterraform apply\n```\n\nYou can also use a different AWS profile by setting the `TF_VAR_AWS_PROFILE` environment variable.\n\n```bash\nTF_VAR_AWS_PROFILE=my-profile terraform apply\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexstack%2Frails-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexstack%2Frails-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexstack%2Frails-terraform/lists"}