Verified Commit baf50096 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Upgrade terraform config to 0.12

parent 0739ae79
terraform { terraform {
backend "pg" {} backend "pg" {
}
} }
data "external" "hetzner_cloud_api_key" { data "external" "hetzner_cloud_api_key" {
...@@ -8,23 +9,23 @@ data "external" "hetzner_cloud_api_key" { ...@@ -8,23 +9,23 @@ data "external" "hetzner_cloud_api_key" {
data "hcloud_image" "archlinux" { data "hcloud_image" "archlinux" {
with_selector = "custom_image=archlinux" with_selector = "custom_image=archlinux"
most_recent = true most_recent = true
with_status = ["available"] with_status = ["available"]
} }
provider "hcloud" { provider "hcloud" {
token = "${data.external.hetzner_cloud_api_key.result.hetzner_cloud_api_key}" token = data.external.hetzner_cloud_api_key.result.hetzner_cloud_api_key
} }
resource "hcloud_rdns" "quassel" { resource "hcloud_rdns" "quassel" {
server_id = "${hcloud_server.quassel.id}" server_id = hcloud_server.quassel.id
ip_address = "${hcloud_server.quassel.ipv4_address}" ip_address = hcloud_server.quassel.ipv4_address
dns_ptr = "quassel.archlinux.org" dns_ptr = "quassel.archlinux.org"
} }
resource "hcloud_server" "quassel" { resource "hcloud_server" "quassel" {
name = "quassel.archlinux.org" name = "quassel.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx11" server_type = "cx11"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -32,14 +33,14 @@ resource "hcloud_server" "quassel" { ...@@ -32,14 +33,14 @@ resource "hcloud_server" "quassel" {
} }
resource "hcloud_rdns" "phrik" { resource "hcloud_rdns" "phrik" {
server_id = "${hcloud_server.phrik.id}" server_id = hcloud_server.phrik.id
ip_address = "${hcloud_server.phrik.ipv4_address}" ip_address = hcloud_server.phrik.ipv4_address
dns_ptr = "phrik.archlinux.org" dns_ptr = "phrik.archlinux.org"
} }
resource "hcloud_server" "phrik" { resource "hcloud_server" "phrik" {
name = "phrik.archlinux.org" name = "phrik.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx11" server_type = "cx11"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -47,14 +48,14 @@ resource "hcloud_server" "phrik" { ...@@ -47,14 +48,14 @@ resource "hcloud_server" "phrik" {
} }
resource "hcloud_rdns" "bbs" { resource "hcloud_rdns" "bbs" {
server_id = "${hcloud_server.bbs.id}" server_id = hcloud_server.bbs.id
ip_address = "${hcloud_server.bbs.ipv4_address}" ip_address = hcloud_server.bbs.ipv4_address
dns_ptr = "bbs.archlinux.org" dns_ptr = "bbs.archlinux.org"
} }
resource "hcloud_server" "bbs" { resource "hcloud_server" "bbs" {
name = "bbs.archlinux.org" name = "bbs.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx21" server_type = "cx21"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -62,14 +63,14 @@ resource "hcloud_server" "bbs" { ...@@ -62,14 +63,14 @@ resource "hcloud_server" "bbs" {
} }
resource "hcloud_rdns" "gitlab" { resource "hcloud_rdns" "gitlab" {
server_id = "${hcloud_server.gitlab.id}" server_id = hcloud_server.gitlab.id
ip_address = "${hcloud_server.gitlab.ipv4_address}" ip_address = hcloud_server.gitlab.ipv4_address
dns_ptr = "gitlab.archlinux.org" dns_ptr = "gitlab.archlinux.org"
} }
resource "hcloud_server" "gitlab" { resource "hcloud_server" "gitlab" {
name = "gitlab.archlinux.org" name = "gitlab.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx21" server_type = "cx21"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -77,14 +78,14 @@ resource "hcloud_server" "gitlab" { ...@@ -77,14 +78,14 @@ resource "hcloud_server" "gitlab" {
} }
resource "hcloud_rdns" "matrix" { resource "hcloud_rdns" "matrix" {
server_id = "${hcloud_server.matrix.id}" server_id = hcloud_server.matrix.id
ip_address = "${hcloud_server.matrix.ipv4_address}" ip_address = hcloud_server.matrix.ipv4_address
dns_ptr = "matrix.archlinux.org" dns_ptr = "matrix.archlinux.org"
} }
resource "hcloud_server" "matrix" { resource "hcloud_server" "matrix" {
name = "matrix.archlinux.org" name = "matrix.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx21" server_type = "cx21"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -92,14 +93,14 @@ resource "hcloud_server" "matrix" { ...@@ -92,14 +93,14 @@ resource "hcloud_server" "matrix" {
} }
resource "hcloud_rdns" "ciprototype" { resource "hcloud_rdns" "ciprototype" {
server_id = "${hcloud_server.ciprototype.id}" server_id = hcloud_server.ciprototype.id
ip_address = "${hcloud_server.ciprototype.ipv4_address}" ip_address = hcloud_server.ciprototype.ipv4_address
dns_ptr = "ciprototype.archlinux.org" dns_ptr = "ciprototype.archlinux.org"
} }
resource "hcloud_server" "ciprototype" { resource "hcloud_server" "ciprototype" {
name = "ciprototype.archlinux.org" name = "ciprototype.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx21" server_type = "cx21"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -107,14 +108,14 @@ resource "hcloud_server" "ciprototype" { ...@@ -107,14 +108,14 @@ resource "hcloud_server" "ciprototype" {
} }
resource "hcloud_rdns" "acccounts" { resource "hcloud_rdns" "acccounts" {
server_id = "${hcloud_server.accounts.id}" server_id = hcloud_server.accounts.id
ip_address = "${hcloud_server.accounts.ipv4_address}" ip_address = hcloud_server.accounts.ipv4_address
dns_ptr = "accounts.archlinux.org" dns_ptr = "accounts.archlinux.org"
} }
resource "hcloud_server" "accounts" { resource "hcloud_server" "accounts" {
name = "accounts.archlinux.org" name = "accounts.archlinux.org"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx11" server_type = "cx11"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
...@@ -122,16 +123,17 @@ resource "hcloud_server" "accounts" { ...@@ -122,16 +123,17 @@ resource "hcloud_server" "accounts" {
} }
resource "hcloud_rdns" "mirror" { resource "hcloud_rdns" "mirror" {
server_id = "${hcloud_server.mirror.id}" server_id = hcloud_server.mirror.id
ip_address = "${hcloud_server.mirror.ipv4_address}" ip_address = hcloud_server.mirror.ipv4_address
dns_ptr = "mirror.pkgbuild.com" dns_ptr = "mirror.pkgbuild.com"
} }
resource "hcloud_server" "mirror" { resource "hcloud_server" "mirror" {
name = "mirror.pkgbuild.com" name = "mirror.pkgbuild.com"
image = "${data.hcloud_image.archlinux.id}" image = data.hcloud_image.archlinux.id
server_type = "cx11" server_type = "cx11"
lifecycle { lifecycle {
ignore_changes = [image] ignore_changes = [image]
} }
} }
terraform {
required_version = ">= 0.12"
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment