Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
2d192b6c
Commit
2d192b6c
authored
Mar 31, 2019
by
Sven-Hendrik Haase
Browse files
Move terraform script to root to have terraform find it automatically
parent
d92315e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
terraform/
archlinux.tf
→
archlinux.tf
View file @
2d192b6c
...
...
@@ -2,7 +2,9 @@ terraform {
backend
"pg"
{}
}
variable
"hetzner_cloud_api_key"
{}
data
"external"
"hetzner_cloud_api_key"
{
program
=
[
"bash"
,
"
${
path
.
module}
/misc/get_hetzner_cloud_api_key_terraform.sh"
]
}
# Find the id using `hcloud image list`
variable
"archlinux_image_id"
{
...
...
@@ -10,17 +12,12 @@ variable "archlinux_image_id" {
}
provider
"hcloud"
{
token
=
"
${
var
.
hetzner_cloud_api_key
}
"
}
resource
"hcloud_floating_ip"
"bbs"
{
type
=
"ipv4"
server_id
=
"
${
hcloud_server
.
bbs
.
id
}
"
token
=
"
${data
.
external
.
hetzner_cloud_api_key
.
result
.
hetzner_cloud_api_key
}
"
}
resource
"hcloud_rdns"
"bbs"
{
floating_ip
_id
=
"
${
hcloud_
floating_ip
.
bbs
.
id
}
"
ip_address
=
"
${
hcloud_
floating_ip
.
bbs
.
ip_address
}
"
server
_id
=
"
${
hcloud_
server
.
bbs
.
id
}
"
ip_address
=
"
${
hcloud_
server
.
bbs
.
ip
v4
_address
}
"
dns_ptr
=
"bbs.archlinux.org"
}
...
...
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