Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to send cloud-init user-data to triton machines #12840

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions builtin/providers/triton/resource_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var (
"user_script": "user-script",
"user_data": "user-data",
"administrator_pw": "administrator-pw",
"cloud_config": "cloud-init:user-data",
}
)

Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down