{"id":15350139,"url":"https://github.com/mars/tinyrobot-science-terraform","last_synced_at":"2026-03-19T02:49:31.125Z","repository":{"id":139298541,"uuid":"142612144","full_name":"mars/tinyrobot-science-terraform","owner":"mars","description":"Terraforming 🌱→🤖🔬 tinyrobot.science","archived":false,"fork":false,"pushed_at":"2018-09-18T22:28:05.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T08:13:27.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-07-27T18:39:25.000Z","updated_at":"2018-09-18T22:28:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"41659294-9ec5-499e-b465-d02185ad41d1","html_url":"https://github.com/mars/tinyrobot-science-terraform","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.11111111111111116","last_synced_commit":"6d3f74b4b30d0a1362554c2acdb3855bf1cb34f0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mars/tinyrobot-science-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mars%2Ftinyrobot-science-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mars%2Ftinyrobot-science-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mars%2Ftinyrobot-science-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mars%2Ftinyrobot-science-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mars","download_url":"https://codeload.github.com/mars/tinyrobot-science-terraform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mars%2Ftinyrobot-science-terraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":[],"created_at":"2024-10-01T11:57:41.319Z","updated_at":"2026-01-16T12:31:05.338Z","avatar_url":"https://github.com/mars.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraforming 🌱→🤖🔬 tinyrobot.science\n\nAn example collaborative microservices architecture for Heroku, based on two Terraform patterns:\n\n* [Confluent's Terraform config with S3 state storage](https://github.com/confluentinc/terraform-state-s3)\n* [Deploy Heroku apps from pipelines using Terraform](https://github.com/mars/terraform-heroku-pipeline-slugs)\n\n### Part of a reference suite\n\n| Terraform config | [Web UI](https://github.com/mars/tinyrobot-science-web-ui) | [API](https://github.com/mars/tinyrobot-science-api) |\n|-----------|------------|---------|\n| infrastructure (this repo) | front-end app | backend app |\n\n## Requirements\n\n* [Heroku](https://www.heroku.com/home)\n  * install [command-line tools (CLI)](https://toolbelt.heroku.com)\n  * [an account](https://signup.heroku.com)\n  * [a team](https://devcenter.heroku.com/articles/heroku-teams)\n* install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n* install [Terraform](https://terraform.io)\n* install [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)\n  * with Homebrew on macOS: `brew install awscli`\n* if adapting this example for your own project, then use your own fork of this repo wherever this repo's URL appears\n  * instead of `https://github.com/mars/tinyrobot-science-terraform` use `https://github.com/$GITHUB_USERNAME/tinyrobot-science-terraform`\n\n## Setup\n\n### Initial\n\nSetup Terraform's remote state store with Amazon S3 \u0026 DynamoDB, so that team members may collaborate free of conflicts:\n\n1. Create AWS IAM user with *AmazonS3FullAccess* \u0026 *AmazonDynamoDBFullAccess*\n2. Run `aws configure` to set the key \u0026 secret credentials for that new IAM user\n    * ensure *Default region name* is set to same as the AWS provider region in other environments\n3. Run the following shell commands:\n\n    ✏️ *If adapting this example for your own project, first set your own unique names/values for the resources in [`dev-tfstate/main.tf`](environments/dev-tfstate/main.tf) \u0026 [`dev/backend.tf`](environments/dev/backend.tf)*\n\n    ```bash\n    git clone https://github.com/mars/tinyrobot-science-terraform\n    cd tinyrobot-science-terraform/environments/dev-tfstate\n    terraform init\n    terraform apply\n    git commit terraform.tfstate* -m 'Terraform S3 backend state'\n    ```\n\n### Additional collaborators\n\n1. Create AWS IAM user with full access to the bucket named in [`dev-tfstate/main.tf`](environments/dev-tfstate/main.tf)\n2. Run `aws configure` to set the key \u0026 secret credentials for that new IAM user\n3. Run the following shell commands:\n\n    ```bash\n    git clone https://github.com/mars/tinyrobot-science-terraform\n    cd tinyrobot-science-terraform/\n    ```\n\n## Usage\n\nOnce the setup is complete, we'll now switch to the application's Terraform environment, which will use the remote state store for persistence, but is otherwise independent:\n\n* Set Heroku auth as local environment variables: \n\n  ```bash\n  heroku authorizations:create --description tinyrobot-science --short\n  export HEROKU_API_KEY=xxxxx\n  ```\n* Identify the build pipeline for each app. Pipeline UUIDs can be found by visiting each pipeline used to build the slugs in the [Heroku Dashboard](https://dashboard.heroku.com/) and copying them from the page address/URL:\n\n  ```bash\n  export \\\n    BUILD_PIPELINE_API=2f557b76-d685-452a-8651-9a6295a2a032 \\\n    BUILD_PIPELINE_WEB_UI=26a3ecbf-8188-43ae-b0fe-be2d9e9fe26f\n  ```\n* Setup the unique identifiers for the apps. The team name \u0026 DNS host names must already exist:\n\n  ✏️ *Modify these Heroku team \u0026 DNS host names for your own unqiue deployment. Host names must be at a domain that is registered \u0026 under your control.*\n\n  ```bash\n  export \\\n    TF_VAR_heroku_team_name=tinyrobot \\\n    TF_VAR_api_host_name=api.tinyrobot.science \\\n    TF_VAR_ui_host_name=tinyrobot.science\n  ```\n* Provision the configuration:\n\n  ```bash\n  cd environments/dev\n  terraform init\n  \n  # Capture the pipelines' current Slug IDs\n  source ../../bin/pipeline-slug-ids\n\n  terraform apply\n  ```\n* Output includes the DNS CNAME targets for the host names. To resolve them, please set these in DNS for each corresponding host name.\n\n  ⏱🔐 Automated SSL/TLS certficates for custom domains may take a few minutes to provision or more if there is a DNS misconfiguration.\n\n  ⚠️ **Set low TTL values (less than five minutes) on these DNS records to avoid delays if problems are encountered.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmars%2Ftinyrobot-science-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmars%2Ftinyrobot-science-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmars%2Ftinyrobot-science-terraform/lists"}