Terraform module to setup all resources needed for setting up a Neo4j cluster (enterprise).
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami | String(optional, "ami-1b791862"): AMI to be used for the Neo4j nodes | string | "ami-1b791862" |
no |
backup_enabled | Int(optional, false): Whether to allow client connections for taking backups | string | "false" |
no |
backup_port | Int(optional, 6362): Backup client port | string | "6362" |
no |
backup_sg_ids | List(optional, []): Security group IDs for the backup client(s) | list | <list> |
no |
bolt_enabled | Int(optional, true): Whether to allow client connections via Bolt | string | "true" |
no |
bolt_port | Int(optional, 9000): Bolt client port | string | "9000" |
no |
client_sg_ids | List(optional, []): Security group IDs for client access to the cluster, via Bolt and/or HTTP(S) | list | <list> |
no |
cloudwatch_logs_enabled | Bool(optional, false): Whether to enable Cloudwatch Logs | string | "false" |
no |
core_count | Int(optional, 1): Size of the Core Neo4j cluster | string | "3" |
no |
core_type | String(optional, t2.small): Instance type to use for the Core instances | string | "t2.small" |
no |
customer | String(optional): Customer name | string | "" |
no |
discovery_port | Int(optional, 5000): Causal clustering discovery port | string | "5000" |
no |
environment | String(required): Environment name | string | n/a | yes |
http_enabled | Int(optional, true): Whether to allow client connections via HTTP | string | "true" |
no |
http_port | Int(optional, 7474): HTTP client port | string | "7474" |
no |
https_enabled | Int(optional, false): Whether to allow client connections via HTTPS | string | "false" |
no |
https_port | Int(optional, 7473): HTTPS client port | string | "7473" |
no |
key_name | String(required): ID of the SSH key to use for the Neo4j nodes | string | n/a | yes |
name | String(optional, "neo4j"): Name to use for the Neo4j cluster | string | "neo4j" |
no |
project | String(required): Project name | string | n/a | yes |
r53_domain | String(optional, ""): R53 master name to use for setting neo4j DNS records. No records are created when not set | string | "" |
no |
raft_port | Int(optional, 7000): Causal clustering raft port | string | "7000" |
no |
security_group_ids | List(optional, []): Extra security group IDs to attach to the cluster. Note: a default SG is already created and exposed via outputs | list | <list> |
no |
subnet_ids | List(required): Subnet IDs where to deploy the cluster | list | <list> |
no |
tags | Map(optional, {}): Optional tags | map | <map> |
no |
termination_protection | Bool(optional, true): Whether to enable termination protection on the Ne04j nodes | string | "true" |
no |
transaction_port | Int(optional, 6000): Causal clustering transaction port | string | "6000" |
no |
volume_encryption_enabled | Bool(optional, false): Whether to enables EBS encryption | string | "false" |
no |
volume_iops | Int(required if volume_type="io1"): Amount of provisioned IOPS for the EBS volume | string | "0" |
no |
volume_path | String(optional, "/var/lib/neo4j/data"): Mount path of the EBS volume | string | "/var/lib/neo4j/data" |
no |
volume_size | Int(required): EBS volume size (in GB) to use | string | n/a | yes |
volume_type | String(optional, "gp2"): EBS volume type to use | string | "gp2" |
no |
vpc_id | String(required): VPC ID where to deploy the cluster | string | n/a | yes |
Name | Description |
---|---|
instance_ids | List: IDs of the EC2 instances |
instance_private_dns | List: The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC |
instance_private_ips | List: The private IP address assigned to the instances |
instance_public_dns | List: The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC |
instance_public_ips | List: The public IP address assigned to the instance, if applicable. NOTE: If you are using an aws_eip with your instance, you should refer to the EIP's address directly and not use public_ip, as this field will change after the EIP is attached. |
instances_role_id | IAM role ID used by the EC2 instances |
instances_role_name | IAM role name used by the EC2 instances |
sg_id | ID of the Neo4j security group |
module "neo4j" {
source = "github.com/skyscrapers/terraform-neo4j?ref=0.1"
project = "${var.project}"
environment = "${terraform.workspace}"
name = "neo4j"
key_name = "key"
volume_size = 50
vpc_id = "${module.vpc.vpc_id}"
subnet_ids = "${module.vpc.private_db_subnets}"
security_group_ids = ["${module.sg_all.sg_id}"]
client_sg_ids = ["${data.aws_security_group.kubernetes.id}"]
backup_enabled = true
backup_sg_ids = ["${data.terraform_remote_state.static.jumphost_sg_id}"]
r53_domain = "foo.bar"
}
When using Neo4j enterprise edition, it's possible to take (and restore) online backups via the neo4j-admin
tool. Controlling backup access is done by setting the following variables:
- [
backup_sg_ids
] - [
backup_enabled
] - [
backup_port
]