{"id":22199240,"url":"https://github.com/babbel/terraform-aws-secretsmanager-for-database-url","last_synced_at":"2026-03-04T10:32:22.163Z","repository":{"id":38191938,"uuid":"331569215","full_name":"babbel/terraform-aws-secretsmanager-for-database-url","owner":"babbel","description":"Terraform module creating a SecretsManager for `DATABASE_URL`","archived":false,"fork":false,"pushed_at":"2026-02-28T00:02:12.000Z","size":74,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":33,"default_branch":"main","last_synced_at":"2026-03-02T20:41:47.418Z","etag":null,"topics":["aws","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/babbel/secretsmanager-for-database-url/aws","language":"HCL","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/babbel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2021-01-21T08:54:37.000Z","updated_at":"2025-11-27T20:19:11.000Z","dependencies_parsed_at":"2023-01-24T03:45:22.015Z","dependency_job_id":"94cdc4ad-4354-4426-af55-9f1849297c71","html_url":"https://github.com/babbel/terraform-aws-secretsmanager-for-database-url","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/babbel/terraform-aws-secretsmanager-for-database-url","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fterraform-aws-secretsmanager-for-database-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fterraform-aws-secretsmanager-for-database-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fterraform-aws-secretsmanager-for-database-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fterraform-aws-secretsmanager-for-database-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babbel","download_url":"https://codeload.github.com/babbel/terraform-aws-secretsmanager-for-database-url/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babbel%2Fterraform-aws-secretsmanager-for-database-url/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30063359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["aws","terraform","terraform-module"],"created_at":"2024-12-02T15:13:44.196Z","updated_at":"2026-03-04T10:32:22.123Z","avatar_url":"https://github.com/babbel.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecretsManager for `DATABASE_URL`\n\nThis module creates a SecretsManager and stores the [`DATABASE_URL`](https://guides.rubyonrails.org/configuring.html#configuring-a-database) for the given `aws_db_instance` or `aws_rds_cluster` in it.\n\nThis is useful in order to load the `DATABASE_URL` into ECS via [`containerDefinitions.secrets.valueFrom`](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html).\n\n## Usage\n\n```tf\nmodule \"secretsmanager-for-database-url\" {\n  source  = \"babbel/secretsmanager-for-database-url/aws\"\n  version = \"~\u003e 1.2\"\n\n  name_prefix = \"example\"\n\n  db_instance   = aws_db_instance.example\n  database_name = \"example\"\n  protocol      = \"mysql2\"\n}\n```\n\nIt can also be used for an RDS cluster like this:\n\n```tf\nmodule \"secretsmanager-for-database-url\" {\n  source  = \"babbel/secretsmanager-for-database-url/aws\"\n  version = \"~\u003e 1.2\"\n\n  name_prefix = \"example\"\n\n  rds_cluster   = aws_rds_cluster.example\n  database_name = \"example\"\n  protocol      = \"mysql2\"\n}\n```\n\nIn the ECS task definition, you can now define environment variables referencing the SecretsManager:\n\n```tf\nresource \"aws_ecs_task_definition\" \"example\" {\n  ...\n\n  container_definitions = jsonencode([{\n    ...\n\n    secrets = [{\n      name  = \"DATABASE_URL\"\n      value = module.secretsmanager-for-database-url.secretsmanager_secret.arn\n    }]\n\n    ...\n  }])\n\n  ...\n}\n```\n\nPlease also make sure that you grant permissions on the `secretsmanager:GetSecretValue` action for the SecretsManager on the [ECS task execution IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabbel%2Fterraform-aws-secretsmanager-for-database-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabbel%2Fterraform-aws-secretsmanager-for-database-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabbel%2Fterraform-aws-secretsmanager-for-database-url/lists"}