commit
bccf99a144
@ -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
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue