forked from mirrors/terraform-provider-binarylane
85f65c9391
* 👆 bump OpenAPI schema to v0.39.1, update dependencies * 📑 Update README with latest regions/sizes/images
8.8 KiB
8.8 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| binarylane_server Resource - terraform-provider-binarylane |
binarylane_server (Resource)
Example Usage
resource "binarylane_server" "example" {
name = "tf-example"
region = "per" # or "syd", "mel", "bne", "sin"
image = "ubuntu-24.04"
size = "std-min" # 1 VPCU, 1 GB Memory, 20 GB NVME Storage, 1000 GB Data Transfer
public_ipv4_count = 1
# Accepts a cloud-init script or cloud-config YAML file to configure the server
# See more: https://cloudinit.readthedocs.io/en/latest/explanation/format.html#user-data-script
user_data = file("./init.sh")
}
Schema
Required
image(String) The slug of the selected operating system, such asdebian-12. You can fetch a full list of images from the BinaryLane API.public_ipv4_count(Number) The number of public IPv4 addresses to assign to the server.region(String) The slug of the selected region.size(String) The slug of the selected size.
Optional
advanced_features(Attributes) (see below for nested schema)backups(Boolean) Iftruethis will enable two daily backups for the server. By default, backups are disabled.disk(Number) The total storage in GB for this server. Leave null to accept the default for the size Valid values:- must be a multiple of 5
- > 60 GB must be a multiple of 10
- > 200 GB must be a multiple of 100
ipv6(Boolean) Iftruethis will add a public and private IPv6 address to the server. By default, IPv6 is disabled.memory(Number) The total memory in MB for this server. Leave null to accept the default size. Valid values:- must be a multiple of 128
- > 2048 MB must be a multiple of 1024
- > 16384 MB must be a multiple of 2048
- > 24576 MB must be a multiple of 4096
name(String) The hostname of your server, such as vps01.yourcompany.com. If not provided, the server will be created with a random name.password(String, Sensitive) If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions. If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.port_blocking(Boolean) Port blocking of outgoing connections for email, SSH and Remote Desktop (TCP ports 22, 25, and 3389) is enabled by default for all new servers. If this is false port blocking will be disabled. Disabling port blocking is only available to verified accounts.separate_private_network_interface(Boolean) This attribute can only be set if your server also has avpc_idattribute set. When enabled, a separate private network interface is provided for the server's VPC traffic.source_and_destination_check(Boolean) This attribute can only be set if your server also has avpc_idattribute set. When enabled (which istrueby default), your server will only be able to send or receive packets that are directly addressed to one of the IP addresses associated with the Cloud Server. Generally, this is desirable behaviour because it prevents IP conflicts and other hard-to-diagnose networking faults due to incorrect network configuration. Whensource_and_destination_checkisfalse, your Cloud Server will be able to send and receive packets addressed to any server. This is typically used when you want to use your Cloud Server as a VPN endpoint, a NAT server to provide internet access, or IP forwarding.ssh_keys(List of Number) This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.timeouts(Attributes) (see below for nested schema)user_data(String) A script or cloud-config YAML file to configure the server. Can only be specified if the OS image supports UserData (i.e. not Windows). See more: https://cloudinit.readthedocs.io/en/latest/explanation/format.html#user-data-scriptvpc_id(Number) Leave null to use default (public) network for the selected region.vpc_ipv4_address(String) If provided this will be the IPv4 address for the server's private VPC network adapter. If this is unspecified, then an unused IPv4 address will be assigned. This field is only valid whenvpc_idis provided.
Read-Only
id(Number) The ID of the server to fetch.password_change_supported(Boolean) If this is true then thepasswordattribute can be changed with Terraform. If this is false then thepasswordattribute can only be replaced with a null/empty value, which will clear the root/administrator password allowing the password to be changed via the web console.permalink(String) A randomly generated two-word identifier assigned to servers in regions that support this featureprivate_ipv4_addresses(List of String) The private IPv4 addresses assigned to the server.private_ipv6_addresses(List of String) The private IPv6 addresses assigned to the server.public_ipv4_addresses(List of String) The public IPv4 addresses assigned to the server.public_ipv6_addresses(List of String) The public IPv6 addresses assigned to the server.
Nested Schema for advanced_features
Optional:
driver_disk(Boolean) When this option is enabled a copy of the KVM driver disc for Windows ("virtio-win.iso") will be attached to your server as a virtual CD. This option can also be used in combination with your own attached backup when installing Windows.emulated_devices(Boolean) When emulated devices is enabled, the KVM specific "VirtIO" disk drive and network devices are removed, and replaced with emulated versions of physical hardware: an old IDE HDD and an Intel E1000 network card. Emulated devices are much slower than the VirtIO devices, and so this option should not be enabled unless absolutely necessary.emulated_hyperv(Boolean) Enable HyperV (a hypervisor produced by Microsoft) support. Enabled by default on Windows servers, generally of no value for non-Windows servers.emulated_tpm(Boolean) When enabled this provides an emulated TPM v1.2 device to your Cloud Server. Warning: the TPM state is not backed up.local_rtc(Boolean) When a server is booted the virtual BIOS receives the current date and time from the host node. The BIOS does not have an explicit timezone, so the timezone used is implicit and must be understood by the operating system. Most operating systems other than Windows expect the time to be UTC since it allows the operating system to control the timezone used when displaying the time. Our Windows installations have also been customized to use UTC, but when using your own installation of Windows this should be set to the host node's local timezone.nested_virt(Boolean) When this option is enabled the functionality necessary to run your own KVM servers within your server is enabled. Note that all the networking limits - one MAC address per VPS, restricted to specific IPs - still apply to public cloud so this feature is generally only useful in combination with Virtual Private Cloud.unset_uuid(Boolean) When this option is NOT enabled a 128-bit unique identifier is exposed to your server through the virtual BIOS. Each server receives a different UUID. Some proprietary licensed software utilize this identifier to "tie" the license to a specific server.
Read-Only:
cloud_init(Boolean) When this option is enabled the Cloud Server will be provided a datasource for the cloud-init service.qemu_guest_agent(Boolean) When this option is enabled the server will allow QEMU Guest Agent to perform password reset without rebooting.uefi_boot(Boolean) When this option is enabled the Cloud Server will use UEFI instead of legacy PC BIOS.
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import binarylane_server.example "<server name or id>"