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

Upgrade terraform config to 0.12

parent 0739ae79
terraform {
backend "pg" {}
backend "pg" {
}
}
data "external" "hetzner_cloud_api_key" {
......@@ -13,18 +14,18 @@ data "hcloud_image" "archlinux" {
}
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" {
server_id = "${hcloud_server.quassel.id}"
ip_address = "${hcloud_server.quassel.ipv4_address}"
server_id = hcloud_server.quassel.id
ip_address = hcloud_server.quassel.ipv4_address
dns_ptr = "quassel.archlinux.org"
}
resource "hcloud_server" "quassel" {
name = "quassel.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx11"
lifecycle {
ignore_changes = [image]
......@@ -32,14 +33,14 @@ resource "hcloud_server" "quassel" {
}
resource "hcloud_rdns" "phrik" {
server_id = "${hcloud_server.phrik.id}"
ip_address = "${hcloud_server.phrik.ipv4_address}"
server_id = hcloud_server.phrik.id
ip_address = hcloud_server.phrik.ipv4_address
dns_ptr = "phrik.archlinux.org"
}
resource "hcloud_server" "phrik" {
name = "phrik.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx11"
lifecycle {
ignore_changes = [image]
......@@ -47,14 +48,14 @@ resource "hcloud_server" "phrik" {
}
resource "hcloud_rdns" "bbs" {
server_id = "${hcloud_server.bbs.id}"
ip_address = "${hcloud_server.bbs.ipv4_address}"
server_id = hcloud_server.bbs.id
ip_address = hcloud_server.bbs.ipv4_address
dns_ptr = "bbs.archlinux.org"
}
resource "hcloud_server" "bbs" {
name = "bbs.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx21"
lifecycle {
ignore_changes = [image]
......@@ -62,14 +63,14 @@ resource "hcloud_server" "bbs" {
}
resource "hcloud_rdns" "gitlab" {
server_id = "${hcloud_server.gitlab.id}"
ip_address = "${hcloud_server.gitlab.ipv4_address}"
server_id = hcloud_server.gitlab.id
ip_address = hcloud_server.gitlab.ipv4_address
dns_ptr = "gitlab.archlinux.org"
}
resource "hcloud_server" "gitlab" {
name = "gitlab.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx21"
lifecycle {
ignore_changes = [image]
......@@ -77,14 +78,14 @@ resource "hcloud_server" "gitlab" {
}
resource "hcloud_rdns" "matrix" {
server_id = "${hcloud_server.matrix.id}"
ip_address = "${hcloud_server.matrix.ipv4_address}"
server_id = hcloud_server.matrix.id
ip_address = hcloud_server.matrix.ipv4_address
dns_ptr = "matrix.archlinux.org"
}
resource "hcloud_server" "matrix" {
name = "matrix.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx21"
lifecycle {
ignore_changes = [image]
......@@ -92,14 +93,14 @@ resource "hcloud_server" "matrix" {
}
resource "hcloud_rdns" "ciprototype" {
server_id = "${hcloud_server.ciprototype.id}"
ip_address = "${hcloud_server.ciprototype.ipv4_address}"
server_id = hcloud_server.ciprototype.id
ip_address = hcloud_server.ciprototype.ipv4_address
dns_ptr = "ciprototype.archlinux.org"
}
resource "hcloud_server" "ciprototype" {
name = "ciprototype.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx21"
lifecycle {
ignore_changes = [image]
......@@ -107,14 +108,14 @@ resource "hcloud_server" "ciprototype" {
}
resource "hcloud_rdns" "acccounts" {
server_id = "${hcloud_server.accounts.id}"
ip_address = "${hcloud_server.accounts.ipv4_address}"
server_id = hcloud_server.accounts.id
ip_address = hcloud_server.accounts.ipv4_address
dns_ptr = "accounts.archlinux.org"
}
resource "hcloud_server" "accounts" {
name = "accounts.archlinux.org"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx11"
lifecycle {
ignore_changes = [image]
......@@ -122,16 +123,17 @@ resource "hcloud_server" "accounts" {
}
resource "hcloud_rdns" "mirror" {
server_id = "${hcloud_server.mirror.id}"
ip_address = "${hcloud_server.mirror.ipv4_address}"
server_id = hcloud_server.mirror.id
ip_address = hcloud_server.mirror.ipv4_address
dns_ptr = "mirror.pkgbuild.com"
}
resource "hcloud_server" "mirror" {
name = "mirror.pkgbuild.com"
image = "${data.hcloud_image.archlinux.id}"
image = data.hcloud_image.archlinux.id
server_type = "cx11"
lifecycle {
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