{"id":16366363,"url":"https://github.com/centminmod/upcloud-terraform","last_synced_at":"2026-02-17T06:30:17.442Z","repository":{"id":80280150,"uuid":"536551759","full_name":"centminmod/upcloud-terraform","owner":"centminmod","description":"Upcloud Terraform Server creation with upctl cli command line tool set","archived":false,"fork":false,"pushed_at":"2022-10-26T08:52:28.000Z","size":171,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T01:28:53.435Z","etag":null,"topics":["terraform","upcloud","upcloud-terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centminmod.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-14T11:44:18.000Z","updated_at":"2023-02-28T15:18:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8fc475f-6052-4d81-8132-3b5e73236242","html_url":"https://github.com/centminmod/upcloud-terraform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fupcloud-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fupcloud-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fupcloud-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fupcloud-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centminmod","download_url":"https://codeload.github.com/centminmod/upcloud-terraform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239827753,"owners_count":19703745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["terraform","upcloud","upcloud-terraform"],"created_at":"2024-10-11T02:46:11.423Z","updated_at":"2026-02-17T06:30:17.345Z","avatar_url":"https://github.com/centminmod.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Upcloud Terraform Based Server Installation\n\nTerraform based server install at Upcloud using guide outlined at https://upcloud.com/resources/tutorials/get-started-terraform \u0026 https://www.terraform.io/downloads. If you like this guide and want to try out Upcloud, use my referral link [here](https://centminmod.com/upcloud/).\n\n* [Install Terraform](#install-terraform)\n* [Setup Upcloud API Credentials](#setup-upcloud-api-credentials)\n* [Initialize New Terraform Project](#initialize-new-terraform-project)\n* [Planning Infrastructure With Terraform](#planning-infrastructure-with-terraform)\n  * [Variable Template Method](#variable-template-method)\n  * [Specific Terraform definition files](#specific-terraform-definition-files)\n  * [Defining Output Variables](#defining-output-variables)\n  * [Viewing User Data Progress](#viewing-user-data-progress)\n* [Using upctl Command Line Tool](#using-upctl-command-line-tool)\n* [Deleting Terraform Created Server](#deleting-terraform-created-server)\n* [Upcloud Region List](#upcloud-region-list)\n* [Upcloud Plan List](#upcloud-plan-list)\n* [OS Template Storage UUID](#os-template-storage-uuid)\n\n# Install Terraform \u0026 upctl\n\n* https://upcloud.com/resources/tutorials/get-started-upcloud-command-line-interface\n\n```\nyum install -y yum-utils\nyum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo\nyum -y install terraform\n```\n```\nterraform -v\nTerraform v1.2.9\non linux_amd64\n```\n\nDownload upctl command line tool from https://github.com/UpCloudLtd/upcloud-cli/releases\n\n```\nupctl_version=2.1.0\ncurl -L -o upcloud-cli.tar.gz https://github.com/UpCloudLtd/upcloud-cli/releases/download/v${upctl_version}/upcloud-cli_${upctl_version}_linux_x86_64.tar.gz\ntar -C /usr/local/bin -xf upcloud-cli.tar.gz\nwget https://github.com/centminmod/upcloud-terraform/raw/master/upctl/bash_completion.d/upctl -O /etc/bash_completion.d/upctl\nsource /etc/bash_completion.d/upctl\n```\n\n# Setup Upcloud API Credentials\n\nCreate a new API Access key as outlined at https://upcloud.com/community/tutorials/%20/getting-started-upcloud-api/ and replace the `UPCLOUD_USERNAME` and `UPCLOUD_PASSWORD` variable values `username` and `password` with your Upcloud API credentials and run the below commands to populate `~/.bashrc`. Then apply the new additions.\n\n```\necho 'export UPCLOUD_USERNAME=username' | tee -a ~/.bashrc\necho 'export UPCLOUD_PASSWORD=password' | tee -a ~/.bashrc\nsource ~/.bashrc\n```\n\nThis will work for both Terraform and upctl command line tool.\n\n# Initialize New Terraform Project\n\nCreate a new directory for your Terraform project and change into it.\n\n```\nmkdir -p /home/terraform/base\ncd /home/terraform/base\n```\n\nDeploying Cloud Servers on UpCloud using Terraform works using the [verified provider module](https://registry.terraform.io/providers/UpCloudLtd/upcloud/latest).\n\nCreate `/home/terraform/base/version.tf`\n\n```\ntouch version.tf\n```\n\nPlace in `/home/terraform/base/version.tf`\n\n```\nterraform {\n  required_providers {\n    upcloud = {\n      source = \"UpCloudLtd/upcloud\"\n    }\n  }\n}\n\nprovider \"upcloud\" {\n  # Your UpCloud credentials are read from the environment variables\n  # export UPCLOUD_USERNAME=\"Username for Upcloud API user\"\n  # export UPCLOUD_PASSWORD=\"Password for Upcloud API user\"\n  # Optional configuration settings can be depclared here\n}\n```\n\n```\nterraform init\n```\n\nThe initialisation process creates a directory for the plugins in your Terraform folder under `.terraform/providers` and installs the UpCloud provider module. The Terraform installation for UpCloud is then all set.\n\n```\nls -lah .terraform/providers/registry.terraform.io/upcloudltd/upcloud/2.5.0/linux_amd64/\ntotal 17M\ndrwxr-xr-x 2 root root 4.0K Sep 14 09:07 .\ndrwxr-xr-x 3 root root 4.0K Sep 14 09:07 ..\n-rw-rw-rw- 1 root root 9.0K Sep 14 09:07 CHANGELOG.md\n-rw-rw-rw- 1 root root 1.1K Sep 14 09:07 LICENSE\n-rw-rw-rw- 1 root root  607 Sep 14 09:07 README.md\n-rwxr-xr-x 1 root root  17M Sep 14 09:07 terraform-provider-upcloud_v2.5.0\n```\n\n# Planning Infrastructure With Terraform\n\n\nUsing values from https://developers.upcloud.com/1.3/ and https://upcloud.com/resources/tutorials/reduce-downtime-terraform-redeployments. Later you can create variables outlined at https://upcloud.com/resources/tutorials/terraform-variables.\n\nCreate `server1.tf`\n\n```\ntouch server1.tf\n```\n\nUsing:\n\n* zone = `us-nyc1` [list of regions](#region-list)\n* plan = `4xCPU-8GB` [list of plans](#plan-list)\n* storage template [list of OS storage templete UUIDs](#os-template-storage-uuid)\n  * for CentOS 7 UUID = `01000000-0000-4000-8000-000050010300` with size = `160GB`\n  * for AlmaLinux 8 UUID = `01000000-0000-4000-8000-000140010100` with size = `160GB`\n  * for Rocky Linux 8 UUID = `01000000-0000-4000-8000-000150010100` with size = `160GB`\n  * for AlmaLinux 9 UUID = `01000000-0000-4000-8000-000140020100` with size = `160GB`\n  * for Rocky Linux 9 UUID = `01000000-0000-4000-8000-000150020100` with size = `160GB`\n\n* save your desired SSH public key into `~/.ssh/rsa_public_key` and corresponding SSH private key into `~/.ssh/rsa_private_key`\n* The user data scripted section is configured the way it is as in that environment the `$HOME` variable for root user ends up as `/` while in a normal SSH terminal session `$HOME` is `/root`. This difference seems to break any scripting which relies of `$HOME` variables. The `RANDFILE` is for `openssl` binary operations to work properly if you use scripts which run `openssl` binary.\n* Change the default `remote-exec` script path from running at `/tmp` in case server has noexec set on `/tmp`. So set in `connection` block `script_path = \"/home/tftmp/terraform_%RAND%.sh\"`(https://www.terraform.io/language/resources/provisioners/connection)\n\n**Notes:** \n\n1. looks like for AlmaLinux 9 and Rocky Linux 9, they are using `cloud-init` templates and need to have Upcloud's Metadata enabled otherwise, you'd get an error like:\n\n```\n╷\n│ Error: Metadata must be enabled when cloning a cloud-init template (METADATA_DISABLED_ON_CLOUD-INIT)\n│ \n│   with upcloud_server.server1,\n│   on server1.tf line 1, in resource \"upcloud_server\" \"server1\":\n│    1: resource \"upcloud_server\" \"server1\" {\n│ \n╵\n```\n\n2. EL9 OSes have SELinux enabled by default and you'd want to disable that before installing Centmin Mod. Centmin Mod can't automatically disable SELinux in EL9 like it can in EL7/EL8 OSes. \n\n```\ngrep '^SELINUX=' /etc/selinux/config\nSELINUX=enforcing\n```\n\nContents of `server1.tf`\n\n```\nresource \"upcloud_server\" \"server1\" {\n  # System hostname\n  hostname = \"terraform.example.com\"\n\n  # Availability zone\n  zone = \"us-nyc1\"\n\n  # Number of CPUs and memory in GB\n  plan = \"4xCPU-8GB\"\n\n  metadata = true\n\n  template {\n    # System storage device size\n    size = 160\n\n    # Template UUID for CentOS 7\n    storage = \"01000000-0000-4000-8000-000050010300\"\n  }\n\n  # Network interfaces\n  network_interface {\n    type = \"public\"\n  }\n\n  network_interface {\n    type = \"utility\"\n  }\n\n  # Include at least one public SSH key\n  login {\n    user = \"root\"\n    keys = [\n      file(\"~/.ssh/rsa_public_key\")\n    ]\n    create_password = false\n    password_delivery = \"email\"\n  }\n\n  # Configuring connection details\n  connection {\n    # The server public IP address\n    host        = self.network_interface[0].ip_address\n    type        = \"ssh\"\n    user        = \"root\"\n    private_key = file(\"~/.ssh/rsa_private_key\")\n    script_path = \"/home/terraform_%RAND%.sh\"\n  }\n\n  # Remotely executing a command on the server\n  provisioner \"remote-exec\" {\n    inline = [\n      \"echo 'Hello world!'\"\n    ]\n  }\n\n  user_data = \u003c\u003c-EOF\n  export TERM=xterm-256color\n  mkdir -p /root\n  export HOME=/root\n  echo $HOME\n  touch $HOME/.rnd\n  export RANDFILE=$HOME/.rnd\n  chmod 600 $HOME/.rnd\n  env\n  yum -y update\n  EOF\n\n # Remotely executing a command on the server\n  provisioner \"remote-exec\" {\n    inline = [\n        \"echo\",\n        \"lscpu\",\n        \"echo\",\n        \"free -mlt\",\n        \"echo\",\n        \"df -hT\",\n        \"echo\",\n        \"cat /etc/redhat-release\"\n    ]\n  }\n}\n```\n\nYou can optionally enable backups by adding to `template{}` block\n\n```\n  backup_rule {\n    interval  = \"daily\"\n    time      = \"0100\"\n    retention = 8\n  }\n```\n\n```\nterraform apply\n\nTerraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:\n  + create\n\nTerraform will perform the following actions:\n\n  # upcloud_server.server1 will be created\n  + resource \"upcloud_server\" \"server1\" {\n      + cpu       = (known after apply)\n      + hostname  = \"terraform.example.com\"\n      + id        = (known after apply)\n      + mem       = (known after apply)\n      + plan      = \"4xCPU-8GB\"\n      + user_data = \u003c\u003c-EOT\n              export TERM=xterm-256color\n              mkdir -p /home/tftmp\n              sleep 5\n              chmod 1777 /home/tftmp\n              mkdir -p /root\n              export HOME=/root\n              echo $HOME\n              touch $HOME/.rnd\n              export RANDFILE=$HOME/.rnd\n              chmod 600 $HOME/.rnd\n              env\n              yum -y update\n\n          \n        EOT\n      + zone      = \"us-nyc1\"\n\n      + login {\n          + create_password   = false\n          + keys              = [\n              + \"ssh-rsa XYZABC\",\n            ]\n          + password_delivery = \"email\"\n          + user              = \"root\"\n        }\n\n      + network_interface {\n          + bootable            = false\n          + ip_address          = (known after apply)\n          + ip_address_family   = \"IPv4\"\n          + ip_address_floating = (known after apply)\n          + mac_address         = (known after apply)\n          + network             = (known after apply)\n          + source_ip_filtering = true\n          + type                = \"public\"\n        }\n      + network_interface {\n          + bootable            = false\n          + ip_address          = (known after apply)\n          + ip_address_family   = \"IPv4\"\n          + ip_address_floating = (known after apply)\n          + mac_address         = (known after apply)\n          + network             = (known after apply)\n          + source_ip_filtering = true\n          + type                = \"utility\"\n        }\n\n      + template {\n          + address                  = (known after apply)\n          + delete_autoresize_backup = false\n          + filesystem_autoresize    = false\n          + id                       = (known after apply)\n          + size                     = 160\n          + storage                  = \"01000000-0000-4000-8000-000050010300\"\n          + tier                     = (known after apply)\n          + title                    = (known after apply)\n        }\n    }\n\nPlan: 1 to add, 0 to change, 0 to destroy.\n\nDo you want to perform these actions?\n  Terraform will perform the actions described above.\n  Only 'yes' will be accepted to approve.\n\n  Enter a value: yes\n\nupcloud_server.server1: Creating...\nupcloud_server.server1: Still creating... [10s elapsed]\nupcloud_server.server1: Still creating... [20s elapsed]\nupcloud_server.server1: Still creating... [30s elapsed]\nupcloud_server.server1: Provisioning with 'remote-exec'...\nupcloud_server.server1 (remote-exec): Connecting to remote host via SSH...\nupcloud_server.server1 (remote-exec):   Host: 209.xxx.xxx.xxx\nupcloud_server.server1 (remote-exec):   User: root\nupcloud_server.server1 (remote-exec):   Password: false\nupcloud_server.server1 (remote-exec):   Private key: true\nupcloud_server.server1 (remote-exec):   Certificate: false\nupcloud_server.server1 (remote-exec):   SSH Agent: true\nupcloud_server.server1 (remote-exec):   Checking Host Key: false\nupcloud_server.server1 (remote-exec):   Target Platform: unix\nupcloud_server.server1: Still creating... [40s elapsed]\nupcloud_server.server1: Still creating... [50s elapsed]\nupcloud_server.server1 (remote-exec): Connecting to remote host via SSH...\nupcloud_server.server1 (remote-exec):   Host: 209.xxx.xxx.xxx\nupcloud_server.server1 (remote-exec):   User: root\nupcloud_server.server1 (remote-exec):   Password: false\nupcloud_server.server1 (remote-exec):   Private key: true\nupcloud_server.server1 (remote-exec):   Certificate: false\nupcloud_server.server1 (remote-exec):   SSH Agent: true\nupcloud_server.server1 (remote-exec):   Checking Host Key: false\nupcloud_server.server1 (remote-exec):   Target Platform: unix\nupcloud_server.server1 (remote-exec): Connected!\n\nupcloud_server.server1 (remote-exec): Architecture:          x86_64\nupcloud_server.server1 (remote-exec): CPU op-mode(s):        32-bit, 64-bit\nupcloud_server.server1 (remote-exec): Byte Order:            Little Endian\nupcloud_server.server1 (remote-exec): CPU(s):                4\nupcloud_server.server1 (remote-exec): On-line CPU(s) list:   0-3\nupcloud_server.server1 (remote-exec): Thread(s) per core:    1\nupcloud_server.server1 (remote-exec): Core(s) per socket:    1\nupcloud_server.server1 (remote-exec): Socket(s):             4\nupcloud_server.server1 (remote-exec): NUMA node(s):          1\nupcloud_server.server1 (remote-exec): Vendor ID:             AuthenticAMD\nupcloud_server.server1 (remote-exec): CPU family:            23\nupcloud_server.server1 (remote-exec): Model:                 49\nupcloud_server.server1 (remote-exec): Model name:            AMD EPYC 7542 32-Core Processor\nupcloud_server.server1 (remote-exec): Stepping:              0\nupcloud_server.server1 (remote-exec): CPU MHz:               2894.558\nupcloud_server.server1 (remote-exec): BogoMIPS:              5789.11\nupcloud_server.server1 (remote-exec): Hypervisor vendor:     KVM\nupcloud_server.server1 (remote-exec): Virtualization type:   full\nupcloud_server.server1 (remote-exec): L1d cache:             64K\nupcloud_server.server1 (remote-exec): L1i cache:             64K\nupcloud_server.server1 (remote-exec): L2 cache:              512K\nupcloud_server.server1 (remote-exec): L3 cache:              16384K\nupcloud_server.server1 (remote-exec): NUMA node0 CPU(s):     0-3\nupcloud_server.server1 (remote-exec): Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm art rep_good nopl extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core retpoline_amd ssbd ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat umip spec_ctrl intel_stibp arch_capabilities\n\nupcloud_server.server1 (remote-exec):               total        used        free      shared  buff/cache   available\nupcloud_server.server1 (remote-exec): Mem:           7802         339        7030          17         432        7215\nupcloud_server.server1 (remote-exec): Low:           7802         772        7030\nupcloud_server.server1 (remote-exec): High:             0           0           0\nupcloud_server.server1 (remote-exec): Swap:             0           0           0\nupcloud_server.server1 (remote-exec): Total:         7802         339        7030\n\nupcloud_server.server1 (remote-exec): Filesystem     Type      Size  Used Avail Use% Mounted on\nupcloud_server.server1 (remote-exec): devtmpfs       devtmpfs  3.8G     0  3.8G   0% /dev\nupcloud_server.server1 (remote-exec): tmpfs          tmpfs     3.9G     0  3.9G   0% /dev/shm\nupcloud_server.server1 (remote-exec): tmpfs          tmpfs     3.9G   18M  3.8G   1% /run\nupcloud_server.server1 (remote-exec): tmpfs          tmpfs     3.9G     0  3.9G   0% /sys/fs/cgroup\nupcloud_server.server1 (remote-exec): /dev/vda1      xfs       160G  1.6G  159G   1% /\nupcloud_server.server1 (remote-exec): tmpfs          tmpfs     781M     0  781M   0% /run/user/0\n\nupcloud_server.server1 (remote-exec): CentOS Linux release 7.9.2009 (Core)\nupcloud_server.server1: Creation complete after 52s [id=0006f04a-15e3-4f4d-83xxx-7cc592935xxx]\n\nApply complete! Resources: 1 added, 0 changed, 0 destroyed.\n```\n\n## Variable Template Method\n\nInstead of hardcoding `server1.tf` settings, you can use variables outlined at https://upcloud.com/resources/tutorials/terraform-variables via a dedicated `variables.tf` file. Updated with new [Upcloud High CPU and High MEM plans](https://upcloud.com/pricing-2023).\n\nThe `variables.tf` file\n\n```\nvariable \"hostname\" {\n  description = \"Server hostname\"\n  default     = \"terraform.example.com\"\n  type        = string\n}\n\nvariable \"private_key_path\" {\n  type = string\n  default = \"~/.ssh/rsa_private_key\"\n}\n\nvariable \"public_key_path\" {\n  type = string\n  default = \"~/.ssh/rsa_public_key\"\n  sensitive = true\n}\n\nvariable \"zones\" {\n  type = map\n  default = {\n    \"amsterdam\" = \"nl-ams1\"\n    \"london\"    = \"uk-lon1\"\n    \"frankfurt\" = \"de-fra1\"\n    \"helsinki1\" = \"fi-hel1\"\n    \"helsinki2\" = \"fi-hel2\"\n    \"chicago\"   = \"us-chi1\"\n    \"sanjose\"   = \"us-sjo1\"\n    \"singapore\" = \"sg-sin1\"\n    \"sydney\"    = \"au-syd1\"\n    \"warsaw\"    = \"pl-waw1\"\n    \"madrid\"    = \"es-mad1\"\n    \"newyork\"   = \"us-nyc1\"\n  }\n}\n\nvariable \"plans\" {\n  type = map\n  default = {\n    \"5USD\"     = \"1xCPU-1GB\"\n    \"10USD\"    = \"1xCPU-2GB\"\n    \"20USD\"    = \"2xCPU-4GB\"\n    \"40USD\"    = \"4xCPU-8GB\"\n    \"80USD\"    = \"6xCPU-16GB\"\n    \"160USD\"   = \"8xCPU-32GB\"\n    \"240USD\"   = \"12xCPU-48GB\"\n    \"320USD\"   = \"16xCPU-64GB\"\n    \"490USD\"   = \"20xCPU-96GB\"\n    \"640USD\"   = \"20xCPU-128GB\"\n    \"40USDM\"   = \"HIMEM-2xCPU-8GB\"\n    \"65USDM\"   = \"HIMEM-2xCPU-16GB\"\n    \"132USDM\"  = \"HIMEM-4xCPU-32GB\"\n    \"240USDM\"  = \"HIMEM-4xCPU-64GB\"\n    \"480USDM\"  = \"HIMEM-6xCPU-128GB\"\n    \"840USDM\"  = \"HIMEM-8xCPU-192GB\"\n    \"1080USDM\" = \"HIMEM-12xCPU-256GB\"\n    \"1680USDM\" = \"HIMEM-16xCPU-384GB\"\n    \"130USDC\"  = \"HICPU-8xCPU-12GB\"\n    \"160USDC\"  = \"HICPU-8xCPU-16GB\"\n    \"260USDC\"  = \"HICPU-16xCPU-24GB\"\n    \"310USDC\"  = \"HICPU-16xCPU-32GB\"\n    \"530USDC\"  = \"HICPU-32xCPU-48GB\"\n    \"620USDC\"  = \"HICPU-32xCPU-64GB\"\n    \"1056USDC\" = \"HICPU-64xCPU-96GB\"\n    \"1248USDC\" = \"HICPU-64xCPU-128GB\"\n\n  }\n}\n\nvariable \"storage_sizes\" {\n  type = map\n  default = {\n    \"1xCPU-1GB\"          = \"25\"\n    \"1xCPU-2GB\"          = \"50\"\n    \"2xCPU-4GB\"          = \"80\"\n    \"4xCPU-8GB\"          = \"160\"\n    \"6xCPU-16GB\"         = \"320\"\n    \"8xCPU-32GB\"         = \"640\"\n    \"12xCPU-48GB\"        = \"960\"\n    \"16xCPU-64GB\"        = \"1280\"\n    \"20xCPU-96GB\"        = \"1920\"\n    \"20xCPU-128GB\"       = \"2048\"\n    \"HIMEM-2xCPU-8GB\"    = \"100\"\n    \"HIMEM-2xCPU-16GB\"   = \"100\"\n    \"HIMEM-4xCPU-32GB\"   = \"100\"\n    \"HIMEM-4xCPU-64GB\"   = \"200\"\n    \"HIMEM-6xCPU-128GB\"  = \"300\"\n    \"HIMEM-8xCPU-192GB\"  = \"400\"\n    \"HIMEM-12xCPU-256GB\" = \"500\"\n    \"HIMEM-16xCPU-384GB\" = \"600\"\n    \"HICPU-8xCPU-12GB\"   = \"100\"\n    \"HICPU-8xCPU-16GB\"   = \"200\"\n    \"HICPU-16xCPU-24GB\"  = \"100\"\n    \"HICPU-16xCPU-32GB\"  = \"200\"\n    \"HICPU-32xCPU-48GB\"  = \"200\"\n    \"HICPU-32xCPU-64GB\"  = \"300\"\n    \"HICPU-64xCPU-96GB\"  = \"200\"\n    \"HICPU-64xCPU-128GB\" = \"300\"\n  }\n}\n\nvariable \"templates\" {\n  type = map\n  default = {\n    \"centos7\"     = \"01000000-0000-4000-8000-000050010300\"\n    \"almalinux8\"  = \"01000000-0000-4000-8000-000140010100\"\n    \"rockylinux8\" = \"01000000-0000-4000-8000-000150010100\"\n    \"almalinux9\"  = \"01000000-0000-4000-8000-000140020100\"\n    \"rockylinux9\" = \"01000000-0000-4000-8000-000150020100\"\n  }\n}\n\nvariable \"set_password\" {\n  type = bool\n  default = false\n}\n\nvariable \"users\" {\n  type = list\n  default = [\"root\", \"user1\", \"user2\"]\n}\n\nvariable \"plan\" {\n  type = string\n  default = \"40USD\"\n}\n\nvariable \"template\" {\n  type = string\n  default = \"centos7\"\n}\n```\n\nWhich allows you to specify a plan by the pre-defined plan name which in this case is as follows:\n\n```\n    \"5USD\"     = \"1xCPU-1GB\"\n    \"10USD\"    = \"1xCPU-2GB\"\n    \"20USD\"    = \"2xCPU-4GB\"\n    \"40USD\"    = \"4xCPU-8GB\"\n    \"80USD\"    = \"6xCPU-16GB\"\n    \"160USD\"   = \"8xCPU-32GB\"\n    \"240USD\"   = \"12xCPU-48GB\"\n    \"320USD\"   = \"16xCPU-64GB\"\n    \"490USD\"   = \"20xCPU-96GB\"\n    \"640USD\"   = \"20xCPU-128GB\"\n    \"40USDM\"   = \"HIMEM-2xCPU-8GB\"\n    \"65USDM\"   = \"HIMEM-2xCPU-16GB\"\n    \"132USDM\"  = \"HIMEM-4xCPU-32GB\"\n    \"240USDM\"  = \"HIMEM-4xCPU-64GB\"\n    \"480USDM\"  = \"HIMEM-6xCPU-128GB\"\n    \"840USDM\"  = \"HIMEM-8xCPU-192GB\"\n    \"1080USDM\" = \"HIMEM-12xCPU-256GB\"\n    \"1680USDM\" = \"HIMEM-16xCPU-384GB\"\n    \"130USDC\"  = \"HICPU-8xCPU-12GB\"\n    \"160USDC\"  = \"HICPU-8xCPU-16GB\"\n    \"260USDC\"  = \"HICPU-16xCPU-24GB\"\n    \"310USDC\"  = \"HICPU-16xCPU-32GB\"\n    \"530USDC\"  = \"HICPU-32xCPU-48GB\"\n    \"620USDC\"  = \"HICPU-32xCPU-64GB\"\n    \"1056USDC\" = \"HICPU-64xCPU-96GB\"\n    \"1248USDC\" = \"HICPU-64xCPU-128GB\"\n```\n\n# Specific Terraform definition files\n\nFor CentOS 7 `centos.tfvars`\n\n```\ntemplate = \"centos7\"\n```\n\nFor AlmaLinux 8 `almalinux8.tfvars`\n\n```\ntemplate = \"almalinux8\"\n```\n\nFor Rocky Linux 8 `rockylinux8.tfvars`\n\n```\ntemplate = \"rockylinux8\"\n```\n\nFor AlmaLinux 9 `almalinux9.tfvars`\n\n```\ntemplate = \"almalinux9\"\n```\n\nFor Rocky Linux 9 `rockylinux9.tfvars`\n\n```\ntemplate = \"rockylinux9\"\n```\n\nYou can then utilise these definition files on the command line and set the pre-defined plan name from above and desired hostname and `--var-file` for the OS template name i.e.\n\n```\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file centos.tfvars\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux8.tfvars\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux8.tfvars\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux9.tfvars\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux9.tfvars\n\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file centos.tfvars\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux8.tfvars\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux8.tfvars\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux9.tfvars\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux9.tfvars\n```\n\nTo apply without prompt at `-auto-approve`\n\n```\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file centos.tfvars -auto-approve\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux8.tfvars -auto-approve\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux8.tfvars -auto-approve\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux9.tfvars -auto-approve\nterraform apply -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux9.tfvars -auto-approve\n```\n\n## plan files\n\nOr save to plan files\n\n```\n# save plan files\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file centos.tfvars -out plan20usd-c7\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux8.tfvars -out plan20usd-al8\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux8.tfvars -out plan20usd-rl8\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file almalinux9.tfvars -out plan20usd-al9\nterraform plan -var plan=\"20USD\" -var hostname=\"host.domain.com\" --var-file rockylinux9.tfvars -out plan20usd-rl9\n\n# inspect plan files\nterraform show \"plan20usd-c7\"\nterraform show \"plan20usd-al8\"\nterraform show \"plan20usd-rl8\"\nterraform show \"plan20usd-al9\"\nterraform show \"plan20usd-rl9\"\n\n# inspect plan files with debug output prefix with TF_LOG=debug\nTF_LOG=debug terraform show \"plan20usd-c7\"\nTF_LOG=debug terraform show \"plan20usd-al8\"\nTF_LOG=debug terraform show \"plan20usd-rl8\"\nTF_LOG=debug terraform show \"plan20usd-al9\"\nTF_LOG=debug terraform show \"plan20usd-rl9\"\n\n# inspect plan files in json output\nterraform show -json \"plan20usd-c7\"\nterraform show -json \"plan20usd-al8\"\nterraform show -json \"plan20usd-rl8\"\nterraform show -json \"plan20usd-al9\"\nterraform show -json \"plan20usd-rl9\"\n\n# apply plan files\nterraform apply \"plan20usd-c7\"\nterraform apply \"plan20usd-al8\"\nterraform apply \"plan20usd-rl8\"\nterraform apply \"plan20usd-al9\"\nterraform apply \"plan20usd-rl9\"\n\n# apply plan files with debug output prefix with TF_LOG=debug\nTF_LOG=debug terraform apply \"plan20usd-c7\"\nTF_LOG=debug terraform apply \"plan20usd-al8\"\nTF_LOG=debug terraform apply \"plan20usd-rl8\"\nTF_LOG=debug terraform apply \"plan20usd-al9\"\nTF_LOG=debug terraform apply \"plan20usd-rl9\"\n```\n\nThe `server.tf` file\n\n```\nresource \"upcloud_server\" \"server1\" {\n  # System hostname\n  hostname = var.hostname\n\n  # Availability zone\n  zone = var.zones[\"newyork\"]\n\n  # Number of CPUs and memory in GB\n  plan = var.plans[var.plan]\n\n  metadata = true\n\n  template {\n    # System storage device size\n    size = lookup(var.storage_sizes, var.plans[var.plan])\n\n    # Template UUID for CentOS 7\n    storage = var.templates[var.template]\n  }\n\n  # Network interfaces\n  network_interface {\n    type = \"public\"\n  }\n\n  network_interface {\n    type = \"utility\"\n  }\n\n  # Include at least one public SSH key\n  login {\n    user = var.users[0]\n    keys = [\n      chomp(file(var.public_key_path))\n    ]\n    create_password = var.set_password\n    password_delivery = \"email\"\n  }\n\n  # Configuring connection details\n  connection {\n    # The server public IP address\n    host        = self.network_interface[0].ip_address\n    type        = \"ssh\"\n    user        = var.users[0]\n    private_key = file(var.private_key_path)\n    script_path = \"/home/terraform_%RAND%.sh\"\n  }\n\n  # Remotely executing a command on the server\n  provisioner \"remote-exec\" {\n    inline = [\n      \"echo 'Hello world!'\"\n    ]\n  }\n\n  user_data = \u003c\u003c-EOF\n  export TERM=xterm-256color\n  mkdir -p /root\n  export HOME=/root\n  echo $HOME\n  touch $HOME/.rnd\n  export RANDFILE=$HOME/.rnd\n  chmod 600 $HOME/.rnd\n  env\n  yum -y update\n  EOF\n\n # Remotely executing a command on the server\n  provisioner \"remote-exec\" {\n    inline = [\n        \"echo\",\n        \"lscpu\",\n        \"echo\",\n        \"free -mlt\",\n        \"echo\",\n        \"df -hT\",\n        \"echo\",\n        \"cat /etc/redhat-release\"\n    ]\n  }\n}\n```\n\nYou can optionally enable backups by adding to `template{}` block\n\n```\n  backup_rule {\n    interval  = \"daily\"\n    time      = \"0100\"\n    retention = 8\n  }\n```\n\n## Defining Output Variables\n\nCreate an `output.tf` file with your server name defined in `server1.tf` = `server1` as defined by `resource \"upcloud_server\" \"server1\" {`\n\n```\noutput \"public_ip\" {\n  value = upcloud_server.server1.network_interface[0].ip_address\n}\n\noutput \"utility_ip\" {\n  value = upcloud_server.server1.network_interface[1].ip_address\n}\n\noutput \"hostname\" {\n  value = upcloud_server.server1.hostname\n}\n\noutput \"plan\" {\n  value = upcloud_server.server1.plan\n}\n\noutput \"zone\" {\n  value = upcloud_server.server1.zone\n}\n\noutput \"size\" {\n  value = upcloud_server.server1.template[0].size\n}\n```\n\nThen creating a `20USD` plan Upcloud server. You can also add `-var hostname=\"host.domain.com\"` to change the desired hostname.\n\n```\nterraform plan -var plan=\"20USD\"\nterraform apply -var plan=\"20USD\"\n```\n\nTo apply without prompt at `-auto-approve`\n\n```\nterraform apply -var plan=\"20USD\" -auto-approve\n```\n\n```\nterraform plan -var plan=\"20USD\"\n\nTerraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:\n  + create\n\nTerraform will perform the following actions:\n\n  # upcloud_server.server1 will be created\n  + resource \"upcloud_server\" \"server1\" {\n      + cpu       = (known after apply)\n      + hostname  = \"terraform.example.com\"\n      + id        = (known after apply)\n      + mem       = (known after apply)\n      + plan      = \"2xCPU-4GB\"\n      + user_data = \u003c\u003c-EOT\n            export TERM=xterm-256color\n            mkdir -p /home/tftmp\n            sleep 5\n            chmod 1777 /home/tftmp\n            mkdir -p /root\n            export HOME=/root\n            echo $HOME\n            touch $HOME/.rnd\n            export RANDFILE=$HOME/.rnd\n            chmod 600 $HOME/.rnd\n            env\n            yum -y update\n        EOT\n      + zone      = \"us-nyc1\"\n\n      + login {\n          + create_password   = false\n          + keys              = [\n              + \"ssh-rsa XYZABC\",\n            ]\n          + password_delivery = \"email\"\n          + user              = \"root\"\n        }\n\n      + network_interface {\n          + bootable            = false\n          + ip_address          = (known after apply)\n          + ip_address_family   = \"IPv4\"\n          + ip_address_floating = (known after apply)\n          + mac_address         = (known after apply)\n          + network             = (known after apply)\n          + source_ip_filtering = true\n          + type                = \"public\"\n        }\n      + network_interface {\n          + bootable            = false\n          + ip_address          = (known after apply)\n          + ip_address_family   = \"IPv4\"\n          + ip_address_floating = (known after apply)\n          + mac_address         = (known after apply)\n          + network             = (known after apply)\n          + source_ip_filtering = true\n          + type                = \"utility\"\n        }\n\n      + template {\n          + address                  = (known after apply)\n          + delete_autoresize_backup = false\n          + filesystem_autoresize    = false\n          + id                       = (known after apply)\n          + size                     = 80\n          + storage                  = \"01000000-0000-4000-8000-000050010300\"\n          + tier                     = (known after apply)\n          + title                    = (known after apply)\n        }\n    }\n\nPlan: 1 to add, 0 to change, 0 to destroy.\n\nChanges to Outputs:\n  + hostname   = \"terraform.example.com\"\n  + plan       = \"2xCPU-4GB\"\n  + public_ip  = (known after apply)\n  + size       = 80\n  + utility_ip = (known after apply)\n  + zone       = \"us-nyc1\"\n\n────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nNote: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run \"terraform apply\" now.\n```\n\n## Viewing User Data Progress\n\nYou can check the user data log at `/var/log/upcloud_userdata.log` on the created Upcloud server\n\n```\ntail -f /var/log/upcloud_userdata.log\n```\n\nOr SSH into the created Upcloud server\n\n```\nssh root@209.xxx.xxx.xxx tail -f /var/log/upcloud_userdata.log\n```\n\n# Using upctl Command Line Tool\n\nUse upctl command line tool https://upcloud.com/resources/tutorials/get-started-upcloud-command-line-interface\n\nList servers\n\n```\nupctl server list\n\n UUID                                   Hostname                Plan        Zone      State   \n────────────────────────────────────── ─────────────────────── ─────────── ───────── ─────────\n 0006f04a-15e3-4f4d-83xxx-7cc592935xxx   terraform.example.com   4xCPU-8GB   us-nyc1   started \n```\n\nStop server\n\n```\nupctl server stop terraform.example.com\n```\n\nStart server\n\n```\nupctl server start terraform.example.com\n```\n\nShow server info\n\n```\nupctl server show terraform.example.com\n```\n\n```\nupctl server show terraform.example.com\n  \n  Common\n    UUID:          0006f04a-15e3-4f4d-83xxx-7cc592935xxx         \n    Hostname:      terraform.example.com                        \n    Title:         terraform.example.com (managed by terraform) \n    Plan:          4xCPU-8GB                                    \n    Zone:          us-nyc1                                      \n    State:         started                                      \n    Simple Backup: no                                           \n    Licence:       0                                            \n    Metadata:      False                                        \n    Timezone:      UTC                                          \n    Host ID:       746718xxxxx                                  \n    Tags:                                                       \n\n  Storage: (Flags: B = bootdisk, P = part of plan)\n\n     UUID                                   Title                                  Type   Address    Size (GiB)   Flags \n    ────────────────────────────────────── ────────────────────────────────────── ────── ────────── ──────────── ───────\n     01a400de-930e-4cac-8114-62408b5xxxxx   terraform-terraform.example.com-disk   disk   virtio:0          160   P     \n    \n  NICs: (Flags: S = source IP filtering, B = bootable)\n\n     #   Type      IP Address             MAC Address         Network                                Flags \n    ─── ───────── ────────────────────── ─────────────────── ────────────────────────────────────── ───────\n     1   public    IPv4: 209.xxx.xxx.xxx   52:xx:xx:xx:61:5c   034a97cd-e05c-4785-bf33-7648b64xxxxx   S     \n     2   utility   IPv4: 10.x.x.xxx        52:xx:xx:xx:be:aa   03243004-e399-49cc-9697-4f5e9fcxxxxx   S  \n```\n\n# Deleting Terraform Created Server\n\n```\nterraform destroy\n```\n\n# Upcloud Region List\n\n```json\n{\n  \"zones\": {\n    \"zone\": [\n      {\n        \"description\": \"Sydney #1\",\n        \"id\": \"au-syd1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Frankfurt #1\",\n        \"id\": \"de-fra1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Madrid #1\",\n        \"id\": \"es-mad1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Helsinki #1\",\n        \"id\": \"fi-hel1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Helsinki #2\",\n        \"id\": \"fi-hel2\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Amsterdam #1\",\n        \"id\": \"nl-ams1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Warsaw #1\",\n        \"id\": \"pl-waw1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Singapore #1\",\n        \"id\": \"sg-sin1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"London #1\",\n        \"id\": \"uk-lon1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"Chicago #1\",\n        \"id\": \"us-chi1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"New York #1\",\n        \"id\": \"us-nyc1\",\n        \"public\": \"yes\"\n      },\n      {\n        \"description\": \"San Jose #1\",\n        \"id\": \"us-sjo1\",\n        \"public\": \"yes\"\n      }\n    ]\n  }\n}\n```\n\n# Upcloud Plan List\n\n```json\n{\n  \"plans\": {\n    \"plan\": [\n      {\n        \"core_number\": 1,\n        \"memory_amount\": 2048,\n        \"name\": \"1xCPU-2GB\",\n        \"public_traffic_out\": 2048,\n        \"storage_size\": 50,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 1,\n        \"memory_amount\": 1024,\n        \"name\": \"1xCPU-1GB\",\n        \"public_traffic_out\": 1024,\n        \"storage_size\": 25,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 2,\n        \"memory_amount\": 4096,\n        \"name\": \"2xCPU-4GB\",\n        \"public_traffic_out\": 4096,\n        \"storage_size\": 80,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 2,\n        \"memory_amount\": 8192,\n        \"name\": \"HIMEM-2xCPU-8GB\",\n        \"public_traffic_out\": 2048,\n        \"storage_size\": 100,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 2,\n        \"memory_amount\": 16384,\n        \"name\": \"HIMEM-2xCPU-16GB\",\n        \"public_traffic_out\": 2048,\n        \"storage_size\": 100,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 4,\n        \"memory_amount\": 65536,\n        \"name\": \"HIMEM-4xCPU-64GB\",\n        \"public_traffic_out\": 4096,\n        \"storage_size\": 200,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 4,\n        \"memory_amount\": 32768,\n        \"name\": \"HIMEM-4xCPU-32GB\",\n        \"public_traffic_out\": 4096,\n        \"storage_size\": 100,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 4,\n        \"memory_amount\": 8192,\n        \"name\": \"4xCPU-8GB\",\n        \"public_traffic_out\": 5120,\n        \"storage_size\": 160,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 6,\n        \"memory_amount\": 16384,\n        \"name\": \"6xCPU-16GB\",\n        \"public_traffic_out\": 6144,\n        \"storage_size\": 320,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 6,\n        \"memory_amount\": 131072,\n        \"name\": \"HIMEM-6xCPU-128GB\",\n        \"public_traffic_out\": 6144,\n        \"storage_size\": 300,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 8,\n        \"memory_amount\": 12288,\n        \"name\": \"HICPU-8xCPU-12GB\",\n        \"public_traffic_out\": 4096,\n        \"storage_size\": 100,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 8,\n        \"memory_amount\": 16384,\n        \"name\": \"HICPU-8xCPU-16GB\",\n        \"public_traffic_out\": 4096,\n        \"storage_size\": 200,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 8,\n        \"memory_amount\": 196608,\n        \"name\": \"HIMEM-8xCPU-192GB\",\n        \"public_traffic_out\": 8192,\n        \"storage_size\": 400,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 8,\n        \"memory_amount\": 32768,\n        \"name\": \"8xCPU-32GB\",\n        \"public_traffic_out\": 7168,\n        \"storage_size\": 640,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 12,\n        \"memory_amount\": 262144,\n        \"name\": \"HIMEM-12xCPU-256GB\",\n        \"public_traffic_out\": 10240,\n        \"storage_size\": 500,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 12,\n        \"memory_amount\": 49152,\n        \"name\": \"12xCPU-48GB\",\n        \"public_traffic_out\": 9216,\n        \"storage_size\": 960,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 16,\n        \"memory_amount\": 24576,\n        \"name\": \"HICPU-16xCPU-24GB\",\n        \"public_traffic_out\": 5120,\n        \"storage_size\": 100,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 16,\n        \"memory_amount\": 393216,\n        \"name\": \"HIMEM-16xCPU-384GB\",\n        \"public_traffic_out\": 12288,\n        \"storage_size\": 600,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 16,\n        \"memory_amount\": 32768,\n        \"name\": \"HICPU-16xCPU-32GB\",\n        \"public_traffic_out\": 5120,\n        \"storage_size\": 200,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 16,\n        \"memory_amount\": 65536,\n        \"name\": \"16xCPU-64GB\",\n        \"public_traffic_out\": 10240,\n        \"storage_size\": 1280,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 20,\n        \"memory_amount\": 131072,\n        \"name\": \"20xCPU-128GB\",\n        \"public_traffic_out\": 24576,\n        \"storage_size\": 2048,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 20,\n        \"memory_amount\": 98304,\n        \"name\": \"20xCPU-96GB\",\n        \"public_traffic_out\": 12288,\n        \"storage_size\": 1920,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 32,\n        \"memory_amount\": 49152,\n        \"name\": \"HICPU-32xCPU-48GB\",\n        \"public_traffic_out\": 6144,\n        \"storage_size\": 200,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 32,\n        \"memory_amount\": 65536,\n        \"name\": \"HICPU-32xCPU-64GB\",\n        \"public_traffic_out\": 6144,\n        \"storage_size\": 300,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 64,\n        \"memory_amount\": 131072,\n        \"name\": \"HICPU-64xCPU-128GB\",\n        \"public_traffic_out\": 7168,\n        \"storage_size\": 300,\n        \"storage_tier\": \"maxiops\"\n      },\n      {\n        \"core_number\": 64,\n        \"memory_amount\": 98304,\n        \"name\": \"HICPU-64xCPU-96GB\",\n        \"public_traffic_out\": 7168,\n        \"storage_size\": 200,\n        \"storage_tier\": \"maxiops\"\n      }\n    ]\n  }\n}\n```\n\n# OS Template Storage UUID\n\n```json\n{\n  \"storages\": {\n    \"storage\": [\n      {\n        \"access\": \"public\",\n        \"license\": 3.36,\n        \"size\": 28,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Windows Server 2016 Datacenter\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000010060200\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0.694,\n        \"size\": 29,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Windows Server 2016 Standard\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000010060300\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 3.36,\n        \"size\": 25,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Windows Server 2019 Datacenter\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000010070200\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0.694,\n        \"size\": 25,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Windows Server 2019 Standard\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000010070300\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 3.36,\n        \"size\": 18,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Windows Server 2022 Datacenter\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000010080200\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0.694,\n        \"size\": 18,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Windows Server 2022 Standard\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000010080300\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Debian GNU/Linux 9 (Stretch)\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000020040100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Debian GNU/Linux 10 (Buster)\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000020050100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Debian GNU/Linux 11 (Bullseye)\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000020060100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 4,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Ubuntu Server 18.04 LTS (Bionic Beaver)\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000030080200\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 4,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Ubuntu Server 20.04 LTS (Focal Fossa)\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000030200200\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 4,\n        \"state\": \"online\",\n        \"template_type\": \"cloud-init\",\n        \"title\": \"Ubuntu Server 22.04 LTS (Jammy Jellyfish)\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000030220200\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"CentOS 7\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000050010300\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"CentOS 8\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000050010400\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"CentOS Stream 8\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000050010500\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 5,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"CentOS Stream 9\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000050010600\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 5,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Plesk Obsidian\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000130010100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"AlmaLinux 8\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000140010100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 4,\n        \"state\": \"online\",\n        \"template_type\": \"cloud-init\",\n        \"title\": \"AlmaLinux 9\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000140020100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 3,\n        \"state\": \"online\",\n        \"template_type\": \"native\",\n        \"title\": \"Rocky Linux 8\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000150010100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 4,\n        \"state\": \"online\",\n        \"template_type\": \"cloud-init\",\n        \"title\": \"Rocky Linux 9\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000150020100\"\n      },\n      {\n        \"access\": \"public\",\n        \"license\": 0,\n        \"size\": 5,\n        \"state\": \"online\",\n        \"template_type\": \"cloud-init\",\n        \"title\": \"UpCloud K8s\",\n        \"type\": \"template\",\n        \"uuid\": \"01000000-0000-4000-8000-000160010100\"\n      }\n    ]\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentminmod%2Fupcloud-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentminmod%2Fupcloud-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentminmod%2Fupcloud-terraform/lists"}