-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change pre-created object tags #170
Comments
Hi @hakkurt, can you please give an example of such pre-created tag? |
Hi. I'm trying to automate NSX-T and vanilla K8S integration via TF. There are some steps needs to tag NSX-T objects (like existing transport zones, logical ports) with_k8s-cluster1 ncp/cluster_ tag. I can tag NSX-T objects if I create them via TF but if the object is created manually, I could not find a way to tag them. |
Hi, you can import the existing logical port into terraform and then manage the tags, but this will not work with TZs since these are not offered as provider resource at this point. |
The problem is : I must know object id to use import function. Logical ports are created after VMs are connected to to logical ports. This operation is also done in my TF file. My TF files are located at https://github.com/hakkurt/Terraform/tree/master/NSXT-K8S .Could you please give me an advice on how to do that ? |
Hello Hakkurt, |
Would that work for you ? |
Hi Thomas, |
Hi @hakkurt, sounds like you need a resource similar to nsxt_vm_tags, only for port tags, to be used to tag auto-created ports. We'll look into this, thanks for reporting the need! |
Hi @hakkurt, we've added an option to set port tags via nsxt_vm_tags resource here: |
Thanks for the improvement. In fact, my request was about tagging NSX-T logical ports not VMs. Can I do following steps by using this TF resource ? Thanks |
yes, now you can use attribute logical_port_tag of nsxt_vm_tags resource, and the provider will apply these tags to logical port that corresponds to the VM |
@hakkurt sorry just to confirm - you are setting logical_port_tag (not tag) attribute on nsxt_vm_tags, with master branch of the provider? |
I used official provider. (https://www.terraform.io/docs/providers/nsxt/index.html). I believe I need to use latest code in github |
Yes, this feature is not yet released, you'll need to compile the provider from master. |
Is there any way to change pre-created NSX-T object tag via TF ?
The text was updated successfully, but these errors were encountered: