All Projects → vmware → terraform-provider-nsxt

vmware / terraform-provider-nsxt

Licence: MPL-2.0 License
Terraform VMware NSX-T provider

Programming Languages

go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to terraform-provider-nsxt

terraform-provider-ovirt
Terraform provider for oVirt 4.x
Stars: ✭ 125 (+64.47%)
Mutual labels:  terraform-provider
terraform-provider-spinnaker
Terraform Provider to manage spinnaker pipelines
Stars: ✭ 36 (-52.63%)
Mutual labels:  terraform-provider
terraform-provider-bitbucket
This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
Stars: ✭ 30 (-60.53%)
Mutual labels:  terraform-provider
terraform-provider-elasticstack
Terraform provider for Elastic Stack
Stars: ✭ 61 (-19.74%)
Mutual labels:  terraform-provider
terraform-provider-redshift
Provider for AWS Redshift entities, eg Users, Groups, Permissions, Schemas, Databases
Stars: ✭ 46 (-39.47%)
Mutual labels:  terraform-provider
terraform-provider-databricks
Terraform Databricks provider
Stars: ✭ 16 (-78.95%)
Mutual labels:  terraform-provider
terraform-provider-citrixadc
Terraform Custom Provider for Citrix ADC (formerly Citrix NetScaler)
Stars: ✭ 89 (+17.11%)
Mutual labels:  terraform-provider
terraform-provider-archive
Terraform archive provider
Stars: ✭ 54 (-28.95%)
Mutual labels:  terraform-provider
terraform-provider-jira
Terraform Provider for JIRA
Stars: ✭ 59 (-22.37%)
Mutual labels:  terraform-provider
terraform-provider-sakuracloud
Terraform provider for SakuraCloud
Stars: ✭ 46 (-39.47%)
Mutual labels:  terraform-provider
terraform-provider-panos
Terraform Panos provider
Stars: ✭ 56 (-26.32%)
Mutual labels:  terraform-provider
terraform-provider-logzio
Terraform provider for logz.io alerts, endpoints and users
Stars: ✭ 18 (-76.32%)
Mutual labels:  terraform-provider
terraform-provider-selectel
Terraform Selectel provider
Stars: ✭ 15 (-80.26%)
Mutual labels:  terraform-provider
terraform-provider-opennebula
Terraform provider for OpenNebula
Stars: ✭ 38 (-50%)
Mutual labels:  terraform-provider
terrajet
Generate Crossplane Providers from any Terraform Provider
Stars: ✭ 159 (+109.21%)
Mutual labels:  terraform-provider
terraform-provider-inwx
terraform provider for INWX
Stars: ✭ 23 (-69.74%)
Mutual labels:  terraform-provider
terraform-provider-octopus
Octopus provider for Terraform
Stars: ✭ 22 (-71.05%)
Mutual labels:  terraform-provider
terraform-provider-mongodbatlas
Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas configurations as code through HashiCorp Terraform
Stars: ✭ 125 (+64.47%)
Mutual labels:  terraform-provider
terraform-provider-kudo
Terraform provider for KUDO
Stars: ✭ 11 (-85.53%)
Mutual labels:  terraform-provider
go-namecheap-sdk
Go library for Namecheap API
Stars: ✭ 25 (-67.11%)
Mutual labels:  terraform-provider

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.0.0
on linux_amd64
+ provider registry.terraform.io/vmware/nsxt v3.2.4

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.14 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.14+ 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 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-2021 VMware, Inc. All Rights Reserved.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].