first commit
This commit is contained in:
24
terraform/hcloud.tf
Normal file
24
terraform/hcloud.tf
Normal file
@@ -0,0 +1,24 @@
|
||||
provider "hcloud" {
|
||||
token = var.hcloud_token
|
||||
}
|
||||
|
||||
resource "hcloud_ssh_key" "default" {
|
||||
name = var.hcloud_ssh_key_name
|
||||
public_key = file(var.hcloud_ssh_key_file_path)
|
||||
}
|
||||
|
||||
resource "hcloud_server" "web" {
|
||||
name = var.hcloud_server_name
|
||||
image = var.hcloud_server_image
|
||||
server_type = var.hcloud_server_type
|
||||
ssh_keys = [hcloud_ssh_key.default.id]
|
||||
|
||||
}
|
||||
|
||||
resource "hcloud_volume" "storage" {
|
||||
name = var.hcloud_volume_name
|
||||
size = var.hcloud_volume_size
|
||||
server_id = hcloud_server.web.id
|
||||
automount = true
|
||||
format = "ext4"
|
||||
}
|
||||
Reference in New Issue
Block a user