Skip to main content

Deploy Compute VMs using Terraform

Manage Compute VMs using nodeshift_deployment resource

Example:

resource "nodeshift_deployment" "example" {
host_name = "vmjceufc"
image = "Ubuntu-v22.04"
region = "Brazil"
cpu = 1
# RAM in MiB
ram = 1024
# Disk in MiB
disk_size = 20480
disk_type = "ssd"
assign_public_ipv4 = true
assign_public_ipv6 = false
assign_ygg_ip = true
ssh_key = "ssh-rsa ..."
ssh_key_name = "new ssh key"
}

Parameters​

Required​

  • cpu (Number) Number of CPU cores for your Deployment
  • disk_size (Number) Amount of disk size for your Deployment in MiB
  • disk_type (String) Disk type for your Deployment. Available options: hdd, ssd
  • host_name (String) Host name for your Deployment
  • image (String) OS Image used to install on the target Virtual Machine Deployment.
  • ram (Number) Amount of RAM for your Deployment in MiB
  • region (String) Region where you want to deploy your Deployment.
  • ssh_key (String, Sensitive) SSH key to add to the target VM to make it possible to connect to your VM

Optional​

  • assign_public_ipv4 (Boolean) If true assigns a public ipv4 address for your Deployment
  • assign_public_ipv6 (Boolean) If true assigns a public ipv6 address for your Deployment
  • assign_ygg_ip (Boolean) If true assigns a yggdrasil address for your Deployment
  • vpc_id (String) ID of the vpc to deploy your VM into

Read-Only​

  • id (String) String ID of the deployment, computed
  • public_ipv4 (String) Public IPv4 of your VM
  • public_ipv6 (String) Public IPv4 of your VM
  • ygg_ip (String) Yggdrasil IP of your VM