Compare commits
11 Commits
2024-09-03
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
fa1e064ff8
|
|||
|
5acdb31ab5
|
|||
|
70835b86af
|
|||
|
46c95c1c6d
|
|||
|
1df1f4595a
|
|||
|
2c061156e7
|
|||
|
8e3411f7f1
|
|||
|
9226c1ad7a
|
|||
|
0e1347935b
|
|||
|
76233b84ea
|
|||
|
8d66adf74a
|
@@ -1,5 +1,10 @@
|
|||||||
resource "digitalocean_droplet" "this" {
|
resource "digitalocean_droplet" "this" {
|
||||||
backups = "true"
|
backups = "true"
|
||||||
|
backup_policy {
|
||||||
|
plan = var.backup_policy_plan
|
||||||
|
weekday = var.backup_policy_weekday
|
||||||
|
hour = var.backup_policy_hour
|
||||||
|
}
|
||||||
image = var.image_name
|
image = var.image_name
|
||||||
ipv6 = "true"
|
ipv6 = "true"
|
||||||
lifecycle {
|
lifecycle {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
digitalocean = {
|
digitalocean = {
|
||||||
source = "digitalocean/digitalocean"
|
source = "digitalocean/digitalocean"
|
||||||
version = ">= 2.40.0"
|
version = ">= 2.68.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
required_version = ">= 1.8.1"
|
required_version = ">= 1.10.3"
|
||||||
}
|
}
|
||||||
|
|||||||
5
variable.backup_policy_hour.tf
Normal file
5
variable.backup_policy_hour.tf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
variable "backup_policy_hour" {
|
||||||
|
# UTC Hour : 0, 4, 8, 12, 16, 20
|
||||||
|
default = "0"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
5
variable.backup_policy_plan.tf
Normal file
5
variable.backup_policy_plan.tf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
variable "backup_policy_plan" {
|
||||||
|
# daily or weekly
|
||||||
|
default = "weekly"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
5
variable.backup_policy_weekday.tf
Normal file
5
variable.backup_policy_weekday.tf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
variable "backup_policy_weekday" {
|
||||||
|
# SUN, MON, TUE, WED, THU, FRI, SAT
|
||||||
|
default = "SUN"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user