-
Notifications
You must be signed in to change notification settings - Fork 1
/
google_filestore.tf
49 lines (41 loc) · 1.34 KB
/
google_filestore.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
49
#
# Plyaxon repo
#
resource "google_filestore_instance" "polyaxon_filestore_repos" {
name = "${var.gke_cluster_name}-repos"
project = var.gcp_project
zone = var.gcp_zone
tier = var.filestore_core.tier
file_shares {
capacity_gb = var.filestore_core.capacity_gb
name = "repos"
}
networks {
network = google_compute_network.private_network.name
modes = ["MODE_IPV4"]
}
depends_on = [google_project_service.enabled-services]
}
#
# Extras
#
// It is impossible to create PVCs of NFS servers with terraform-provider-kubernetes v1.11.1.
// So, it is not good to dynamically create resources.
// After resolving the issue, we will improve this part.
// SEE ALSO: https://github.com/terraform-providers/terraform-provider-kubernetes/pull/590
resource "google_filestore_instance" "polyaxon_filestore_extras" {
count = length(var.filestore_extras)
project = var.gcp_project
zone = var.gcp_zone
name = "${var.gke_cluster_name}-extras-${count.index}"
tier = element(var.filestore_extras.*.tier, count.index)
file_shares {
capacity_gb = element(var.filestore_extras.*.capacity_gb, count.index)
name = "extras${count.index}"
}
networks {
network = google_compute_network.private_network.name
modes = ["MODE_IPV4"]
}
depends_on = [google_project_service.enabled-services]
}