forked from usegalaxy-eu/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstance_core_stats.tf
32 lines (27 loc) · 946 Bytes
/
instance_core_stats.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
resource "openstack_compute_instance_v2" "grafana" {
name = "stats.galaxyproject.eu"
image_name = "generic-rockylinux8-v60-j167-5f3adb0e100c-main"
flavor_name = "m1.small"
key_pair = "cloud2"
security_groups = ["default", "public-web2"]
network {
name = "public"
}
}
resource "openstack_blockstorage_volume_v2" "grafana-data" {
name = "stats"
description = "Data volume for Grafana"
size = 2
}
resource "openstack_compute_volume_attach_v2" "stats-va" {
instance_id = openstack_compute_instance_v2.grafana.id
volume_id = openstack_blockstorage_volume_v2.grafana-data.id
}
resource "aws_route53_record" "grafana-usegalaxy" {
allow_overwrite = true
zone_id = var.zone_galaxyproject_eu
name = "stats.galaxyproject.eu"
type = "A"
ttl = "7200"
records = ["${openstack_compute_instance_v2.grafana.access_ip_v4}"]
}