Closed jwreagor closed 7 years ago
After speaking with @jen20 (/cc @sean-) it sounds like the much simpler implementation would be to add a separate config block for CNS related tags. This would fix this issue, pair nicely with how that data is stored within triton-go
, and fix the issue of persisting CNS state to solve for #4.
resource "triton_machine" "app" {
count = "${var.machine_count}"
name = "hello-world-app-${count.index}"
package = "g4-highcpu-512M"
image = "${var.image_id}"
cns {
services = ["app", "www"]
disable = false
reverse_ptr = "app.something.com"
}
tags {
Role = "www"
Application = "Hello World"
Version = "1.0"
}
}
Proposed solution was merged in by #17.
CNS tags are handled separately from normal Instance/Machine Tags within
triton-go
. This leads to an issue where state changes are never ACK'd by the Terraform provider. TheresourceMachineUpdate
function is never able to generates an identical MD5 hash after CloudAPI has updated tags through the provider.I was able to verify the cause and come up with one possible solution for updating but not removal (can't remove CNS tags ATM). The diff is below and involves a change to
triton-go
which can probably go in with the new API.Terraform Version
0.10.0 - 0.9.8
Affected Resource(s)
triton_machine
Terraform Configuration Files
...to...
Updating between these two HCL files will cause timeouts.
Expected Behavior
Updating a
triton_machine
's tags/CNS should result in an Instance/Machine object being updated through CloudAPI and Terraform exiting properly.Actual Behavior
An update causes long timeouts to occur from not resolving state changes properly.
Steps to Reproduce
terraform plan
terraform apply
terraform plan
terraform apply
References
Inappropriately referenced this in #4. That issue is only tracking the lack of CNS tags in state file.