Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Readme file and changelog #154

Merged
merged 6 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- Documentations for host data sources were added [\#139](https://github.com/terraform-providers/terraform-provider-nutanix/pull/139) ([coderGo93](https://github.com/coderGo93))
- The storage_conntainer was added as a new attribute into the disk_list to reference a container in a VM [\#138](https://github.com/terraform-providers/terraform-provider-nutanix/pull/138) ([PacoDw](https://github.com/PacoDw))
- Added more information about Sysprep for install type in the documentation [\#133](https://github.com/terraform-providers/terraform-provider-nutanix/pull/133) ([coderGo93](https://github.com/coderGo93))
- Added Project resource and data sources [\#121](https://github.com/terraform-providers/terraform-provider-nutanix/pull/121) ([PacoDw](https://github.com/PacoDw))
- Added preCheck function to verify that env variables were set [\#103](https://github.com/terraform-providers/terraform-provider-nutanix/pull/103) ([PacoDw](https://github.com/PacoDw))
- Feature/cluster datasource name [\#100](https://github.com/terraform-providers/terraform-provider-nutanix/pull/100) ([yannickstruyf3](https://github.com/yannickstruyf3))

Expand Down Expand Up @@ -54,7 +53,6 @@
- Cannot use nutanix\_subnets data source [\#73](https://github.com/terraform-providers/terraform-provider-nutanix/issues/73)
- Add datasource type "hosts" for api/nutanix/v3/hosts endpoint [\#70](https://github.com/terraform-providers/terraform-provider-nutanix/issues/70)
- Using user\_data on resource.nutanix\_virtual\_machine yields immediate diff after initial apply [\#69](https://github.com/terraform-providers/terraform-provider-nutanix/issues/69)
- Project Support [\#65](https://github.com/terraform-providers/terraform-provider-nutanix/issues/65)
- Cannot list ip addresses of when creating multiple virtual machine resources [\#63](https://github.com/terraform-providers/terraform-provider-nutanix/issues/63)
- Provider needs to support data\_source\_reference attribute for nutanix\_image resource [\#52](https://github.com/terraform-providers/terraform-provider-nutanix/issues/52)
- Terraform Unable to use Provisioners in VM Resource when DHCP is used for IP Address [\#49](https://github.com/terraform-providers/terraform-provider-nutanix/issues/49)
Expand Down
255 changes: 85 additions & 170 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

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.
NOTE: The latest version of the Nutanix provider is [v1.1.0](https://github.com/terraform-providers/terraform-provider-nutanix/releases/tag/v1.1.0)

## Build, Quality Status

[![Go Report Card](https://goreportcard.com/badge/github.com/terraform-providers/terraform-provider-nutanix)](https://goreportcard.com/report/github.com/terraform-providers/terraform-provider-nutanix)
<!-- [![Maintainability](https://api.codeclimate.com/v1/badges/8b9e61df450276bbdbdb/maintainability)](https://codeclimate.com/github/nutanix/terraform-provider-nutanix/maintainability)
<!-- [![Maintainability](https://api.codeclimate.com/v1/badges/8b9e61df450276bbdbdb/maintainability)](https://codeclimate.com/github/nutanix/terraform-provider-nutanix/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/8b9e61df450276bbdbdb/test_coverage)](https://codeclimate.com/github/nutanix/terraform-provider-nutanix/test_coverage) -->

| Master | Develop |
Expand All @@ -20,49 +20,9 @@ Nutanix is taking an inclusive approach to developing this new feature and welco

For a slack invite, please contact [email protected] from your business email address, and we'll add you.

## Current Development Status

### Completed

* [x] Finished VM resource (VM resource and VM resource test.)
* [x] Finished subnet resource (Subnet resource and Subnet resource test.)
* [x] Finished Image resource (Image resource and image resource test.)
* [x] Finished VM data source (VM data source and VM data source test.)
* [x] Finished subnet data source (Subnet data source and Subnet data source test)
* [x] Finished Image data source (Image data source and image data source test.)
* [x] Cluster data source.
* [x] Clusters data source.
* [x] Virtual Machines data source.
* [x] Category keys resource.
* [x] Category values resource.
* [x] Network security rule data source.
* [x] Network security rules data source.
* [x] Subnets data source.
* [x] Images data source.
* [x] Volume group resource.
* [x] Volume group datasource.
* [x] Volume groups datasource.
* [x] Documentation for Resources.
* [x] Documentation for Datasources.

### Currently working on:
* [ ] Phase 2 scoping for bug cleanup and polish

### Issues

* See open issues on GitHub issues

## Requirements

### Provider Use

* [Terraform](https://www.terraform.io/downloads.html) 0.11.11+
* [Nutanix](https://portal.nutanix.com/#/page/home) Prism Central 5.6.0+
* Note: Nutanix Community Edition will be supported, when an AOS 5.6 based version is released

### Provider Development

* [Go](https://golang.org/doc/install) 1.11+ (to build the provider plugin)
* [Terraform](https://www.terraform.io/downloads.html) 0.12+
* [Go](https://golang.org/doc/install) 1.12+ (to build the provider plugin)

### Provider Use

Expand All @@ -80,119 +40,118 @@ Long term, once this is upstream, no pre-compiled binaries will be needed, as te

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.
* **endpoint** - (Required) IP address for the Nutanix Prism Central.
* **username** - (Required) Username for Nutanix Prism Central. 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.
* **port** - (Optional) Port for the Nutanix Prism Central. Default port is 9440.
* **insecure** - (Optional) Explicitly allow the provider to perform insecure SSL requests. If omitted, default value is false.
* **wait_timeout** - (optional) Set if you know that the creation o update of a resource may take long time (minutes).

```hcl
provider "nutanix" {
username = "admin"
password = "myPassword"
port = 9440
endpoint = "10.36.7.201"
insecure = true
wait_timeout = 10
}
```

## Resources

* nutanix_virtual_machine
* nutanix_image
* nutanix_subnet
* nutanix_category_key
* nutanix_network_security_rule
* nutanix_image
* nutanix_category_value

<!-- //To be available
* nutanix_volume_group
-->
* nutanix_category_key


## Data Sources

* nutanix_virtual_machine
* nutanix_virtual_machines
* nutanix_image
* nutanix_images
* nutanix_subnet
* nutanix_subnets
* nutanix_clusters
* nutanix_network_security_rule
* nutanix_image
* nutanix_host
* nutanix_hosts
* nutanix_cluster
* nutanix_clusters
* nutanix_category_key

<!-- To be avaiable
* nutanix_network_security_rule
* nutanix_network_security_rules
* nutanix_volume_group
* nutanix_volume_groups
-->

## Additional Resources

We've got a handful of resources outside of this repository that will help users understand the interactions between terraform and Nutanix
## Quick Install

* YouTube
_ Overview Video: [](https://www.youtube.com/watch?v=V8_Lu1mxV6g)
_ Working with images: [](https://www.youtube.com/watch?v=IW0eQevZ73I)
* Nutanix GitHub
_ [](https://github.com/terraform-providers/terraform-provider-nutanix)
_ Private repo until code goes upstream
* Jon’s GitHub
_ [](https://github.com/JonKohler/ThisOldCloud/tree/master/Terraform-Nutanix)
_ Contains sample TF’s and PDFs from the youtube videos
* Slack channel \* User community slack channel is available on nutanix.slack.com. Email [email protected] to gain entry.
### Install Dependencies

## Roadmap
* [Terraform](https://www.terraform.io/downloads.html) 0.12+

This provider will be released as Tech Preview at .NEXT New Orleans, and is linked into the HashiCorp community providers page, here: [](https://www.terraform.io/docs/providers/type/community-index.html)
### For developing or build from source

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)
* [Go](https://golang.org/doc/install) 1.12+ (to build the provider plugin)

## Quick Install

### Install Dependencies
### Building/Developing Provider

* Terraform
We recomment to use Go 1.12+ to be able to use `go modules`

### For developing or build from source
```sh
$ git clone https://github.com/terraform-providers/terraform-provider-nutanix.git
```

#### Golang
Enter the provider directory and build the provider

[](https://github.com/golang/go)
```sh
$ make tools
$ make build
```

## Install from source
This will create a binary file `terraform-provider-nutanix` you can copy to your terraform specific project.

## Building from sources
Alternative build: with our demo

1. Follow [Go installation instructions](https://golang.org/doc/install)
```sh
$ make tools
$ go build -o examples/terraform-provider-nutanix
$ cd examples
$ terraform init #to try out our demo
```

2. Make sure that `$GOPATH` variable is set (and `$GOROOT` if necessary)
If you need multi-OS binaries such as Linux, macOS, Windows. Run the following command.

3. Clone the repository:
```sh
$ make tools
$ make cibuild
```

```bash
git clone https://github.com/terraform-providers/terraform-provider-nutanix.git $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
```
This coommand will create a `pkg/` directory with all the binaries for the most popular OS.

4. Install [golang/dep](https://github.com/golang/dep):

```bash
go get -u github.com/golang/dep/cmd/dep
```
### Common Issues using the development binary.

5. Run tests:
Terraform download the released binary instead developent one.

```bash
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
make test #unit tests
make testacc #acceptance tests
```
Just follow this steps to get the development binary:

6. Build the binary:
1. Copy the development terraform binary in the root folder of the project (i.e. where your main.tf is), this should be named `terraform-provider-nutanix`
2. Remove the entire “.terraform” directory.
```sh
rm -rf .terraform/
```

```bash
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
3. Run the following command in the same folder where you have copied the development terraform binary.
```sh
terraform init -upgrade
terraform providers -version
```

4. You should see version as “nutanix (unversioned)”
5. Then run your main.tf

## Release it

1. Install `goreleaser` tool:
Expand Down Expand Up @@ -234,61 +193,17 @@ We'll be working with HashiCorp as code stabilizes to upstream this properly, at
git push origin v1.1.0
```

## Install from package

## Building/Developing Provider

We recomment to use Go 1.12+ to be able to use `go modules`

```sh
$ git clone https://github.com/terraform-providers/terraform-provider-nutanix.git
```

Enter the provider directory and build the provider

```sh
$ make tools
$ make build
```

This will create a binary file `terraform-provider-nutanix` you can copy to your terraform specific project.

Alternative build: with our demo

```sh
$ make tools
$ go build -o examples/terraform-provider-nutanix
$ cd examples
$ terraform init #to try out our demo
```

If you need multi-OS binaries such as Linux, macOS, Windows. Run the following command.

```sh
$ make tools
$ make cibuild
```

This coommand will create a `pkg/` directory with all the binaries for the most popular OS.


### Common Issues using the development binary.

Terraform download the released binary instead developent one.

Just follow this steps to get the development binary:

1. Copy the development terraform binary in the root folder of the project (i.e. where your main.tf is), this should be named `terraform-provider-nutanix`
2. Remove the entire “.terraform” directory.
```sh
rm -rf .terraform/
```
## Additional Resources

3. Run the following command in the same folder where you have copied the development terraform binary.
```sh
terraform init -upgrade
terraform providers -version
```
We've got a handful of resources outside of this repository that will help users understand the interactions between terraform and Nutanix

4. You should see version as “nutanix (unversioned)”
5. Then run your main.tf
* YouTube
_ Overview Video: [](https://www.youtube.com/watch?v=V8_Lu1mxV6g)
_ Working with images: [](https://www.youtube.com/watch?v=IW0eQevZ73I)
* Nutanix GitHub
_ [](https://github.com/terraform-providers/terraform-provider-nutanix)
_ Private repo until code goes upstream
* Jon’s GitHub
_ [](https://github.com/JonKohler/ThisOldCloud/tree/master/Terraform-Nutanix)
_ Contains sample TF’s and PDFs from the youtube videos
* Slack channel \* User community slack channel is available on nutanix.slack.com. Email [email protected] to gain entry.
File renamed without changes.
2 changes: 2 additions & 0 deletions website/docs/r/virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ The following arguments are supported:
* `boot_device_order_list`: - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.

**Important**: We are aware that is failing when put more than 2 option into the list, so for the next release it will be fixed.


* `boot_device_disk_address`: - (Optional) Address of disk to boot from.
* `boot_device_mac_address`: - (Optional) MAC address of nic to boot from.
* `hardware_clock_timezone`: - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
Expand Down