{"id":18746055,"url":"https://github.com/fscm/terraform-module-aws-zookeeper","last_synced_at":"2025-04-12T21:33:28.027Z","repository":{"id":202050353,"uuid":"89463641","full_name":"fscm/terraform-module-aws-zookeeper","owner":"fscm","description":"Terraform Module to create a Apache Zookeeper cluster on AWS","archived":false,"fork":false,"pushed_at":"2022-01-03T16:15:21.000Z","size":20,"stargazers_count":13,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T16:11:20.275Z","etag":null,"topics":["aws","terraform","zookeeper"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":false,"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/fscm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-04-26T09:34:03.000Z","updated_at":"2022-01-03T16:15:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd8cfc20-cd26-4a2f-a131-4c141956d92e","html_url":"https://github.com/fscm/terraform-module-aws-zookeeper","commit_stats":null,"previous_names":["fscm/terraform-module-aws-zookeeper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fterraform-module-aws-zookeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fterraform-module-aws-zookeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fterraform-module-aws-zookeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fterraform-module-aws-zookeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fscm","download_url":"https://codeload.github.com/fscm/terraform-module-aws-zookeeper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248636643,"owners_count":21137497,"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":["aws","terraform","zookeeper"],"created_at":"2024-11-07T16:20:41.275Z","updated_at":"2025-04-12T21:33:23.018Z","avatar_url":"https://github.com/fscm.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Zookeeper Terraform Module\n\nA terraform module to create and manage an Apache Zookeeper cluster on AWS.\n\n## Prerequisites\n\nTerraform and AWS Command Line Interface tools need to be installed on your\nlocal computer.\n\nA previously build AMI base image with Apache Zookeeper is required.\n\n### Terraform\n\nTerraform version 0.8 or higher is required.\n\nTerraform installation instructions can be found\n[here](https://www.terraform.io/intro/getting-started/install.html).\n\n### AWS Command Line Interface\n\nAWS Command Line Interface installation instructions can be found [here](http://docs.aws.amazon.com/cli/latest/userguide/installing.html).\n\n### Apache Zookeeper AMI\n\nThis module requires that an AMI base image with Apache Zookeeper built using\nthe recipe from [this](https://github.com/fscm/packer-aws-zookeeper) project\nto already exist in your AWS account.\n\nThe `ami_name` and `ami_prefix` values should match the `aws_ami_name` and\n`aws_ami_name_prefix` used on the Packer recipe (respectively).\n\n### AWS Route53 Service (optional)\n\nIf you wish to register the instances FQDN, the AWS Route53 service is also\nrequired to be enabled and properly configured.\n\nTo register the instances FQDN on AWS Route53 service you need to set the\n`private_zone_id` and/or `public_zone_id` variable(s).\n\n## Module Input Variables\n\n- `ami_name` - The name of the AMI to use for the instance(s). See the [Apache Zookeeper AMI](#apache-zookeeper-ami) section for more information. *[default value: 'zookeeper']*\n- `ami_prefix` - The prefix of the AMI to use for the instance(s). See the [Apache Zookeeper AMI](#apache-zookeeper-ami) section for more information. *[default value: '']*\n- `associate_public_ip_address` - Associate a public IP address to the Apache Zookeeper instance(s). *[default value: false]*\n- `domain` - **[required]** The domain name to use for the Apache Zookeeper instance(s).\n- `extra_security_group_id` - Extra security group to assign to the Apache Zookeeper instance(s) (e.g.: 'sg-3f983f98'). *[default value: '']*\n- `heap_size` - The heap size for the Apache Zookeeper instance(s) (e.g.: '1G'). *[default value: '']*\n- `instance_type` - The type of instance to use for the Apache Zookeeper instance(s). *[default value: 't2.small']*\n- `keyname` - **[required]** The SSH key name to use for the Apache Zookeeper instance(s).\n- `name` - The main name that will be used for the Apache Zookeeper instance(s). *[default value: 'zookeeper']*\n- `number_of_instances` - Number of Apache Zookeeper instances in the cluster. *[default value: '1']*\n- `prefix` - A prefix to prepend to the Apache Zookeeper instance(s) name. *[default value: '']*\n- `private_zone_id` - The ID of the hosted zone for the private DNS record(s). *[default value: '']*\n- `public_zone_id` - The ID of the hosted zone for the public DNS record(s). Requires `associate_public_ip_address` to be set to 'true'. *[default value: '']*\n- `root_volume_iops` - The amount of provisioned IOPS (for 'io1' type only). *[default value: 0]*\n- `root_volume_size` - The volume size in gigabytes. *[default value: '8']*\n- `root_volume_type` - The volume type. Must be one of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD). *[default value: 'gp2']*\n- `subnet_ids` - **[required]** List of Subnet IDs to launch the instance(s) in (e.g.: ['subnet-0zfg04s2','subnet-6jm2z54q']).\n- `ttl` - The TTL (in seconds) for the DNS record(s). *[default value: '600']*\n- `use_asg` - Set to true to use an Auto Scaling Group for the cluster. See the [Auto Scaling Group Option](#auto-scaling-group-option) section for more information. *[default value: false]*\n- `vpc_id` - **[required]** The VPC ID for the security group(s).\n\n## Usage\n\n```hcl\nmodule \"my_zookeeper_cluster\" {\n  source                     = \"github.com/fscm/terraform-module-aws-zookeeper\"\n  ami_id                     = \"ami-gxrd5hz0\"\n  domain                     = \"mydomain.tld\"\n  keyname                    = \"my_ssh_key\"\n  name                       = \"zookeeper\"\n  number_of_instances        = \"3\"\n  prefix                     = \"mycompany-\"\n  private_zone_id            = \"Z3K95H7K1S3F\"\n  subnet_ids                 = [\"subnet-0zfg04s2\", \"subnet-6jm2z54q\"]\n  vpc_id                     = \"vpc-3f0tb39m\"\n}\n```\n\n## Outputs\n\n- `fqdn` - **[type: list]** List of FQDNs of the Apache Zookeeper instance(s).\n- `hostname` - **[type: list]** List of hostnames of the Apache Zookeeper instance(s).\n- `id` - **[type: list]** List of IDs of the Apache Zookeeper instance(s).\n- `ip` - **[type: list]** List of private IP address of the Apache Zookeeper instance(s).\n- `security_group` - **[type: string]** ID of the security group to be added to every instance that requires access to the Apache Zookeeper Cluster.\n- `security_group_monit` - **[type: string]** ID of the security group to be added to every instance that requires access to the JMX port of the Apache Zookeeper Cluster nodes.\n- `ssh_key` - **[type: string]** The name of the SSH key used.\n\n## Auto Scaling Group Option\n\n**- beta feature -**\n\nThe auto scaling group feature will allow for unresponsive instances of the\ncluster to be replaced with newer ones automatically.\n\nIn some cases this could lead to **data corruption/loss**.\n\nThis feature is more suitable to volatile environments and thus not recommended\nfor production clusters (where the information stored on the Zookeeper nodes\ncan not be lost and/or restored).\n\n### Auto Scaling Group Limitation\n\nDue to the way Elastic Network Interfaces have to be assigned to the Zookeeper\ninstances, on this method of creating the cluster, there can only be **one\ninstance per subnet**.\n\n## Cluster Access\n\nThis modules provides a security group that will allow access to the Apache\nZookeeper cluster instances.\n\nThat group will allow access to the following ports to all the AWS EC2\ninstances that belong to the group:\n\n| Service                 | Port   | Protocol |\n|:------------------------|:------:|:--------:|\n| Zookeeper Server        | 2181   |    TCP   |\n\nIf access to other ports (like the SSH port) is required, you can create your\nown security group and add it to the Apache Zookeeper cluster instances using\nthe `extra_security_group_id` variable.\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\nPlease read the [CONTRIBUTING.md](CONTRIBUTING.md) file for more details on how\nto contribute to this project.\n\n## Versioning\n\nThis project uses [SemVer](http://semver.org/) for versioning. For the versions\navailable, see the [tags on this repository](https://github.com/fscm/terraform-module-aws-zookeeper/tags).\n\n## Authors\n\n* **Frederico Martins** - [fscm](https://github.com/fscm)\n\nSee also the list of [contributors](https://github.com/fscm/terraform-module-aws-zookeeper/contributors)\nwho participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE)\nfile for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fterraform-module-aws-zookeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffscm%2Fterraform-module-aws-zookeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fterraform-module-aws-zookeeper/lists"}