This module sets up an ec2 instance running mongodb with ansible. Runs the popular undergreen.mongodb
ansible role to configure the machine. Further configuration settings can be provided in a mongodb.json
file.
Please refer to https://github.com/UnderGreen/ansible-role-mongodb for details on how to configure the
additional variables supplied by mongodb.json.
For Terraform v0.12.0+
See examples directory for a working example.
module "defaults" {
source = "../.."
private_key_path = var.private_key_path
public_key_path = var.public_key_path
vpc_id = module.default_vpc.vpc_id
subnet_ids = module.default_vpc.subnet_ids
vpc_security_group_ids = [aws_security_group.this.id]
playbook_vars_file = "${path.cwd}/mongodb.yaml"
root_volume_size = 100 # in gb
}
No issue is creating limit on this module.
| Name | Version |
|---|---|
| aws | n/a |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| create_efs | Boolean to create EFS file system | bool |
true |
no |
| id | The id to give to rds db, falls back to name | string |
"" |
no |
| instance_type | Instance type | string |
"t2.medium" |
no |
| key_name | The key pair to import | string |
"" |
no |
| name | A unique name to give all the resources | string |
"superset" |
no |
| playbook_vars | Extra vars to include, can be hcl or json | any |
{} |
no |
| playbook_vars_file | json or yaml to run | string |
"" |
no |
| private_key_path | The path to the private ssh key | string |
n/a | yes |
| public_key_path | The path to the public ssh key | string |
n/a | yes |
| root_volume_size | Root volume size | string |
8 |
no |
| subnet_ids | The id of the subnet | list(string) |
n/a | yes |
| tags | Tags to attach to all resources | map(string) |
{} |
no |
| vpc_id | The vpc to deploy into | string |
n/a | yes |
| vpc_security_group_ids | List of security groups | list(string) |
n/a | yes |
| Name | Description |
|---|---|
| instance_id | The instance ID created |
| key_name | The key pair name created |
| public_ip | The public IP of the instance created |
| ssh_command | n/a |
This module has been packaged with terratest tests
To run them:
- Install Go
- Run
make test-initfrom the root of this repo - Run
make testagain from root
Module managed by insight-infrastructure
Apache 2 Licensed. See LICENSE for full details.