Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Sébastien Luttringer
infrastructure
Commits
5e72a207
Commit
5e72a207
authored
Aug 10, 2019
by
Sven-Hendrik Haase
Browse files
Add gitlab server and ignore image changes
parent
fc05ca09
Changes
1
Hide whitespace changes
Inline
Side-by-side
archlinux.tf
View file @
5e72a207
...
...
@@ -6,9 +6,10 @@ data "external" "hetzner_cloud_api_key" {
program
=
[
"
${
path
.
module}
/misc/get_key.py"
,
"misc/vault_hetzner.yml"
,
"hetzner_cloud_api_key"
,
"json"
]
}
# Find the id using `hcloud image list`
variable
"archlinux_image_id"
{
default
=
"2923545"
data
"hcloud_image"
"archlinux"
{
with_selector
=
"custom_image=archlinux"
most_recent
=
true
with_status
=
[
"available"
]
}
provider
"hcloud"
{
...
...
@@ -23,8 +24,11 @@ resource "hcloud_rdns" "quassel" {
resource
"hcloud_server"
"quassel"
{
name
=
"quassel.archlinux.org"
image
=
"
${
var
.
archlinux_image_
id
}
"
image
=
"
${
data
.
hcloud_image
.
archlinux
.
id
}
"
server_type
=
"cx11"
lifecycle
{
ignore_changes
=
[
image
]
}
}
resource
"hcloud_rdns"
"phrik"
{
...
...
@@ -35,8 +39,11 @@ resource "hcloud_rdns" "phrik" {
resource
"hcloud_server"
"phrik"
{
name
=
"phrik.archlinux.org"
image
=
"
${
var
.
archlinux_image_
id
}
"
image
=
"
${
data
.
hcloud_image
.
archlinux
.
id
}
"
server_type
=
"cx11"
lifecycle
{
ignore_changes
=
[
image
]
}
}
resource
"hcloud_rdns"
"bbs"
{
...
...
@@ -47,6 +54,24 @@ resource "hcloud_rdns" "bbs" {
resource
"hcloud_server"
"bbs"
{
name
=
"bbs.archlinux.org"
image
=
"
${
var
.
archlinux_image_
id
}
"
image
=
"
${
data
.
hcloud_image
.
archlinux
.
id
}
"
server_type
=
"cx21"
lifecycle
{
ignore_changes
=
[
image
]
}
}
resource
"hcloud_rdns"
"gitlab"
{
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
}
"
server_type
=
"cx21"
lifecycle
{
ignore_changes
=
[
image
]
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment