2016-02-10 21:30:32 +01:00
|
|
|
---
|
|
|
|
layout: "triton"
|
|
|
|
page_title: "Triton: triton_machine"
|
|
|
|
sidebar_current: "docs-triton-firewall"
|
|
|
|
description: |-
|
2017-02-18 23:48:50 +01:00
|
|
|
The `triton_machine` resource represents a virtual machine or infrastructure container running in Triton.
|
2016-02-10 21:30:32 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# triton\_machine
|
|
|
|
|
|
|
|
The `triton_machine` resource represents a virtual machine or infrastructure container running in Triton.
|
|
|
|
|
|
|
|
## Example Usages
|
|
|
|
|
|
|
|
Run a SmartOS base-64 machine.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "triton_machine" "test" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "example-machine"
|
|
|
|
package = "g3-standard-0.25-smartos"
|
|
|
|
image = "842e6fa6-6e9b-11e5-8402-1b490459e334"
|
2016-02-10 21:30:32 +01:00
|
|
|
|
2017-02-18 23:48:50 +01:00
|
|
|
tags = {
|
|
|
|
hello = "world"
|
|
|
|
}
|
2016-02-10 21:30:32 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (string)
|
|
|
|
The friendly name for the machine. Triton will generate a name if one is not specified.
|
|
|
|
|
|
|
|
* `tags` - (map)
|
|
|
|
A mapping of tags to apply to the machine.
|
|
|
|
|
|
|
|
* `package` - (string, Required)
|
|
|
|
The name of the package to use for provisioning.
|
|
|
|
|
|
|
|
* `image` - (string, Required)
|
|
|
|
The UUID of the image to provision.
|
|
|
|
|
2017-02-13 19:10:06 +01:00
|
|
|
* `nic` - (list of NIC blocks, Optional)
|
|
|
|
NICs associated with the machine. The fields allowed in a `NIC` block are defined below.
|
2016-02-10 21:30:32 +01:00
|
|
|
|
|
|
|
* `firewall_enabled` - (boolean) Default: `false`
|
|
|
|
Whether the cloud firewall should be enabled for this machine.
|
|
|
|
|
|
|
|
* `root_authorized_keys` - (string)
|
|
|
|
The public keys authorized for root access via SSH to the machine.
|
|
|
|
|
|
|
|
* `user_data` - (string)
|
|
|
|
Data to be copied to the machine on boot.
|
|
|
|
|
|
|
|
* `user_script` - (string)
|
|
|
|
The user script to run on boot (every boot on SmartMachines).
|
|
|
|
|
|
|
|
* `administrator_pw` - (string)
|
|
|
|
The initial password for the Administrator user. Only used for Windows virtual machines.
|
|
|
|
|
2017-02-08 02:28:26 +01:00
|
|
|
The nested `nic` block supports the following:
|
|
|
|
* `network` - (string, Optional)
|
|
|
|
The network id to attach to the network interface. It will be hex, in the format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`.
|
|
|
|
|
2016-02-10 21:30:32 +01:00
|
|
|
## Attribute Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
2017-02-18 23:48:50 +01:00
|
|
|
* `id` - (string) - The identifier representing the firewall rule in Triton.
|
|
|
|
* `type` - (string) - The type of the machine (`smartmachine` or `virtualmachine`).
|
|
|
|
* `state` - (string) - The current state of the machine.
|
|
|
|
* `dataset` - (string) - The dataset URN with which the machine was provisioned.
|
|
|
|
* `memory` - (int) - The amount of memory the machine has (in Mb).
|
|
|
|
* `disk` - (int) - The amount of disk the machine has (in Gb).
|
|
|
|
* `ips` - (list of strings) - IP addresses of the machine.
|
|
|
|
* `primaryip` - (string) - The primary (public) IP address for the machine.
|
|
|
|
* `created` - (string) - The time at which the machine was created.
|
|
|
|
* `updated` - (string) - The time at which the machine was last updated.
|