public_ip = data.terraform_remote_state.vpc.outputs.public_ip
private_ip = data.terraform_remote_state.vpc.outputs.private_ip
pubkey_path = pathexpand(var.pubkey_path)
- pubkey_name = "${local.cluster_name}-arvados-deployer-key"
public_hosts = data.terraform_remote_state.vpc.outputs.public_hosts
private_hosts = data.terraform_remote_state.vpc.outputs.private_hosts
user_facing_hosts = data.terraform_remote_state.vpc.outputs.user_facing_hosts
internal_service_hosts = data.terraform_remote_state.vpc.outputs.internal_service_hosts
ssl_password_secret_name = "${local.cluster_name}-${var.ssl_password_secret_name_suffix}"
+ instance_ami_id = var.instance_ami != "" ? var.instance_ami : data.aws_ami.debian-11.image_id
}
resource "aws_instance" "arvados_service" {
for_each = toset(concat(local.public_hosts, local.private_hosts))
- ami = data.aws_ami.debian-11.image_id
+ ami = local.instance_ami_id
instance_type = var.default_instance_type
user_data = templatefile("user_data.sh", {
"hostname": each.value,
# SPDX-License-Identifier: CC-BY-SA-3.0
# Set to a specific SSH public key path. Default: ~/.ssh/id_rsa.pub
-# pubkey_path = /path/to/pub.key
+# pubkey_path = "/path/to/pub.key"
# Set the instance type for your hosts. Default: m5a.large
# default_instance_type = "t2.micro"
# User for software deployment. Depends on the AMI's distro.
# Default: 'admin'
-# deploy_user = ubuntu
+# deploy_user = "ubuntu"
+
+# Instance AMI to use for service nodes. Default: latest from Debian 11
+# instance_ami = "ami-0481e8ba7f486bd99"
\ No newline at end of file
description = "Name suffix for the SSL certificate's private key password AWS secret."
type = string
default = "arvados-ssl-privkey-password"
+}
+
+variable "instance_ami" {
+ description = "The EC2 instance AMI to use on the nodes"
+ type = string
+ default = ""
}
\ No newline at end of file