forked from usegalaxy-eu/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
instance_core_maintenance.tf
48 lines (42 loc) · 1.36 KB
/
instance_core_maintenance.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
data "openstack_images_image_v2" "maintenance-image" {
name = "generic-rockylinux8-v60-j167-5f3adb0e100c-main"
}
resource "openstack_compute_instance_v2" "maintenance" {
name = "maintenance.galaxyproject.eu"
flavor_name = "m1.xlarge"
key_pair = "cloud2"
tags = []
security_groups = ["default", "rsyslog"]
network {
name = "bioinf"
}
block_device {
uuid = data.openstack_images_image_v2.maintenance-image.id
source_type = "image"
volume_size = 500
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}"]
}
resource "aws_route53_record" "cm2-galaxyproject" {
allow_overwrite = true
zone_id = var.zone_galaxyproject_eu
name = "condor-cm2.galaxyproject.eu"
type = "CNAME"
ttl = "86400"
records = ["${openstack_compute_instance_v2.maintenance.access_ip_v4}"]
}