Compare commits
No commits in common. "master" and "2023-04-22.01" have entirely different histories.
master
...
2023-04-22
8
Makefile
8
Makefile
@ -3,19 +3,19 @@ all: init fmt validate
|
|||||||
|
|
||||||
.PHONY: init
|
.PHONY: init
|
||||||
init:
|
init:
|
||||||
tofu init -upgrade=false
|
terraform init -upgrade=false
|
||||||
|
|
||||||
.PHONY: initupgrade
|
.PHONY: initupgrade
|
||||||
initupgrade:
|
initupgrade:
|
||||||
tofu init -upgrade=true
|
terraform init -upgrade=true
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: init
|
fmt: init
|
||||||
tofu fmt
|
terraform fmt
|
||||||
|
|
||||||
.PHONY: validate
|
.PHONY: validate
|
||||||
validate: init fmt
|
validate: init fmt
|
||||||
tofu validate
|
terraform validate
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
@ -1,17 +1,7 @@
|
|||||||
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 {
|
|
||||||
ignore_changes = [
|
|
||||||
image,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
monitoring = "true"
|
monitoring = "true"
|
||||||
name = "${var.host_name}.${var.domain_name}"
|
name = "${var.host_name}.${var.domain_name}"
|
||||||
region = var.region
|
region = var.region
|
||||||
|
@ -2,8 +2,8 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
digitalocean = {
|
digitalocean = {
|
||||||
source = "digitalocean/digitalocean"
|
source = "digitalocean/digitalocean"
|
||||||
version = ">= 2.53.0"
|
version = ">= 2.28.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
required_version = ">= 1.9.0"
|
required_version = ">= 1.4.5"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
variable "backup_policy_hour" {
|
|
||||||
# UTC Hour : 0, 4, 8, 12, 16, 20
|
|
||||||
default = "0"
|
|
||||||
type = string
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
variable "backup_policy_plan" {
|
|
||||||
# daily or weekly
|
|
||||||
default = "weekly"
|
|
||||||
type = string
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
variable "backup_policy_weekday" {
|
|
||||||
# SUN, MON, TUE, WED, THU, FRI, SAT
|
|
||||||
default = "SUN"
|
|
||||||
type = string
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
variable "image_name" {
|
variable "image_name" {
|
||||||
default = "fedora-38-x64"
|
default = "fedora-36-x64"
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user