-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
tags: Support tagging in datastore resources #176
Conversation
This update supports tagging in the vsphere_nas_datastore and vsphere_vmfs_datastore resources. Using the same workflows applied to the virtual machine resource. In addition to the tests supplied for the datastore resources, I've re-enabled the import test for vsphere_vmfs_datastore now that we have ImportStateIdFunc to help generate the ID.
756f3e6
to
76c3e13
Compare
Fixing small typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor things but looks good!
@@ -113,11 +131,26 @@ func resourceVSphereNasDatastoreRead(d *schema.ResourceData, meta interface{}) e | |||
return err | |||
} | |||
|
|||
// Read tags if we have the ability to do so | |||
if tagsClient, _ := meta.(*VSphereClient).TagsClient(); tagsClient != nil { | |||
if err := readTagsForResoruce(tagsClient, ds, d); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo
@@ -197,11 +216,26 @@ func resourceVSphereVmfsDatastoreRead(d *schema.ResourceData, meta interface{}) | |||
return err | |||
} | |||
|
|||
// Read tags if we have the ability to do so | |||
if tagsClient, _ := meta.(*VSphereClient).TagsClient(); tagsClient != nil { | |||
if err := readTagsForResoruce(tagsClient, ds, d); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelling here too
Thanks @mbfrahry! Merging now |
This update supports tagging in the
vsphere_nas_datastore
andvsphere_vmfs_datastore
resources. Using the same workflows applied tothe virtual machine resource.
In addition to the tests supplied for the datastore resources, I've
re-enabled the import test for
vsphere_vmfs_datastore
now that we haveImportStateIdFunc
to help generate the ID.