Terraform Nutanix Provider
Terraform provider plugin to integrate with Nutanix Enterprise Cloud
NOTE: terraform-provider-nutanix is currently tech preview as of 9 May 2018. See "Current Development Status" below.
Build, Quality Status
Nutanix is taking an inclusive approach to developing this new feature and welcomes customer feedback. Please see our development project on GitHub (you're here!), comment on requirements, design, code, and/or feel free to join us on Slack. Instructions on commenting, contributing, and joining our community Slack channel are all located within our GitHub Readme.
For a slack invite, please contact firstname.lastname@example.org from your business email address, and we'll add you.
Current Development Status
- Finished VM resource (VM resource and VM resource test.)
- Finished subnet resource (Subnet resource and Subnet resource test.)
- Finished Image resource (Image resource and image resource test.)
- Finished VM data source (VM data source and VM data source test.)
- Finished subnet data source (Subnet data source and Subnet data source test)
- Finished Image data source (Image data source and image data source test.)
- Cluster data source.
- Clusters data source.
- Virtual Machines data source.
- Category keys resource.
- Category values resource.
- Network security rule data source.
- Network security rules data source.
- Subnets data source.
- Images data source.
- Volume group resource.
- Volume group datasource.
- Volume groups datasource.
- Documentation for Resources.
- Documentation for Datasources.
Currently working on:
- Phase 2 scoping for bug cleanup and polish
- See open issues on GitHub issues
- Terraform 0.11.11+
- Nutanix Prism Central 5.6.0+
- Note: Nutanix Community Edition will be supported, when an AOS 5.6 based version is released
- Go 1.11+ (to build the provider plugin)
The Terraform Nutanix provider is designed to work with Nutanix Prism Central, such that you can manage one or more Prism Element clusters at scale. AOS/PC 5.6.0 or higher is required, as this Provider makes exclusive use of the v3 APIs
See the Examples folder for a handful of main.tf demos as well as some pre-compiled binaries.
We'll be refreshing these examples and binaries as we work through tech preview.
Long term, once this is upstream, no pre-compiled binaries will be needed, as terraform will automatically download on use.
The following keys can be used to configure the provider.
- endpoint - (Required) IP address for the Nutanix Prism Element.
- username - (Required) Username for Nutanix Prism Element. Could be local cluster auth (e.g.
auth) or directory auth.
- password - (Required) Password for the provided username.
- port - (Optional) Port for the Nutanix Prism Element. Default port is 9440.
- insecure - (Optional) Explicitly allow the provider to perform insecure SSL requests. If omitted, default value is false.
We've got a handful of resources outside of this repository that will help users understand the interactions between terraform and Nutanix
- YouTube _ Overview Video: _ Working with images:
- Nutanix GitHub _ _ Private repo until code goes upstream
- Jon’s GitHub _ _ Contains sample TF’s and PDFs from the youtube videos
- Slack channel * User community slack channel is available on nutanix.slack.com. Email email@example.com to gain entry.
We'll be working with HashiCorp as code stabilizes to upstream this properly, at which time we'll PR this entire plugin to the terraform providers org.
- Complete upstream work with successful pull request
- Note: Depending on external review timelines from HashiCorp and subsequent code change(s) as required
- Add Volume Group resource and data source support * This is dependent on the VG v3 API, which is currently not GA (work in progress)
- Investigate data protection workflows (likely scoped snapshots, but this may directly conflict with overall pets v cattle)
- Investigate project as a resource and data source, for SSP integration
- Investigate Calm once API constructs are available
- Investigate AFS administration workflows
- Investigate cluster administration APIs (think foundation, admin settings, etc) to do physical provisioning (think DC as Code)
For developing or build from source
Install from source
Building from sources
Follow Go installation instructions
Make sure that
$GOPATHvariable is set (and
Clone the repository:
git clone https://github.com/terraform-providers/terraform-provider-nutanix.git $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
go get -u github.com/golang/dep/cmd/dep
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix make test #unit tests make testacc #acceptance tests
Build the binary:
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix make cibuild #it will create a pkg folder with the binaries for all OS including linux, windows, macOS
go get -v github.com/goreleaser/goreleaser cd $GOPATH/src/github.com/goreleaser/goreleaser go install
Alternatively you can download a latest release from goreleaser Releases Page
Clean up folder
Make sure that the repository state is clean:
Tag the release:
git tag v1.1.0
cd (TODO: go dir) goreleaser --skip-publish v1.1.0
Check builds inside
(TODO: build dir)directory.
Publish release tag to GitHub:
git push origin v1.1.0
Install from package
Clone repository to:
$ mkdir $GOPATH/src/github.com/terraform-providers && cd "$_" #if you already created it only change directory $ git clone https://github.com/terraform-providers/terraform-provider-nutanix.git
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix $ make deps $ make build
This will create a binary file
terraform-provider-nutanix you can copy to your terraform specific project.
Alternative build: with our demo
$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix $ make deps $ go build -o examples/terraform-provider-nutanix $ cd examples $ terraform init #to try out our demo