Compare commits

...

6 Commits

Author SHA1 Message Date
jmrothst 502a17f145 Version bumps 2022-07-03 12:37:46 -05:00
jmrothst 5746be68e4 Version bumps 2022-06-15 22:50:21 -05:00
jmrothst 21bacbe714 Make variables variable, add watched_enabled 2022-06-05 15:18:07 -05:00
jmrothst 883538a97a Again remove rdns so we can work before migration... 2022-06-01 21:58:31 -05:00
jmrothst 490b2279b4 Don't wait 2022-06-01 21:48:08 -05:00
jmrothst ed8e4a55c4 Register hosts in Linode Managed DNS 2022-05-30 20:58:41 -05:00
10 changed files with 43 additions and 12 deletions
+3
View File
@@ -0,0 +1,3 @@
data "linode_domain" "this" {
domain = var.domain_name
}
-1
View File
@@ -1,4 +1,3 @@
output "instance" { output "instance" {
value = linode_instance.this value = linode_instance.this
} }
@@ -0,0 +1,6 @@
resource "linode_domain_record" "this_ipv4" {
domain_id = data.linode_domain.this.id
name = var.host_name
record_type = "A"
target = linode_instance.this.ip_address
}
@@ -0,0 +1,6 @@
resource "linode_domain_record" "this_ipv6" {
domain_id = data.linode_domain.this.id
name = var.host_name
record_type = "AAAA"
target = element(split("/", linode_instance.this.ipv6), 0)
}
+4 -3
View File
@@ -1,11 +1,12 @@
resource "linode_instance" "this" { resource "linode_instance" "this" {
authorized_keys = var.authorized_keys authorized_keys = var.authorized_keys
backups_enabled = true backups_enabled = var.backups_enabled
booted = true booted = var.booted
label = "${var.host_name}.${var.domain_name}" label = "${var.host_name}.${var.domain_name}"
image = var.image image = var.image
private_ip = true private_ip = var.private_ip
tags = var.tags tags = var.tags
type = var.type type = var.type
region = var.region region = var.region
watchdog_enabled = var.watchdog_enabled
} }
+2 -2
View File
@@ -2,8 +2,8 @@ terraform {
required_providers { required_providers {
linode = { linode = {
source = "linode/linode" source = "linode/linode"
version = ">= 1.27.2" version = ">= 1.28.0"
} }
} }
required_version = ">= 1.2.1" required_version = ">= 1.2.4"
} }
+4
View File
@@ -0,0 +1,4 @@
variable "backups_enabled" {
default = true
type = bool
}
+4
View File
@@ -0,0 +1,4 @@
variable "booted" {
default = true
type = bool
}
+4
View File
@@ -0,0 +1,4 @@
variable "private_ip" {
default = true
type = bool
}
+4
View File
@@ -0,0 +1,4 @@
variable "watchdog_enabled" {
default = true
type = bool
}