github.com/cbroglie/terraform@v0.7.0-rc3.0.20170410193827-735dfc416d46/website/source/docs/providers/triton/r/triton_machine.html.markdown (about)

     1  ---
     2  layout: "triton"
     3  page_title: "Triton: triton_machine"
     4  sidebar_current: "docs-triton-resource-machine"
     5  description: |-
     6      The `triton_machine` resource represents a virtual machine or infrastructure container running in Triton.
     7  ---
     8  
     9  # triton\_machine
    10  
    11  The `triton_machine` resource represents a virtual machine or infrastructure container running in Triton.
    12  
    13  ## Example Usages
    14  
    15  ### Run a SmartOS base-64 machine.
    16  
    17  
    18  ```
    19  resource "triton_machine" "test-smartos" {
    20    name    = "test-smartos"
    21    package = "g3-standard-0.25-smartos"
    22    image   = "842e6fa6-6e9b-11e5-8402-1b490459e334"
    23  
    24    tags = {
    25      hello = "world"
    26    }
    27  }
    28  ```
    29  
    30  ### Run an Ubuntu 14.04 LTS machine.
    31  
    32  ```
    33  resource "triton_machine" "test-ubuntu" {
    34    name                 = "test-ubuntu"
    35    package              = "g4-general-4G"
    36    image                = "1996a1d6-c0d9-11e6-8b80-4772e39dc920"
    37    firewall_enabled     = true
    38    root_authorized_keys = "Example Key"
    39    user_script          = "#!/bin/bash\necho 'testing user-script' >> /tmp/test.out\nhostname $IMAGENAME"
    40  
    41    tags = {
    42      purpose = "testing ubuntu"
    43    } ## tags
    44  } ## resource
    45  ```
    46  
    47  
    48  
    49  ## Argument Reference
    50  
    51  The following arguments are supported:
    52  
    53  * `name` - (string)
    54      The friendly name for the machine. Triton will generate a name if one is not specified.
    55  
    56  * `tags` - (map)
    57      A mapping of tags to apply to the machine.
    58  
    59  * `package` - (string, Required)
    60      The name of the package to use for provisioning.
    61  
    62  * `image` - (string, Required)
    63      The UUID of the image to provision.
    64  
    65  * `nic` - (list of NIC blocks, Optional)
    66      NICs associated with the machine. The fields allowed in a `NIC` block are defined below.
    67  
    68  * `firewall_enabled` - (boolean)  Default: `false`
    69      Whether the cloud firewall should be enabled for this machine.
    70  
    71  * `root_authorized_keys` - (string)
    72      The public keys authorized for root access via SSH to the machine.
    73  
    74  * `user_data` - (string)
    75      Data to be copied to the machine on boot.
    76  
    77  * `user_script` - (string)
    78      The user script to run on boot (every boot on SmartMachines).
    79  
    80  * `administrator_pw` - (string)
    81      The initial password for the Administrator user. Only used for Windows virtual machines.
    82  
    83  The nested `nic` block supports the following:
    84  * `network` - (string, Optional)
    85      The network id to attach to the network interface. It will be hex, in the format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`.
    86  
    87  ## Attribute Reference
    88  
    89  The following attributes are exported:
    90  
    91  * `id` - (string) - The identifier representing the firewall rule in Triton.
    92  * `type` - (string) - The type of the machine (`smartmachine` or `virtualmachine`).
    93  * `state` - (string) - The current state of the machine.
    94  * `dataset` - (string) - The dataset URN with which the machine was provisioned.
    95  * `memory` - (int) - The amount of memory the machine has (in Mb).
    96  * `disk` - (int) - The amount of disk the machine has (in Gb).
    97  * `ips` - (list of strings) - IP addresses of the machine.
    98  * `primaryip` - (string) - The primary (public) IP address for the machine.
    99  * `created` - (string) - The time at which the machine was created.
   100  * `updated` - (string) - The time at which the machine was last updated.