@@ -130,7 +130,7 @@ data "aws_ami" "ubuntu_amd64" {
130130}
131131
132132# ###############################################################################
133- # Auto-Drive Instances
133+ # Auto-Drive Instances Mainnet
134134# ###############################################################################
135135
136136module "ec2_auto_drive" {
@@ -171,7 +171,50 @@ module "ec2_auto_drive" {
171171}
172172
173173# ###############################################################################
174- # Gateway Instances
174+ # Auto-Drive Instances Testnet
175+ # ###############################################################################
176+
177+ # note: we have one private auto-drive instance for taurus on hetzner, this is the public one
178+
179+ module "ec2_auto_drive_taurus" {
180+ source = " ../../../templates/terraform/aws/ec2"
181+
182+ name = " ${ local . name } -taurus-backend"
183+ count = var. auto_drive_instance_count
184+ ami = data. aws_ami . ubuntu_amd64 . id
185+ instance_type = " t3.medium"
186+ availability_zone = element (module. vpc . azs , 0 )
187+ subnet_id = element (module. vpc . public_subnets , 0 )
188+ vpc_security_group_ids = [aws_security_group . auto_drive_sg . id ]
189+ iam_instance_profile = aws_iam_instance_profile. secrets_instance_profile . name
190+ associate_public_ip_address = false # Gateway instances use EIPs
191+ create_eip = true
192+ disable_api_stop = false
193+
194+ create_iam_instance_profile = true
195+ ignore_ami_changes = true
196+ iam_role_description = " IAM role for EC2 instance"
197+ iam_role_policies = {
198+ AdministratorAccess = " arn:aws:iam::aws:policy/AdministratorAccess"
199+ }
200+ root_block_device = [
201+ {
202+ device_name = " /dev/sdf"
203+ encrypted = true
204+ volume_type = " gp3"
205+ throughput = 250
206+ volume_size = var.auto_drive_root_volume_size
207+ }
208+ ]
209+ volume_tags = merge (
210+ { " Name" = " ${ local . name } -taurus-backend-root-volume-${ count . index } " },
211+ var. tags
212+ )
213+ tags = merge (local. tags , { Role = " auto-drive-taurus" })
214+ }
215+
216+ # ###############################################################################
217+ # Files Gateway Instances Mainnet
175218# ###############################################################################
176219
177220module "ec2_gateway" {
@@ -209,3 +252,43 @@ module "ec2_gateway" {
209252 )
210253 tags = merge (local. tags , { Role = " gateway" })
211254}
255+
256+ # ###############################################################################
257+ # Multi-Network Gateway Instances
258+ # ###############################################################################
259+
260+ module "ec2_multi_gateway" {
261+ source = " ../../../templates/terraform/aws/ec2"
262+ name = " ${ local . name } -multi-network-gateway"
263+ count = var. multi_network_gateway_instance_count
264+ ami = data. aws_ami . ubuntu_amd64 . id
265+ instance_type = var. multi_network_gateway_instance_type
266+ availability_zone = element (module. vpc . azs , 0 )
267+ subnet_id = element (module. vpc . public_subnets , 0 )
268+ vpc_security_group_ids = [aws_security_group . auto_drive_sg . id ]
269+ associate_public_ip_address = false # Gateway instances use EIPs
270+ create_eip = true
271+ disable_api_stop = false
272+
273+ create_iam_instance_profile = true
274+ ignore_ami_changes = true
275+ iam_role_description = " IAM role for EC2 instance"
276+ iam_role_policies = {
277+ AdministratorAccess = " arn:aws:iam::aws:policy/AdministratorAccess"
278+ }
279+
280+ root_block_device = [
281+ {
282+ device_name = " /dev/sdf"
283+ encrypted = true
284+ volume_type = " gp3"
285+ throughput = 250
286+ volume_size = var.gateway_root_volume_size
287+ }
288+ ]
289+ volume_tags = merge (
290+ { " Name" = " ${ local . name } -multi-network-gateway-root-volume-${ count . index } " },
291+ var. tags
292+ )
293+ tags = merge (local. tags , { Role = " multi-network-gateway" })
294+ }
0 commit comments