Skip to content

Commit

Permalink
Merge pull request #145 from sanjaysrikakulam/main
Browse files Browse the repository at this point in the history
Add new maintenance VM
  • Loading branch information
bgruening authored Jan 25, 2023
2 parents 543e23b + b9728ab commit 2232467
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions instance_maintenance.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
data "openstack_images_image_v2" "maintenance-image" {
name = "Rocky 9.0"
}

resource "openstack_compute_instance_v2" "maintenance" {
name = "maintenance.galaxyproject.eu"
image_id = data.openstack_images_image_v2.maintenance-image.id
flavor_name = "m1.xlarge"
key_pair = "cloud2"
tags = []
security_groups = ["default"]

network {
name = "bioinf"
}

block_device {
uuid = data.openstack_images_image_v2.maintenance-image.id
source_type = "image"
volume_size = 256
destination_type = "volume"
boot_index = 0
delete_on_termination = true
}

user_data = <<-EOF
#cloud-config
package_update: true
package_upgrade: true
EOF
}

resource "aws_route53_record" "maintenance-galaxyproject" {
allow_overwrite = true
zone_id = var.zone_galaxyproject_eu
name = "maintenance.galaxyproject.eu"
type = "A"
ttl = "600"
records = ["${openstack_compute_instance_v2.maintenance.access_ip_v4}"]
}

0 comments on commit 2232467

Please sign in to comment.