From 285fee76a690c235a0c79372b1d788251bf4c30a Mon Sep 17 00:00:00 2001 From: Brian Cervenka Date: Fri, 17 Mar 2017 18:03:39 -0700 Subject: [PATCH] Under joyent/triton, the cloud-init cloud-config data actually comes out of a key called cloud-init:user-data, as opposed to to the standard user-data. This will make it possible to send the cloud-config data to triton machines. --- builtin/providers/triton/resource_machine.go | 7 +++++++ .../docs/providers/triton/r/triton_machine.html.markdown | 3 +++ 2 files changed, 10 insertions(+) diff --git a/builtin/providers/triton/resource_machine.go b/builtin/providers/triton/resource_machine.go index 2523dd5d0f58..acb37e99057f 100644 --- a/builtin/providers/triton/resource_machine.go +++ b/builtin/providers/triton/resource_machine.go @@ -25,6 +25,7 @@ var ( "user_script": "user-script", "user_data": "user-data", "administrator_pw": "administrator-pw", + "cloud_config": "cloud-init:user-data", } ) @@ -189,6 +190,12 @@ func resourceMachine() *schema.Resource { Optional: true, Computed: true, }, + "cloud_config": { + Description: "copied to machine on boot", + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "user_data": { Description: "copied to machine on boot", Type: schema.TypeString, diff --git a/website/source/docs/providers/triton/r/triton_machine.html.markdown b/website/source/docs/providers/triton/r/triton_machine.html.markdown index f7a10f2856e2..8702953001fd 100644 --- a/website/source/docs/providers/triton/r/triton_machine.html.markdown +++ b/website/source/docs/providers/triton/r/triton_machine.html.markdown @@ -61,6 +61,9 @@ The following arguments are supported: * `administrator_pw` - (string) The initial password for the Administrator user. Only used for Windows virtual machines. +* `cloud_config` - (string) + Populate the cloud-init:user-data field. Cloud config data to pass to the instance. Traditionally user-data is used, however joyent uses that key for their own purposes. At least on ubuntu cloud-init, it expects the cloud_config to be in cloud-init:user-data instead of just user-data. + 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`.