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
40090ebe
Commit
40090ebe
authored
Feb 14, 2019
by
Sven-Hendrik Haase
Browse files
Add basic terraform config
parent
d5cc2fa7
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
40090ebe
*.pyc
*.pyc
*.retry
*.retry
*.terraform
*.tfstate*
/borg-keys/
/borg-keys/
README.md
View file @
40090ebe
...
@@ -33,6 +33,20 @@ In order to use this, you need to install packer and then run
...
@@ -33,6 +33,20 @@ In order to use this, you need to install packer and then run
This will take some time after which a new snapshot will have been created on the primary hcloud archlinux project.
This will take some time after which a new snapshot will have been created on the primary hcloud archlinux project.
##### Note about terraform
We use terraform to provision a part of the infrastructure on hcloud.
In order to use this, you need to install terraform and then run
terraform plan -var $(./packer/get_hetzner_cloud_api_key.sh) terraform
This will show you planned changes between the current infrastructure and the desired infrastructure.
You can then run
terraform apply -var $(./packer/get_hetzner_cloud_api_key.sh) terraform
to actually apply your changes.
##### Note about opendkim
##### Note about opendkim
The opendkim DNS data has to be added to DNS manually. The roles verifies that the DNS is correct before starting opendkim.
The opendkim DNS data has to be added to DNS manually. The roles verifies that the DNS is correct before starting opendkim.
...
...
terraform/archlinux.tf
0 → 100644
View file @
40090ebe
variable
"hetzner_cloud_api_key"
{}
# Find the id using `hcloud image list`
variable
"archlinux_image_id"
{
default
=
"2923545"
}
provider
"hcloud"
{
token
=
"
${
var
.
hetzner_cloud_api_key
}
"
}
resource
"hcloud_floating_ip"
"bbs"
{
type
=
"ipv4"
server_id
=
"
${
hcloud_server
.
bbs
.
id
}
"
}
resource
"hcloud_rdns"
"bbs"
{
floating_ip_id
=
"
${
hcloud_floating_ip
.
bbs
.
id
}
"
ip_address
=
"
${
hcloud_floating_ip
.
bbs
.
ip_address
}
"
dns_ptr
=
"bbs.archlinux.org"
}
resource
"hcloud_server"
"bbs"
{
name
=
"bbs.archlinux.org"
image
=
"
${
var
.
archlinux_image_id
}
"
server_type
=
"cx11"
}
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