init
This commit is contained in:
29
newhetzner.tf
Normal file
29
newhetzner.tf
Normal file
@ -0,0 +1,29 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
hcloud = {
|
||||
source = "hetznercloud/hcloud"
|
||||
version = "1.31.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "hcloud_token" {}
|
||||
|
||||
provider "hcloud" {
|
||||
token = var.hcloud_token
|
||||
}
|
||||
|
||||
resource "hcloud_server" "web" {
|
||||
name = "terraform-test"
|
||||
image = "debian-10"
|
||||
server_type = "cx11"
|
||||
ssh_keys = [
|
||||
"lukewm@riseup.net"
|
||||
]
|
||||
user_data = file("user_data.yml")
|
||||
}
|
||||
|
||||
output "ipv4_addresses" {
|
||||
value = hcloud_server.web.ipv4_address
|
||||
description = "The ipv4 address of your new Hetzner Cloud VPS"
|
||||
}
|
Reference in New Issue
Block a user