You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using terraform for managing a set of droplets in digital ocean.
Yesterday I introduced tags (using digitalocean_tag) and everything is working correctly.
The problem is that every time I run terraform plan (or apply) I get changes because the tags keep changing their order inside the tfstate file.
Terraform version: 0.7.3
Example of tags definition:
resource "digitalocean_tag" "staging" {
name = "staging"
}
resource "digitalocean_tag" "web" {
name = "web"
}
This is a real issue, and I think could be solved (maybe?) by sorting the tags received from DO. An even bigger issue is that it also randomly orders SSH keys if you specify multiple, which results in a droplet being destroyed & re-created for no reason other than sort order.
edit: A workaround that I'm planning is to just use one SSH key and then use Ansible or userdata on the host to add them manually, without modifying the DO metadata. Tags I can live without for now, or hack to only have one tag which can be parsed into multiple values.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 10, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm using terraform for managing a set of droplets in digital ocean.
Yesterday I introduced tags (using
digitalocean_tag
) and everything is working correctly.The problem is that every time I run
terraform plan
(orapply
) I get changes because thetags
keep changing their order inside thetfstate
file.Terraform version:
0.7.3
Example of tags definition:
Example of droplet definition
When running
terraform plan
(after I already ranterraform apply
) I get this:If I
apply
, the next time I runplan
I would get the reverse output. But it always changes.Couldn't find any open issues about this.
Any ideas?
Thanks a lot
The text was updated successfully, but these errors were encountered: