1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 data "aws_ami" "debian" {
10 values = ["debian-11-amd64-*"]
19 owners = ["136693071363"]
22 resource "random_password" "cluster_name" {
28 module "ec2_cluster" {
29 source = "terraform-aws-modules/ec2-instance/aws"
32 count = var.instances_count
34 name = "${var.instance_name_prefix}-${count.index}"
36 ami = data.aws_ami.debian.id
37 instance_type = "t3.medium"
38 associate_public_ip_address = true
41 root_block_device = [{
44 delete_on_termination = true,
47 key_name = var.user_key
49 # These are tordo's SGs
50 vpc_security_group_ids = [
51 "sg-07a8d44b8d75ab8de",
52 "sg-0b36cbad0a62e6154",
53 "sg-0fdce93c95877be0b",
54 "sg-0e8fdd7632926eac6"
56 subnet_id = "subnet-05b635657ce13d74e"
59 Name = "${var.instance_name_prefix}-${count.index}"
63 Ticket = var.jenkins_build_tag
64 Cluster = random_password.cluster_name.result