Compare commits
2 Commits
2022-05-30
...
2022-05-30
Author | SHA1 | Date | |
---|---|---|---|
ed8e4a55c4 | |||
3e74388f97 |
3
data.linode_domain.this.tf
Normal file
3
data.linode_domain.this.tf
Normal file
@@ -0,0 +1,3 @@
|
||||
data "linode_domain" "this" {
|
||||
domain = var.domain_name
|
||||
}
|
@@ -1,4 +1,3 @@
|
||||
output "instance" {
|
||||
value = linode_instance.this
|
||||
}
|
||||
|
||||
|
6
resource.linode_domain_record.this_ipv4.tf
Normal file
6
resource.linode_domain_record.this_ipv4.tf
Normal file
@@ -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
|
||||
}
|
6
resource.linode_domain_record.this_ipv6.tf
Normal file
6
resource.linode_domain_record.this_ipv6.tf
Normal file
@@ -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)
|
||||
}
|
8
resource.linode_rdns.this_ipv4.tf
Normal file
8
resource.linode_rdns.this_ipv4.tf
Normal file
@@ -0,0 +1,8 @@
|
||||
resource "linode_rdns" "this_ipv4" {
|
||||
address = linode_instance.this.ip_address
|
||||
depends_on = [
|
||||
linode_domain_record.this_ipv4,
|
||||
]
|
||||
rdns = "${var.host_name}.${var.domain_name}"
|
||||
wait_for_available = true
|
||||
}
|
8
resource.linode_rdns.this_ipv6.tf
Normal file
8
resource.linode_rdns.this_ipv6.tf
Normal file
@@ -0,0 +1,8 @@
|
||||
resource "linode_rdns" "this_ipv6" {
|
||||
address = element(split("/", linode_instance.this.ipv6), 0)
|
||||
depends_on = [
|
||||
linode_domain_record.this_ipv6,
|
||||
]
|
||||
rdns = "${var.host_name}.${var.domain_name}"
|
||||
wait_for_available = true
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
variable "image" {
|
||||
default = "linode/fedora35"
|
||||
default = "linode/fedora36"
|
||||
type = string
|
||||
}
|
||||
|
Reference in New Issue
Block a user