Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Commit 9721f8c

Browse files
committed
first real commit
1 parent 2d2bd58 commit 9721f8c

9 files changed

+83
-0
lines changed

Diff for: .terraform.lock.hcl

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: init.tf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
provider "hcloud" {
2+
token = var.HCLOUD_TOKEN
3+
}

Diff for: network.tf

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resource "hcloud_network" "default" {
2+
name = "default"
3+
ip_range = "10.0.0.0/16"
4+
}
5+
6+
resource "hcloud_network_subnet" "default-subnet" {
7+
type = "cloud"
8+
network_id = hcloud_network.default.id
9+
network_zone = "eu-central"
10+
ip_range = "10.0.1.0/24"
11+
}
12+

Diff for: outputs.tf

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Diff for: qweebos.tf

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
resource "hcloud_server" "qweebos" {
2+
name = "qweebos.com"
3+
server_type = "cx11"
4+
image = "debian-11"
5+
location = "fsn1"
6+
ssh_keys = var.SSH_KEYS
7+
8+
network {
9+
network_id = hcloud_network.default.id
10+
ip = "10.0.1.5"
11+
}
12+
13+
depends_on = [
14+
hcloud_network_subnet.default-subnet
15+
]
16+
}

Diff for: ssh.tf

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "hcloud_ssh_key" "keys" {
2+
for_each = toset(var.SSH_KEYS)
3+
4+
name = each.key
5+
public_key = file("ssh_keys/${each.key}")
6+
}

Diff for: ssh_keys/[email protected]

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINkJCMDYcanD6gzC0GpK3VWlSHvuAygkFjhbFChWb9c/ [email protected]

Diff for: variables.tf

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
variable "HCLOUD_TOKEN" {
2+
type = string
3+
sensitive = true
4+
description = "Hetzner Cloud Access Token"
5+
}
6+
7+
variable "SSH_KEYS" {
8+
type = list(string)
9+
default = ["[email protected]"]
10+
description = "List of authorized SSH keys"
11+
}

Diff for: versions.tf

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
terraform {
2+
required_providers {
3+
hcloud = {
4+
source = "hetznercloud/hcloud"
5+
version = "1.32.2"
6+
}
7+
}
8+
required_version = ">= 0.14"
9+
}

0 commit comments

Comments
 (0)