{"id":21106955,"url":"https://github.com/buildo/terraform-aws-dockercomposehost","last_synced_at":"2026-01-02T06:11:29.206Z","repository":{"id":33826977,"uuid":"142136468","full_name":"buildo/terraform-aws-dockercomposehost","owner":"buildo","description":"Terraform module for creating EC2 instances with Docker and Docker Compose installed","archived":false,"fork":false,"pushed_at":"2021-11-05T17:52:03.000Z","size":45,"stargazers_count":7,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-21T03:41:34.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/buildo.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":"security_group.tf","support":null}},"created_at":"2018-07-24T09:30:40.000Z","updated_at":"2022-07-04T01:35:04.000Z","dependencies_parsed_at":"2022-08-07T23:16:31.950Z","dependency_job_id":null,"html_url":"https://github.com/buildo/terraform-aws-dockercomposehost","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Fterraform-aws-dockercomposehost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Fterraform-aws-dockercomposehost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Fterraform-aws-dockercomposehost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildo%2Fterraform-aws-dockercomposehost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildo","download_url":"https://codeload.github.com/buildo/terraform-aws-dockercomposehost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243551327,"owners_count":20309300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-11-20T00:34:42.904Z","updated_at":"2026-01-02T06:11:29.127Z","avatar_url":"https://github.com/buildo.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-dockercomposehost\n\nTerraform module for creating AWS EC2 instances with Docker and Docker Compose installed.\n\n## Example\n\n```yaml\n# docker-compose.yml\nversion: '3'\n\nservices:\n  hello:\n    image: nginxdemos/hello\n    ports:\n      - \"80:80\"\n```\n\n```hcl\n# main.tf\nmodule \"aws-dockercomposehost\" {\n  source = \"git@github.com:/buildo/terraform-aws-dockercomposehost.git\"\n\n  project_name    = \"project-name\"\n  ssh_key_name    = \"existing-key\"\n\n  in_open_ports = [80]\n}\n\n```\n\nBy default a custom cloud watch configuration will be used.\nIf you want to specify a different one, just give a value to the variable `var.cloudwatch_agent_config`\n\nExample:\n\n```hcl\n# main.tf\nmodule \"aws-dockercomposehost\" {\n  source = \"git@github.com:/buildo/terraform-aws-dockercomposehost.git\"\n\n  project_name    = \"project-name\"\n  ssh_key_name    = \"existing-key\"\n\n  in_open_ports = [80]\n\n  cloudwatch_agent_config = \"cwagentconfig.json\"\n}\n```\n\n## Resources\n\nThese resources are always created:\n- A EC2 instance\n- A Security Group\n    - A Security Group Rule for port 22/tcp\n    - A Security Group Rule for each port / port range specified in variable `in_open_ports`\n- A IAM Role called \"${var.project_name}-instance-profile\"\n- A IAM Profile called \"${var.project_name}\"\n\nThese resources are created if their variable is set\n\n| Resource | Variable |\n|---|---|\n| A CloudWatch Alarm for disk space utilization | disk_utilization_alarm_enabled == true |\n| A Route53 record | zone_id \u0026\u0026 host_name |\n|   |   |\n\n## Fixes/Ideas\n\n- Missing data are treated as \"breaching\", but the cloudwatch agent needs time to begin to collect data. This way the alarm is always triggered. Solutions?\n- Isn't better to have directly an AMI built with something (Packer?) with docker and docker-compose installed?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildo%2Fterraform-aws-dockercomposehost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildo%2Fterraform-aws-dockercomposehost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildo%2Fterraform-aws-dockercomposehost/lists"}