resource "aws_instance" "arvados_service" {
for_each = toset(concat(local.public_hosts, local.private_hosts))
ami = local.instance_ami_id
- instance_type = var.default_instance_type
+ instance_type = try(var.instance_type[each.value], var.instance_type.default)
user_data = templatefile("user_data.sh", {
"hostname": each.value,
"deploy_user": var.deploy_user,
# Set to a specific SSH public key path. Default: ~/.ssh/id_rsa.pub
# pubkey_path = "/path/to/pub.key"
-# Set the instance type for your hosts. Default: m5a.large
-# default_instance_type = "t2.micro"
+# Set the instance type for your nodes. Default: m5a.large
+# instance_type = {
+# default = "m5a.xlarge"
+# controller = "c5a.4xlarge"
+# }
# AWS secret's name which holds the SSL certificate private key's password.
# Default: "arvados-ssl-privkey-password"
#
# SPDX-License-Identifier: CC-BY-SA-3.0
-variable "default_instance_type" {
- description = "The default EC2 instance type to use on the nodes"
- type = string
- default = "m5a.large"
+variable "instance_type" {
+ description = "The EC2 instance types to use per service node"
+ type = map(string)
+ default = {
+ default = "m5a.large"
+ }
}
variable "pubkey_path" {