Skip to main content

Terraform Options

This page documents the resources and data sources available in the NetActuate Terraform provider.

Resources

netactuate_server

Manages a NetActuate virtual server instance.

ArgumentTypeDescriptionRequired
hostnamestringServer hostnameYes
planstringPlan identifier (e.g., VR2x2x40). See API Virtual Server Plans.Yes
locationstringLocation identifier (e.g., IAD3). See API Locations.Yes
imagestringOS image identifier (e.g., 5787). See API OS Images.Yes
ssh_keyslist(string)List of SSH key IDs to injectNo
ssh_key_idnumberExisting SSH key ID (alternative to ssh_keys)No
cloud_configstringCloud-init configuration passed to the VM at build time. Must be valid cloud-init YAML.No
user_datastringInitialization script content (base64-encoded internally by the provider)No
user_data_base64stringPre-encoded base64 user data (use instead of user_data if already encoded)No
package_billingstringBilling type: usage or packageNo
package_billing_contract_idstringContract ID (required when package_billing is usage)No
tagsmap(string)Tags for the instanceNo

Exported Attributes

AttributeTypeDescription
idstringServer ID
ip_addressstringPrimary IPv4 address
ipv6_addressstringPrimary IPv6 address
statusstringCurrent server status
created_atstringCreation timestamp

Example

resource "netactuate_server" "web" {
hostname = "web-01"
plan = "VR2x2x40"
location = "IAD3"
image = "5787"
ssh_keys = [netactuate_ssh_key.deploy.id]

tags = {
environment = "production"
role = "web"
}
}

netactuate_ssh_key

Manages an SSH public key in your NetActuate account.

ArgumentTypeDescriptionRequired
namestringKey nameYes
public_keystringSSH public key contentYes

Example

resource "netactuate_ssh_key" "deploy" {
name = "deploy-key"
public_key = file("~/.ssh/id_ed25519.pub")
}

netactuate_bgp_sessions

Manages BGP session assignment for a server. This resource assigns a server to a BGP group at the API level.

ArgumentTypeDescriptionRequired
mbpkgidnumberServer package ID (from netactuate_server.id)Yes
group_idnumberBGP group ID (pre-configured by NetActuate)Yes
ipv6booleanEnable IPv6 BGP sessions (default: true)No
redundantbooleanEnable redundant sessions (default: false)No

Note: The BGP sessions resource handles API-level BGP group assignment only. BGP daemon configuration (BIRD2 or FRR) is managed separately by Ansible. See netactuate-ansible-bgp-bird2.

Example

resource "netactuate_bgp_sessions" "worker" {
mbpkgid = tonumber(netactuate_server.node.id)
group_id = tonumber(var.bgp_group_id)
ipv6 = true
redundant = true
}

Data Sources

netactuate_locations

Retrieves available deployment locations.

data "netactuate_locations" "all" {}

output "locations" {
value = data.netactuate_locations.all.locations
}

netactuate_images

Retrieves available OS images.

data "netactuate_images" "all" {}

netactuate_sizes

Retrieves available server plans.

data "netactuate_sizes" "all" {}

Need Help?

If you need assistance with Terraform resource configuration, visit our support page.