Code Monkey home page Code Monkey logo

Comments (15)

annakhm avatar annakhm commented on August 14, 2024

Hi @hakkurt, can you please give an example of such pre-created tag?

from terraform-provider-nsxt.

hakkurt avatar hakkurt commented on August 14, 2024

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.

from terraform-provider-nsxt.

annakhm avatar annakhm commented on August 14, 2024

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.

from terraform-provider-nsxt.

hakkurt avatar hakkurt commented on August 14, 2024

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 ?

from terraform-provider-nsxt.

tvigneron avatar tvigneron commented on August 14, 2024

Hello Hakkurt,
A solution I see would be to tag your VMs and use Apply To (by Logical Switch for instance) on the Distributed Firewall.
This way you'll be able to achieve the same result but will not have wait to know port object id.

from terraform-provider-nsxt.

tvigneron avatar tvigneron commented on August 14, 2024

Would that work for you ?

from terraform-provider-nsxt.

hakkurt avatar hakkurt commented on August 14, 2024

Hi Thomas,
Actually I'm trying to tag logical ports for K8S NCP integration. To be honest, I could not get how tagging VMs will help to achieve this :)

from terraform-provider-nsxt.

annakhm avatar annakhm commented on August 14, 2024

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!

from terraform-provider-nsxt.

annakhm avatar annakhm commented on August 14, 2024

Hi @hakkurt, we've added an option to set port tags via nsxt_vm_tags resource here:
https://github.com/terraform-providers/terraform-provider-nsxt/pull/171
Pls let us know if this works for you! Thanks

from terraform-provider-nsxt.

hakkurt avatar hakkurt commented on August 14, 2024

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 ?
https://github.com/dumlutimuralp/nsx-t-k8s/blob/master/Part%203/README.md#tagging-nsx-t-objects-for-k8s

Thanks

from terraform-provider-nsxt.

annakhm avatar annakhm commented on August 14, 2024

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

from terraform-provider-nsxt.

hakkurt avatar hakkurt commented on August 14, 2024

I have just tested. Its tagging VM itself not Logical ports. Pls see screenshoots

1

2

from terraform-provider-nsxt.

annakhm avatar annakhm commented on August 14, 2024

@hakkurt sorry just to confirm - you are setting logical_port_tag (not tag) attribute on nsxt_vm_tags, with master branch of the provider?

from terraform-provider-nsxt.

hakkurt avatar hakkurt commented on August 14, 2024

I used official provider. (https://www.terraform.io/docs/providers/nsxt/index.html). I believe I need to use latest code in github

from terraform-provider-nsxt.

annakhm avatar annakhm commented on August 14, 2024

Yes, this feature is not yet released, you'll need to compile the provider from master.

from terraform-provider-nsxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.