forked from usegalaxy-eu/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstance_core_upload.tf
More file actions
34 lines (29 loc) · 890 Bytes
/
instance_core_upload.tf
File metadata and controls
34 lines (29 loc) · 890 Bytes
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
variable "upload-dns" {
default = "upload.galaxyproject.eu"
}
data "openstack_images_image_v2" "upload-image" {
name = "generic-internal-v60-j333-fb0029b7a329-dev"
}
resource "openstack_compute_instance_v2" "upload" {
name = var.upload-dns
image_id = data.openstack_images_image_v2.upload-image.id
flavor_name = "m1.medium"
key_pair = "cloud2"
security_groups = ["default", "public-ssh", "public-web2", "ufr-ingress"]
network {
name = "bioinf"
}
user_data = <<-EOF
#cloud-config
package_update: true
package_upgrade: true
EOF
}
resource "aws_route53_record" "upload-galaxyproject" {
allow_overwrite = true
zone_id = var.zone_galaxyproject_eu
name = var.upload-dns
type = "A"
ttl = "600"
records = ["${openstack_compute_instance_v2.upload.access_ip_v4}"]
}