From bccf99a144ba489f9c9084d748234a3ed0df3416 Mon Sep 17 00:00:00 2001 From: Ueli Bosshard Date: Sat, 15 Nov 2025 22:13:52 +0100 Subject: [PATCH] initial commit --- README.md | 11 +++++++++++ main.tf | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 README.md create mode 100644 main.tf diff --git a/README.md b/README.md new file mode 100644 index 0000000..033fe4c --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +Terraform Example + +- https://registry.terraform.io/providers/cloudscale-ch/cloudscale/latest/docs +- https://opentofu.org + + brew install opentofu + export CLOUDSCALE_API_TOKEN='' + tofu init + tofu plan + tofu apply + diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..21a9f8f --- /dev/null +++ b/main.tf @@ -0,0 +1,21 @@ +terraform { + required_providers { + cloudscale = { + source = "cloudscale-ch/cloudscale" + } + } +} + +# Create a new server +resource "cloudscale_server" "ubo1" { + name = "ubo1" + flavor_slug = "flex-4-1" + image_slug = "debian-12" + volume_size_gb = 10 + ssh_keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJl6TPTdcIoONUYBYFF7T96JJ1SNq9VeFOzR7LUNoFHJ ueli@Air-von-Ueli"] + + timeouts { + create = "10m" + update = "1h" + } +}