/terraform-aws-eth-node

Spin up Ethereum execution/consensus clients on AWS.

Primary LanguageHCLMIT LicenseMIT

terraform-aws-eth-node

Spin up Ethereum execution/consensus clients on AWS.

  • The deployment takes no more than a minute

  • All clients are managed through systemd

  • The module takes care of the:

    • EC2's setup, configuration & lifecycle
    • Creation & management of the volumes that'll hold the data
  • Full examples can be found in the examples directory.

⚠️ Be mindful with the security group's configuration. All the examples are simplified to allow all external traffic, which in most cases isn't recommended.

License

MIT Licensed. See LICENSE for full details.

Requirements

Name Version
terraform >= 1.0
aws >= 5.0

Providers

Name Version
aws 5.30.0

Modules

No modules.

Resources

Name Type
aws_autoscaling_group.this resource
aws_ebs_volume.this resource
aws_iam_instance_profile.this resource
aws_iam_role.this resource
aws_launch_template.this resource
aws_security_group.this resource
aws_ami.this data source
aws_iam_policy_document.attach_ebs_volume_policy data source
aws_iam_policy_document.policy_document data source
aws_subnet.this data source

Inputs

Name Description Type Default Required
ami The base AMI to use for the Autoscaling grp
object({
name = string
})
{
"name": "debian-12-amd64-20230711-1438"
}
no
clients The list of ethereum clients to deploy
list(
object({
name = string # name of the ethereum client
package_url = string # link to the url of the binary to download
cmd = string # the startup command of the client

ebs = optional(object({
device_name = string
mountpoint = string
type = string
size = number
}))
}))
n/a yes
compute The EC2 configuration
object({
type = optional(string, "t2.micro")
state = optional(string, "running")
associate_public_ip_address = bool
security_group_ids = optional(list(string)) # external SGs;
ebs_optimized = optional(bool)
disable_api_stop = optional(bool)
disable_api_termination = optional(bool)
key_name = optional(string)
max_instance_lifetime = optional(number)
})
{
"associate_public_ip_address": true,
"state": "running",
"type": "t2.micro"
}
no
name The generic name to apply across the different resources string n/a yes
security_group The security group rules to apply to the Autoscaling grp
list(object({
type = string
description = optional(string)
from = number
to = number
protocol = string
cidr_blocks = list(string)
}))
[] no
subnet_id The subnet to deploy the Autoscaling grp in string n/a yes

Outputs

Name Description
compute Compute created for the client(s)
ebs EBS volumes created for the client(s)
security_group Security group created for the client(s)