{"id":32544066,"url":"https://github.com/mel-cdn/apollo-graphos-router-google-cloud-run","last_synced_at":"2026-05-07T09:33:41.793Z","repository":{"id":318122646,"uuid":"1069578810","full_name":"mel-cdn/apollo-graphos-router-google-cloud-run","owner":"mel-cdn","description":"In this guide, we’ll deploy a router endpoint to Google Cloud Run with Terraform, following an approach inspired by Apollo’s official deployment guide.","archived":false,"fork":false,"pushed_at":"2025-10-05T11:59:37.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-28T17:35:56.984Z","etag":null,"topics":["apollo","apollo-graphos","apollo-graphql","apollo-router","azure-devops","docker","google-cloud-run","graphql","terraform"],"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/mel-cdn.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T07:50:42.000Z","updated_at":"2025-10-05T11:59:41.000Z","dependencies_parsed_at":"2025-10-05T09:14:56.235Z","dependency_job_id":"04ab2b31-5784-4de5-8ac2-788a0fe3c58f","html_url":"https://github.com/mel-cdn/apollo-graphos-router-google-cloud-run","commit_stats":null,"previous_names":["mel-cdn/apollo-graphos-router-google-cloud-run"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mel-cdn/apollo-graphos-router-google-cloud-run","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mel-cdn%2Fapollo-graphos-router-google-cloud-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mel-cdn%2Fapollo-graphos-router-google-cloud-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mel-cdn%2Fapollo-graphos-router-google-cloud-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mel-cdn%2Fapollo-graphos-router-google-cloud-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mel-cdn","download_url":"https://codeload.github.com/mel-cdn/apollo-graphos-router-google-cloud-run/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mel-cdn%2Fapollo-graphos-router-google-cloud-run/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["apollo","apollo-graphos","apollo-graphql","apollo-router","azure-devops","docker","google-cloud-run","graphql","terraform"],"created_at":"2025-10-28T17:22:42.658Z","updated_at":"2026-05-07T09:33:41.788Z","avatar_url":"https://github.com/mel-cdn.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apollo GraphOS Router as Cloud Run Service\n\n## 📖 Overview\n\nIn this guide, we’ll deploy a router endpoint to Google Cloud Run with Terraform, following an approach inspired by\nApollo’s official\ndeployment [guide](https://www.apollographql.com/docs/graphos/routing/self-hosted/containerization/gcp).\n\n---\n## ✨ Highlights\n- ![Apollo GraphQL](https://img.shields.io/badge/-ApolloGraphQL-311C87?\u0026logo=apollo-graphql) Apollo GraphQL\n- ![Docker](https://img.shields.io/badge/Docker-2496ED?logo=docker\u0026logoColor=white) Containerization with Docker\n- ![GCP](https://img.shields.io/badge/Google%20Cloud-4285F4?logo=googlecloud\u0026logoColor=white) Google Cloud Platform (GCP) \n- ![Terraform](https://img.shields.io/badge/Terraform-7B42BC?logo=terraform\u0026logoColor=white) Infrastructure as Code via Terraform\n- ![Azure DevOps Pipeline](https://img.shields.io/badge/AzureDevOps-Pipelines-0078D4?logo=microsoft-azure\u0026logoColor=white) Automated CI/CD using Azure DevOps Pipelines (Terraform validation + deployment)\n\n---\n## 🚀 Getting Started\n\n### Prerequisites\nBefore proceeding, ensure the following are installed and configured:\n\n- **Google Cloud Project**\n    - Create a free [Google Cloud Account](https://console.cloud.google.com/)\n    - Install the [gcloud CLI](https://cloud.google.com/sdk/docs/install)\n- **Terraform**\n    - Install the [Terraform CLI](https://developer.hashicorp.com/terraform/install)\n- **Apollo GraphQL Account**\n    - Create a free [Apollo GraphQL Account](https://www.apollographql.com/)\n    - Create a `Graph` (Supergraph)\n    - Store these values to your GCP Secret Manager\n        - `apollo-api-key` -\u003e APOLLO_KEY\n            - e.g. service:\u003cgraph-name\u003e:\u003cunique-key\u003e\n        - `apollograph-id` -\u003e APOLLO_GRAPH_REF (e.g. `\u003cgraph-name\u003e@current`) \n    - This [repository](https://github.com/mel-cdn/python-strawberry-graphql-fastapi-apollo) provides the infrastructure and pipeline setup needed to deploy and publish a **Subgraph** to an **Apollo Supergraph**\n\n### Authenticate Google Cloud Credentials\n```bash\n# Authenticate your GCP account\ngcloud init\n\n# Set your default project\ngcloud config set project \u003cmy-project-id\u003e\n\n# Configure application default credentials (for SDKs and integrations)\ngcloud auth application-default login\n```\n\n### Installation\n```bash\n# Clone repository\ngit clone https://github.com/mel-cdn/apollo-graphos-router-google-cloud-run.git\ncd apollo-graphos-router-google-cloud-run\n```\n\n### Deployment via Terraform\n```bash\n# Move to Terraform path\ncd ./terraform\n\n# Initialize Terraform with your remote backend\nterraform init --backend-config=\"bucket=\u003cterraform-state-gcs-bucket\u003e\"  \n\n# Format Terraform configuration files\nterraform fmt\n\n# Validate configuration\nterraform validate\n\n# Generate execution plan\nterraform plan \\    \n  -var=\"project_prefix=$(GCP_PREFIX)\" \\\n  -var=\"environment=$(ENVIRONMENT)\" \\\n  -var=\"region=$(GCP_REGION)\" \\\n  -var=\"root_domain_name=$(ROOT_DOMAIN_NAME)\" \\\n  -out=tfplan\n\n# Apply changes\nterraform apply tfplan\n```\n\n### Publish Subgraph to Supergraph\n```bash\nAPOLLO_KEY=\u003cAPOLLO_KEY\u003e rover subgraph publish \u003cAPOLLO_GRAPH_REF\u003e \\\n  --schema=\"./tmp/schema.graphql\" \\\n  --name=\"subgraph-name\" \\\n  --routing-url=\"https://\u003csubgraph-graphql-api-url\u003e/graphql\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmel-cdn%2Fapollo-graphos-router-google-cloud-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmel-cdn%2Fapollo-graphos-router-google-cloud-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmel-cdn%2Fapollo-graphos-router-google-cloud-run/lists"}