terraform-provider-nsxt icon indicating copy to clipboard operation
terraform-provider-nsxt copied to clipboard

Bulk import feature for nsx-t - [services and groups] into terraform

Open chanakanissanka opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

This is related to the current issue we are facing regarding imports. To give a quick update on this, we are setting up VMC on AWS and already migrated 10k+ groups + 3k+ services into NSX-T manager from on-prem ASA. Now we need to find a way to bring these objects into our terraform pipeline.

Rather than doing it one by one, import those groups and services. Is there any proposed automated way of doing it? If someone has done similar before, can we get some idea please

Describe the solution you'd like

if I import those 3k services, it will repeat this block 3k times and then add a dynamic block or something later. Please let me know if there is a better way of doing this.

The solution we would like is: Import pre-created services and groups into the Terraform pipeline without much of a hassle.

resource "nsxt_policy_service" "service_import" { display_name = "XXXXXXXXXX" #id = "aaaaaaa" #nsx_id = "bbbbbbbbb" #path = "/infra/services/cccccccc" #revision = 0

l4_port_set_entry { destination_ports = [ "2040", ] protocol = "TCP" source_ports = [] }

}

Describe alternatives you've considered

If I can get some perspective on alternatives, that would be great.

Additional context

No response

chanakanissanka avatar Dec 11 '23 21:12 chanakanissanka