Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Not defining tags attribute should not trigger change #25

Closed
landro opened this issue Dec 19, 2017 · 10 comments
Closed

Not defining tags attribute should not trigger change #25

landro opened this issue Dec 19, 2017 · 10 comments
Labels

Comments

@landro
Copy link

landro commented Dec 19, 2017

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

➜ digi_opstest git:(master) terraform --version
Terraform v0.11.1

  • provider.aws v1.6.0
  • provider.cloudstack v0.1.2

Affected Resource(s)

Please list the resources as a list, for example:

  • cloudstack_instance and all others that have tag support it appears

Terraform Configuration Files

resource "cloudstack_instance" "ssh" {
  name             = "whatever"
  service_offering = "whatever"
  network_id       = "whatever"
  template         = "whatever"
  zone             = "whatever"

  #tags = {
  #  
  #}

}

Debug Output

~ cloudstack_instance.ssh
tags.%: "" =>

Expected Behavior

Upgrading terraform provider version to 0.1.2 on existing infrastructure should not trigger change for optional tags attribute

Actual Behavior

Running apply without defining tags, triggers change. Even after aplying change, rerunning plan/apply will trigger change.

svanharmelen pushed a commit that referenced this issue Dec 19, 2017
Setting, reading and updating tags was not implemented correctly, so this needed some TLC to make it work as expected.
svanharmelen pushed a commit that referenced this issue Dec 19, 2017
Setting, reading and updating tags was not implemented correctly, so this needed some TLC to make it work as expected.
svanharmelen pushed a commit that referenced this issue Dec 20, 2017
Setting, reading and updating tags was not implemented correctly, so this needed some TLC to make it work as expected.
@svanharmelen
Copy link
Member

Hi @landro,

Thanks for the report! The problem should be fixed in master now. I'll poke our HashiCorp friends to see if we can create a new release to fix this problem...

Cheers!

@svanharmelen
Copy link
Member

@landro a new build is currently being released, so you can update and retry in a bit...

@landro
Copy link
Author

landro commented Dec 20, 2017 via email

@landro
Copy link
Author

landro commented Dec 22, 2017

works like a charm! Thanks again, @svanharmelen !

@landro
Copy link
Author

landro commented Dec 22, 2017

Just ran in to a related issue this afternoon using the new version of the provider.
CloudStack API error 431 (CSExceptionErrorCode: 9999): Unable to execute API command createtags due to missing parameter tags.
Issue occured when I tainted an existing instance that didnt't have tags, and recreated it.

@svanharmelen
Copy link
Member

Hmm... Thanks, I’ll have a look later today...

@svanharmelen svanharmelen reopened this Dec 23, 2017
@svanharmelen
Copy link
Member

@landro the problem was a bad check to determine if tags should be set. This is not fixed in PR #29...

@svanharmelen
Copy link
Member

@landro version 0.1.4 containing this fix is just released, so it should be available for download...

@landro
Copy link
Author

landro commented Jan 26, 2018

Have been using 0.1.4 for a few days now. Works as expected! Thanks!

@svanharmelen
Copy link
Member

Glad to hear that. Thanks for the update @landro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants