Commit 40090ebe authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Add basic terraform config

parent d5cc2fa7
......@@ -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.
##### 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/ terraform
This will show you planned changes between the current infrastructure and the desired infrastructure.
You can then run
terraform apply -var $(./packer/ terraform
to actually apply your changes.
##### 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.
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 = "${}"
resource "hcloud_rdns" "bbs" {
floating_ip_id = "${}"
ip_address = "${hcloud_floating_ip.bbs.ip_address}"
dns_ptr = ""
resource "hcloud_server" "bbs" {
name = ""
image = "${var.archlinux_image_id}"
server_type = "cx11"
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