- Notifications
You must be signed in to change notification settings - Fork2
Terraform Provider for VMware NSX VPC
License
vmware-archive/terraform-provider-nsxt-virtual-private-cloud
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Important
This project has been archived.
As the project is now archived, there will be no further updates or activemaintenance for this Terraform provider.
Please transition to using the NSX VPC capabilities introduced in theTerraform Provider for VMware NSX.
This is the repository for VMware's NSX-T Virtual Private Cloud Terraform Provider, which one can use withTerraform to work withVMware NSX-T.
For general information about Terraform, visit theofficialwebsite and theGitHub project page.
Documentation on the NSX platform can be found at theNSX-T Documentation page
The latest version of this provider requires Terraform v0.12 or higher to run.
Note that you need to runterraform init to fetch the provider beforedeploying.
The provider is documented in full on the Terraform website and can be foundhere. Check the provider documentation for details on entering your connection information and how to get started with writing configuration for policy resources.
Note that you can also control the provider version. This requires the use of aprovider block in your Terraform configuration if you have not added one already.
The syntax is as follows:
provider"nsxt" {version="~> 1.0.0"...}
Read more on provider version control.
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 versionTerraform v1.2.1on linux_amd64+ provider registry.terraform.io/vmware/nsxt-vpc v1.0.0
NOTE: Unless you aredeveloping or require apre-release bugfix or feature, you will want to use the officially releasedversion of the provider (seethe section above).
NOTE: Recommended way to compile the provider is usingGo Modules.
NOTE: For terraform 0.13, please refer toprovider installation configuration in order to use custom provider.
First, you will want to clone the repository to$GOPATH/src/github.com/vmware/terraform-provider-nsxt-virtual-private-cloud:
mkdir -p$GOPATH/src/github.com/vmwarecd$GOPATH/src/github.com/vmwaregit clone https://github.com/vmware/terraform-provider-nsxt-virtual-private-cloud.git
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-virtual-private-cloudmake
After the build is complete, copy the provider executableterraform-provider-nsxt-virtual-private-cloud 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. Runterraform init.For developing, consider usingdev overrides configuration. Please note thatterraform init should not be used with dev overrides.
If you wish to work on the provider, you'll first needGoinstalled on your machine (version 1.14+ is recommended). You'll also need tocorrectly setup aGOPATH, as well as adding$GOPATH/bin to your$PATH.
SeeManual Installation for details on building theprovider.
Note: The files with filename starting with 'custom_' prefix are manually maintained files.Other files in 'nsxt' and 'website' directories are autogenerated by NSX build system. Please do not edit them.
NOTE: Testing the NSX-T provider is currently a complex operation as itrequires having a NSX-T manager endpoint to test against, which should behosting a standard configuration for a NSX-T cluster.
Most of the tests in this provider require a comprehensive list of environmentvariables to run. See the individual*_test.go files in thensxt/directory for more details on the tunables that can beused to specify the locations of certain pre-created resources that the testsrequire.
Minimum environment variable :
$export NSXT_MANAGER_HOST="10.191.155.100"$export NSXT_USERNAME="admin"$export NSXT_PASSWORD="r6.Or#F_z_.F"$export NSXT_ORG="org-1"$export NSXT_PROJECT="custom-project-1"$export NSXT_VPC="vpc-1"$export NSXT_ALLOW_UNVERIFIED_SSL=true
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, runmake testacc with theTESTARGS parameter containing the run mask as per below:
make testacc TESTARGS="-run=TestNSXTStaticRoutesBasic"This following example would run all of the acceptance tests matchingTestNSXTStaticRoutesBasic. Change this for the specific tests you wantto run.
The following versions of NSX are supported:
- NSX-T 4.1.2
The NSX Virtual Private Cloud 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.
Copyright © 2022-2023 VMware, Inc. All Rights Reserved.
The NSX VPC Terraform provider is available underMPL2.0 license.
About
Terraform Provider for VMware NSX VPC
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.