• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Go
  • License
    Mozilla Public Li...
  • Created over 6 years ago
  • Updated 23 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Terraform Provider for VMware NSX

Terraform NSX-T Provider

This is the repository for the Terraform NSX Provider, which one can use with Terraform to work with VMware NSX-T.

For general information about Terraform, visit the official website and the GitHub project page.

Documentation on the NSX platform can be found at the NSX-T Documentation page

Using the Provider

The latest version of this provider requires Terraform v0.12 or higher to run.

The VMware supported version of the provider requires NSX version 3.0.0 onwards and Terraform 0.12 onwards. Version 2.0.0 of the provider offers NSX consumption via policy APIs, which is the recommended way. Most policy resources are supported with NSX version 3.0.0 onwards, however some resources or attributes require later releases. Please refer to documentation for more details. The recommended vSphere provider to be used in conjunction with the NSX-T Terraform Provider is 1.3.3 or above.

Note that you need to run terraform init to fetch the provider before deploying.

Full Provider Documentation

The provider is documented in full on the Terraform website and can be found here. Check the provider documentation for details on entering your connection information and how to get started with writing configuration for vSphere resources.

Controlling the provider version

Note that you can also control the provider version. This requires the use of a provider block in your Terraform configuration if you have not added one already.

The syntax is as follows:

provider "nsxt" {
  version = "~> 3.2"
  ...
}

Version locking uses a pessimistic operator, so this version lock would mean anything within the 3.x namespace, including or after 3.0.0. Read more on provider version control.

Automated Installation (Recommended)

Download and initialization of Terraform providers is with the “terraform init” command. This applies to the NSX-T provider as well. Once the provider block for the NSX-T provider is specified in your .tf file, “terraform init” will detect a need for the provider and download it to your environment. You can list versions of providers installed in your environment by running “terraform version” command:

$ ./terraform version
Terraform v1.2.1
on linux_amd64
+ provider registry.terraform.io/vmware/nsxt v3.3

Manual Installation

NOTE: Unless you are developing or require a pre-release bugfix or feature, you will want to use the officially released version of the provider (see the section above).

NOTE: Recommended way to compile the provider is using Go Modules.

NOTE: For terraform 0.13, please refer to provider installation configuration in order to use custom provider.

Cloning the Project

First, you will want to clone the repository to $GOPATH/src/github.com/vmware/terraform-provider-nsxt:

mkdir -p $GOPATH/src/github.com/vmware
cd $GOPATH/src/github.com/vmware
git clone https://github.com/vmware/terraform-provider-nsxt.git

Building and Installing the Provider

Recommended golang version is go1.18 onwards. After the clone has been completed, you can enter the provider directory and build the provider.

cd $GOPATH/src/github.com/vmware/terraform-provider-nsxt
make

After the build is complete, copy the provider executable terraform-provider-nsxt into location specified in your provider installation configuration. Make sure to delete provider lock files that might exist in your working directory due to prior provider usage. Run terraform init. For developing, consider using dev overrides configuration. Please note that terraform init should not be used with dev overrides.

Developing the Provider

NOTE: Before you start work on a feature, please make sure to check the issue tracker and existing pull requests to ensure that work is not being duplicated. For further clarification, you can also ask in a new issue.

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.19+ is recommended). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

See Manual Installation for details on building the provider.

Testing the Provider

NOTE: Testing the NSX-T provider is currently a complex operation as it requires having a NSX-T manager endpoint to test against, which should be hosting a standard configuration for a NSX-T cluster. To cover Global Manager test cases, NSX-T Global Manager suite needs to be preconfigured.

Configuring Environment Variables

Most of the tests in this provider require a comprehensive list of environment variables to run. See the individual *_test.go files in the nsxt/ directory for more details, in addition to tests_utils.go for details on some tunables that can be used to specify the locations of certain pre-created resources that some tests require.

Minimum environment variable :

$ export NSXT_MANAGER_HOST="192.168.110.41"
$ export NSXT_USERNAME="admin"
$ export NSXT_PASSWORD="MyPassword123!"
$ export NSXT_ALLOW_UNVERIFIED_SSL=true

Running the Acceptance Tests

After this is done, you can run the acceptance tests by running:

$ make testacc

If you want to run against a specific set of tests, run make testacc with the TESTARGS parameter containing the run mask as per below:

make testacc TESTARGS="-run=TestAccResourceNsxtPolicyTier0Gateway"

This following example would run all of the acceptance tests matching TestAccResourceNsxtPolicyTier0Gateway. Change this for the specific tests you want to run.

Interoperability

The following versions of NSX are supported:

  • NSX-T 4.1.*
  • NSX-T 4.0.*
  • NSX-T 3.2.*
  • NSX-T 3.1.*
  • NSX-T 3.0.*
  • NSX-T 2.5.* support is limited with provider version 3.2.x and above

Some specific resources and attributed may require recent versions of NSX-T. Please refer to documentation for more details.

Support

The NSX Terraform provider is now VMware supported as well as community supported. For bugs and feature requests please open a Github Issue and label it appropriately or contact VMware support.

License

Copyright © 2015-2022 VMware, Inc. All Rights Reserved.

The NSX Terraform provider is available under MPL2.0 license.

More Repositories

1

photon

Minimal Linux container host
Python
3,017
star
2

govmomi

Go library for the VMware vSphere API
Go
2,286
star
3

open-vm-tools

Official repository of VMware open-vm-tools project
C
2,226
star
4

pyvmomi

VMware vSphere API Python Bindings
Python
2,208
star
5

differential-datalog

DDlog is a programming language for incremental computation. It is well suited for writing programs that continuously update their output in response to input changes. A DDlog programmer does not write incremental algorithms; instead they specify the desired input-output mapping in a declarative manner.
Java
1,362
star
6

pyvmomi-community-samples

A place for community contributed samples for the pyVmomi library.
Python
1,014
star
7

PowerCLI-Example-Scripts

PowerShell
753
star
8

vsphere-automation-sdk-python

Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Python
744
star
9

splinterdb

High Performance Embedded Key-Value Store
C
684
star
10

vic

vSphere Integrated Containers Engine is a container runtime for vSphere.
Go
639
star
11

burp-rest-api

REST/JSON API to the Burp Suite security tool.
Java
546
star
12

versatile-data-kit

One framework to develop, deploy and operate data workflows with Python and SQL.
Python
420
star
13

concord-bft

Concord byzantine fault tolerant state machine replication library
C++
378
star
14

chap

chap analyzes un-instrumented core files for leaks, memory growth, and corruption
C++
362
star
15

kube-fluentd-operator

Auto-configuration of Fluentd daemon-set based on Kubernetes metadata
Go
319
star
16

vsphere-automation-sdk-java

Java samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Java
208
star
17

goipmi

Go IPMI library
Go
181
star
18

vic-product

vSphere Integrated Containers enables VMware customers to deliver a production-ready container solution to their developers and DevOps teams.
RobotFramework
177
star
19

ansible-for-nsxt

Ansible delivers simple IT automation that ends repetitive tasks and frees up DevOps teams for more strategic work. This project is to enable this automation for NSX-T installation.
Python
170
star
20

mangle

Git Repository for the Mangle tool
Java
162
star
21

vmware-go-kcl

KCL Implementation in Go lang by VMware
Go
154
star
22

weathervane

Virtual-Infrastructure and Cloud Performance Benchmark
Java
153
star
23

terraform-provider-vcd

Terraform VMware Cloud Director provider
Go
147
star
24

dod-compliance-and-automation

Security hardening content for VMware solutions to US Department of Defense standards
Ruby
144
star
25

dscr-for-vmware

The Repository contains Microsoft PowerShell Desired State Configuration (DSC) Resources for managing VC and ESXi settings.
PowerShell
139
star
26

tdnf

Tiny Dandified Yum
C
115
star
27

open-vmdk

Python
113
star
28

ansible-module-vcloud-director

ansible-module-vcloud-director
Python
108
star
29

terraform-provider-vra

Terraform Provider for VMware Aria Automation
Go
101
star
30

powerclicore

PowerCLI Core Dockerfile
Dockerfile
99
star
31

load-balancer-and-ingress-services-for-kubernetes

Load Balancer and Ingress services for Kubernetes
Go
94
star
32

clarity-city

Clarity City
CSS
91
star
33

hamlet

Multi-Vendor Service Mesh Interoperation
86
star
34

go-vcloud-director

Golang SDK for VMware Cloud Director
Go
80
star
35

container-service-extension

Container Service for VMware vCloud Director
Python
78
star
36

vrealize-developer-tools

Extension for Visual Studio Code that provides code intelligence features and enables a more developer-friendly experience when creating vRealize content
TypeScript
75
star
37

flowgate

Project FlowGate is an open-source vendor-neutral project that helps enterprises integrate facility systems data and IT data to form a single holistic view of their operations. By combining these two disparate data sets into one view, data center operators/IT admins are better equipped to optimize operations which were previously impossible.
Java
73
star
38

nsx-t-datacenter-ci-pipelines

CI pipelines for VMware NSX-T Datacenter
Python
71
star
39

alb-sdk

Avi SDK and Utilities
Java
70
star
40

nsx-powerops

NSX-v Operationalization project. Automate Networking Documentation and HealthCheck.
Python
69
star
41

singleton

A service that provides support for Software Internationalization and Localization
Java
67
star
42

esx-boot

The ESXi bootloader
C
66
star
43

node-replication

An operation-log based approach for data replication.
Rust
62
star
44

data-annotator-for-machine-learning

Data annotator for machine learning allows you to centrally create, manage and administer annotation projects for machine learning
TypeScript
58
star
45

te-ns

Traffic Emulator for Network Services
C
55
star
46

go-vmware-nsxt

golang library for NSX-T REST API
Go
54
star
47

idm

51
star
48

bitfusion-with-kubernetes-integration

Bitfusion with Kubernetes Integration Support
Go
48
star
49

replay-app-for-tvos

tvOS application that converts an Apple TV into to a digital signage / kiosk
Swift
48
star
50

build-tools-for-vmware-aria

Build Tools for VMware Aria provides development and release management tools for implementing automation solutions based on the VMware Aria Suite and VMware Cloud Director. The solution enables Virtual Infrastructure Administrators and Automation Developers to use standard DevOps practices for managing and deploying content.
Java
47
star
51

photon-docker-image

Shell
45
star
52

power-validated-solutions-for-cloud-foundation

PowerShell Module for VMware Validated Solutions
PowerShell
44
star
53

nsx-alb-datascript-samples-library

DataScript Examples Library
Lua
41
star
54

go-ipfix

An ipfix library in Go
Go
39
star
55

c-rest-engine

C
39
star
56

terraform-provider-vra7

Terraform VMware vRealize Automation 7 provider - VMware has ended the active development of this Terraform Provider, so this repository will no longer be updated.
Go
39
star
57

ansible-vsphere-gos-validation

Guest OS validation test set for vSphere using Ansible
Python
38
star
58

terraform-provider-tanzu-mission-control

Terraform provider to manage resources of Tanzu Mission Control
Go
37
star
59

cluster-api-provider-cloud-director

Cluster API Provider for VMware Cloud Director. The project is an open source implementation of K8s ClusterAPI project and allows customers to provision resources directly from VMware Cloud Director. It enables Cloud Director powered Clouds to be treated as yet-another-cloud in the multi-cloud journey for VMware Cloud Providers.
Go
37
star
60

likewise-open

Likewise OSS project
C
37
star
61

harbor-boshrelease

CFF BOSH Release for Project Harbor
Shell
36
star
62

vrops-export

vRealize Operations Export Tool
Java
35
star
63

script-runtime-service-for-vsphere

The Repository contains Script Runtime Service for vSphere. A service for managing server-side PowerCLI instances to run commands and scripts against VCenter servers.
Smalltalk
35
star
64

powershell-module-for-vmware-cloud-foundation

PowerShell Module for VMware Cloud Foundation
PowerShell
34
star
65

photon-packer-templates

VMware Photon Packer Templates
HCL
33
star
66

network-config-manager

Network configuration manager is utility for easily configuring networking on a linux system
C
33
star
67

vsphere-automation-sdk-go

Go programming language SDK (Beta) for VMC. NSX-T and vSphere services will be added soon.
Go
32
star
68

terraform-provider-avi

Terraform AVI Networks provider
Go
31
star
69

nsx-container-plugin-operator

Kubernetes Operator for the NSX Container Plugin (NCP)
Go
30
star
70

nerpa

Network Programming with Relational and Procedural Abstractions (NERPA)
Rust
30
star
71

json-template-engine

This project provides implementations for the JSON template specification.
C++
30
star
72

vidm-saml-toolkit

VMware Identity Manager SAML Toolkit for Developers
Java
27
star
73

cloud-director-named-disk-csi-driver

Container Storage Interface (CSI) driver for VMware Cloud Director
Go
27
star
74

vic-ui

vSphere Integrated Containers Plug-In for vSphere Client provides information about your VIC setup and allows you to deploy VCHs directly from the vSphere Client.
TypeScript
26
star
75

terraform-provider-vmc

Terraform provider for VMware Cloud on AWS
Go
25
star
76

vsphere-guest-run

Python library for guest operations
Python
24
star
77

python-client-for-vmware-cloud-on-aws

Python Client for VMware Cloud on AWS is an open-source Python-based tool. Written in Python, the tool enables VMware Cloud on AWS users to automate the consumption of their VMware Cloud on AWS SDDC.
Python
24
star
78

vmware-openapi-generator

VMware-openapi-generator tool generates open-api documents from vapi metamodel format.
Python
23
star
79

workflowTools

Developer workflow tooling for jenkins, jira, reviewboard and git
Java
22
star
80

global-load-balancing-services-for-kubernetes

Global Load Balancing Services for Kubernetes
Go
22
star
81

nsx-advanced-load-balancer-tools

Repository to build Docker container with all Avi tools.
Dockerfile
22
star
82

vmware-go-kcl-v2

vmware-go-kcl is a vmware originated open-source project for AWS Kinesis Client Library in Go. It has been widely used by many external companies and internally by Carbon Black. vmware-go-kcl-v2 is its companion project by utilizing AWS Go SDK V2 which introduces lots of breaking changes. To keep the repo clean, it is better to have a separated repo vmware-go-kcl-v2 with better golang project structure improvement.
Go
22
star
83

vSphere-machine-learning-extension

vSphere Machine Learning Extension
Shell
21
star
84

ansible-collection-alb

VMware Advanced Load Balancer (formerly Avi) Ansible Collection
Python
20
star
85

cloud-provider-for-cloud-director

Kubernetes External Cloud Provider for VMware Cloud Director
Go
20
star
86

crest

Crest machine learning based automated accessibility tests
Python
20
star
87

network-event-broker

manages network configuration
Go
19
star
88

vra-sdk-go

VMware vRealize Automation SDK for Go
Python
19
star
89

terraform-provider-vcf

Terraform Provider for VMware Cloud Foundation
Go
19
star
90

django-yamlconf

Django settings values via external YAML formatted files simplifying the c onfiguration of Django applications
Python
19
star
91

kernel-event-collector-module

This is the Linux kernel module event collector for the Carbon Black Cloud.
C
18
star
92

cloud-director-extension-standard-library

Standard Library for VMware Cloud Director solutions add-ons and add-on elements.
TypeScript
18
star
93

upgrade-framework

A product-agnostic framework for defining and sequencing upgrades
Java
17
star
94

powershell-module-for-vmware-cloud-foundation-reporting

PowerShell Module for VMware Cloud Foundation Reporting
PowerShell
17
star
95

nsx-integration-for-openshift

NSX-T deployment playbooks for Openshift integration
Python
16
star
96

virtual-disks

Go Library for Virtual Disk Development Kit
Go
16
star
97

database-stream-processor-compiler

Infrastructure to run programs written in high-level languages on top of the Database Stream Processor (DBSP) runtime.
Rust
16
star
98

pmd

Photon Management Daemon
Go
15
star
99

antrea-operator-for-kubernetes

Antrea Operator for Kubernetes deployments
Go
15
star
100

vsan-integration-for-prometheus

vSAN Integration for Prometheus: making it easier using Prometheus to monitor vSAN performance
Python
15
star