Skip to content

Commit

Permalink
terraform, gcp: add filestore variable for source_backup
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Aug 22, 2024
1 parent e8d064f commit 0719abf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions terraform/gcp/storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ resource "google_filestore_instance" "homedirs" {
}

file_shares {
capacity_gb = each.value.capacity_gb
name = "homes"
capacity_gb = each.value.capacity_gb
name = "homes"
source_backup = each.value.source_backup
}

networks {
Expand Down
5 changes: 5 additions & 0 deletions terraform/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ variable "filestores" {
name_suffix : optional(string, null),
capacity_gb : optional(number, 1024),
tier : optional(string, "BASIC_HDD"),
source_backup : optional(string, null),
}))
default = {
"filestore" : {}
Expand All @@ -341,6 +342,10 @@ variable "filestores" {
- tier: Google FileStore service tier to use. Most likely BASIC_HDD
(for slower home directories, min $204 / month) or BASIC_SSD (for
faster home directories, min $768 / month). Default: BASIC_HDD.
- source_backup: To restore from a backup, this can be set. If a
backup has been done from the web console, this must be updated
to match retroactively as terraform apply will otherwise lead to
a blocked re-creation attempt.
EOT
}

Expand Down

0 comments on commit 0719abf

Please sign in to comment.