This module deploys a VM to Azure with a number of different options, and bootstraps it to work as a Pterodactyl Wings node.
Consuming the module is as simple as adding a module
block to your IaC configuration, see a basic example below.
module "pterodactyl_node" {
source = "github.com/bancey/terraform-module-pterodactyl-node.git?ref=develop"
name = "pteronode"
vm_size = "Standard_D4as_v5"
vm_image_publiser = "canonical"
vm_image_offer = "0001-com-ubuntu-server-focal"
vm_image_sku = "20_04-lts-gen2"
vm_image_version = "latest"
}
Once the VM has been deployed you'll need to place the wings config in a file called config.yml
in the /etc/pterodactyl
directory.
Name | Version |
---|---|
azurerm | >= 3.30.0 |
random | ~>3.0 |
tls | ~>4.0 |
Name | Version |
---|---|
azurerm | 3.31.0 |
random | 3.4.3 |
tls | 4.0.4 |
Name | Type |
---|---|
azurerm_dev_test_global_vm_shutdown_schedule.this | resource |
azurerm_key_vault.this | resource |
azurerm_key_vault_secret.privatekey | resource |
azurerm_key_vault_secret.publickey | resource |
azurerm_key_vault_secret.username | resource |
azurerm_linux_virtual_machine.this | resource |
azurerm_network_interface.this | resource |
azurerm_network_interface_security_group_association.this | resource |
azurerm_network_security_group.this | resource |
azurerm_network_security_rule.this | resource |
azurerm_public_ip.this | resource |
azurerm_resource_group.new | resource |
azurerm_subnet.this | resource |
azurerm_virtual_machine_extension.customscript | resource |
azurerm_virtual_network.this | resource |
random_string.username | resource |
tls_private_key.this | resource |
azurerm_client_config.current | data source |
azurerm_public_ip.existing | data source |
azurerm_resource_group.existing | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
admin_public_key | Public key to use for the admin account. If not provided, a new key will be generated | string |
null |
no |
admin_username | Username for the admin account. If not provided, a random username will be generated | string |
null |
no |
env | The name of the environment | string |
"prod" |
no |
existing_public_ip | The name and resource group of an existing public IP to use for the node | object({ |
null |
no |
existing_resource_group_name | Name of an existing resourcegroup to deploy resources into | string |
null |
no |
kv_policies | Policiy to apply to the keyvault | set(object({ |
[] |
no |
location | Target Azure location to deploy resources into | string |
"uksouth" |
no |
name | The name of the game server | string |
n/a | yes |
nsg_rules | Rule to apply to the network security group | map(object({ |
n/a | yes |
publicly_accessible | Whether the node should be publicly accessible | bool |
false |
no |
tags | Tags to apply to all resources | map(string) |
null |
no |
vm_auto_shutdown_time | The time at which the VM should be automatically shutdown | string |
"0000" |
no |
vm_auto_shutdown_timezone | The timezone for the auto shutdown time | string |
"GMT Standard Time" |
no |
vm_domain_name | The domain name to use for the VM, if specified the VM will attempt to generate SSL certificates using certbot. | string |
null |
no |
vm_image_offer | The offer of the VM image | string |
n/a | yes |
vm_image_publisher | The publisher of the VM image | string |
n/a | yes |
vm_image_sku | The SKU of the VM image | string |
n/a | yes |
vm_image_version | The version of the VM image | string |
n/a | yes |
vm_os_disk_caching | The caching type for the OS disk | string |
"ReadWrite" |
no |
vm_os_disk_size_gb | The size of the OS disk | number |
128 |
no |
vm_os_disk_type | The type of the OS disk | string |
"StandardSSD_LRS" |
no |
vm_size | The size of the VM to deploy | string |
n/a | yes |
vnet_address_space | The address space of the virtual network | list(string) |
[ |
no |
Name | Description |
---|---|
private_ip | The private IP address of the VM |
private_key_secret_id | The reference to the private key in the keyvault, if a public key was NOT provided |
public_ip | The public IP address of the VM, if publicly accessible |
public_key_secret_id | The reference to the public key in the keyvault, if a public key was NOT provided |
username_secret_id | The reference to the username in the keyvault, if a username was NOT provided |