There's an upstream issue in the triton-go API which incorrectly updates metadata at the tags endpoint, causing the provider to create tags instead of metadata pairs. I have a triton-go PR open for addressing this issue as well as opening up the API for other metadata use cases.
Upgrading the vendored library will resolve the incorrect endpoint but I'd also like a metadata stanza itself. In a similar fashion to the tags stanza, Joyent's Triton API allows any map[string]string of JSON to be added/updated during or after an Instance is created. Subsequently, this can be used by internal processing within a live running instance. Terraform should facilitate the same functionality.
Today, this provider only allows a limited subset of metadata functionality, and none of it custom. Configuration like user_data, user_script, cloud_config, and administrator_pw, are made possible through metadata and should not change. Refactoring, however, should allow any metadata changes to occur without rebooting an instance.
Terraform Version
0.10.0+
Affected Resource(s)
triton_machine
Terraform Configuration Files
resource "triton_machine" "base" {
name = "base${count.index}"
package = "sample-512M"
image = "${data.triton_image.base.id}"
# tags are organizational in nature
tags {
version = "1.0.0"
role = "test"
}
# metadata is tied to instance/bootstrap functionality
user_script = "${file("user_script.txt")}"
metadata {
custom_defined = "anything here"
seed_token = "abcdefg1234"
}
}
Expected Behavior
I should be able to add whatever metadata pairs I like.
There's an upstream issue in the
triton-go
API which incorrectly updates metadata at the tags endpoint, causing the provider to create tags instead of metadata pairs. I have atriton-go
PR open for addressing this issue as well as opening up the API for other metadata use cases.Upgrading the vendored library will resolve the incorrect endpoint but I'd also like a
metadata
stanza itself. In a similar fashion to thetags
stanza, Joyent's Triton API allows anymap[string]string
of JSON to be added/updated during or after an Instance is created. Subsequently, this can be used by internal processing within a live running instance. Terraform should facilitate the same functionality.Today, this provider only allows a limited subset of metadata functionality, and none of it custom. Configuration like
user_data
,user_script
,cloud_config
, andadministrator_pw
, are made possible through metadata and should not change. Refactoring, however, should allow any metadata changes to occur without rebooting an instance.Terraform Version
0.10.0+
Affected Resource(s)
triton_machine
Terraform Configuration Files
Expected Behavior
Actual Behavior