From 982c6e0fa8df268e42f0a241b1532acade8a993e Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Thu, 2 Jul 2020 17:32:32 -0500 Subject: [PATCH 1/6] chore: removed project from the changelog file --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf406de2c..74bb5c466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) @@ -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) From 82e7e5b982caffbfc6bbf083cae40af313aed187 Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Thu, 2 Jul 2020 17:33:25 -0500 Subject: [PATCH 2/6] chore: updated the Readme File --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3eee45f44..6a91792b1 100644 --- a/README.md +++ b/README.md @@ -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) - | Master | Develop | @@ -93,7 +93,7 @@ The following keys can be used to configure the provider. * nutanix_subnet * nutanix_category_key * nutanix_category_value - + @@ -112,7 +112,7 @@ The following keys can be used to configure the provider. From 9329d638feb2ba676150cbd24334cf6f1f4a5ca6 Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Thu, 2 Jul 2020 17:37:19 -0500 Subject: [PATCH 3/6] website: fix the wesite --- website/docs/r/virtual_machine.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/virtual_machine.html.markdown b/website/docs/r/virtual_machine.html.markdown index cbd22a016..137200662 100644 --- a/website/docs/r/virtual_machine.html.markdown +++ b/website/docs/r/virtual_machine.html.markdown @@ -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). From d9f77f791d7c728cff278f86ac77cc5eedd975d6 Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Thu, 2 Jul 2020 17:40:13 -0500 Subject: [PATCH 4/6] chore: removed project documentation chore: move project files into the new folder future --- {nutanix => future/project}/data_source_nutanix_project.future | 0 .../project}/data_source_nutanix_project_test.future | 0 {nutanix => future/project}/data_source_nutanix_projects.future | 0 .../project}/data_source_nutanix_projects_test.future | 0 {website/docs/d => future/project}/project.html.markdown | 0 {website/docs/r => future/project}/project.markdown | 0 {website/docs/d => future/project}/projects.html.markdown | 0 {nutanix => future/project}/resource_nutanix_project.future | 0 {nutanix => future/project}/resource_nutanix_project_test.future | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename {nutanix => future/project}/data_source_nutanix_project.future (100%) rename {nutanix => future/project}/data_source_nutanix_project_test.future (100%) rename {nutanix => future/project}/data_source_nutanix_projects.future (100%) rename {nutanix => future/project}/data_source_nutanix_projects_test.future (100%) rename {website/docs/d => future/project}/project.html.markdown (100%) rename {website/docs/r => future/project}/project.markdown (100%) rename {website/docs/d => future/project}/projects.html.markdown (100%) rename {nutanix => future/project}/resource_nutanix_project.future (100%) rename {nutanix => future/project}/resource_nutanix_project_test.future (100%) diff --git a/nutanix/data_source_nutanix_project.future b/future/project/data_source_nutanix_project.future similarity index 100% rename from nutanix/data_source_nutanix_project.future rename to future/project/data_source_nutanix_project.future diff --git a/nutanix/data_source_nutanix_project_test.future b/future/project/data_source_nutanix_project_test.future similarity index 100% rename from nutanix/data_source_nutanix_project_test.future rename to future/project/data_source_nutanix_project_test.future diff --git a/nutanix/data_source_nutanix_projects.future b/future/project/data_source_nutanix_projects.future similarity index 100% rename from nutanix/data_source_nutanix_projects.future rename to future/project/data_source_nutanix_projects.future diff --git a/nutanix/data_source_nutanix_projects_test.future b/future/project/data_source_nutanix_projects_test.future similarity index 100% rename from nutanix/data_source_nutanix_projects_test.future rename to future/project/data_source_nutanix_projects_test.future diff --git a/website/docs/d/project.html.markdown b/future/project/project.html.markdown similarity index 100% rename from website/docs/d/project.html.markdown rename to future/project/project.html.markdown diff --git a/website/docs/r/project.markdown b/future/project/project.markdown similarity index 100% rename from website/docs/r/project.markdown rename to future/project/project.markdown diff --git a/website/docs/d/projects.html.markdown b/future/project/projects.html.markdown similarity index 100% rename from website/docs/d/projects.html.markdown rename to future/project/projects.html.markdown diff --git a/nutanix/resource_nutanix_project.future b/future/project/resource_nutanix_project.future similarity index 100% rename from nutanix/resource_nutanix_project.future rename to future/project/resource_nutanix_project.future diff --git a/nutanix/resource_nutanix_project_test.future b/future/project/resource_nutanix_project_test.future similarity index 100% rename from nutanix/resource_nutanix_project_test.future rename to future/project/resource_nutanix_project_test.future From 37eda28b6df762cbc1c0c688be4f8fefdd503718 Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Mon, 6 Jul 2020 09:08:58 -0500 Subject: [PATCH 5/6] chore: upated README file --- README.md | 241 +++++++++++++++++------------------------------------- 1 file changed, 77 insertions(+), 164 deletions(-) diff --git a/README.md b/README.md index 6a91792b1..250b1dabb 100644 --- a/README.md +++ b/README.md @@ -20,49 +20,9 @@ Nutanix is taking an inclusive approach to developing this new feature and welco For a slack invite, please contact terraform@nutanix.com 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 @@ -86,113 +46,110 @@ The following keys can be used to configure the provider. * **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. +```hcl +provider "nutanix" { + username = "admin" + password = "myPassword" + port = 9440 + endpoint = "10.36.7.201" + insecure = true +} +``` + ## Resources * nutanix_virtual_machine -* nutanix_image * nutanix_subnet -* nutanix_category_key +* nutanix_network_security_rule +* nutanix_image * nutanix_category_value +* 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_hots * nutanix_cluster +* nutanix_clusters +* nutanix_category_key - -## 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 terraform@nutanix.com 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 +``` + +Enter the provider directory and build the provider -#### Golang +```sh +$ make tools +$ make build +``` -[](https://github.com/golang/go) +This will create a binary file `terraform-provider-nutanix` you can copy to your terraform specific project. -## Install from source +Alternative build: with our demo -## Building from sources +```sh +$ make tools +$ go build -o examples/terraform-provider-nutanix +$ cd examples +$ terraform init #to try out our demo +``` -1. Follow [Go installation instructions](https://golang.org/doc/install) +If you need multi-OS binaries such as Linux, macOS, Windows. Run the following command. -2. Make sure that `$GOPATH` variable is set (and `$GOROOT` if necessary) +```sh +$ make tools +$ make cibuild +``` -3. Clone the repository: +This coommand will create a `pkg/` directory with all the binaries for the most popular OS. - ```bash - git clone https://github.com/terraform-providers/terraform-provider-nutanix.git $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix - ``` -4. Install [golang/dep](https://github.com/golang/dep): +### Common Issues using the development binary. - ```bash - go get -u github.com/golang/dep/cmd/dep - ``` +Terraform download the released binary instead developent one. -5. Run tests: +Just follow this steps to get the development binary: - ```bash - cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix - make test #unit tests - make testacc #acceptance tests +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/ ``` -6. Build the binary: - - ```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: @@ -234,61 +191,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 terraform@nutanix.com to gain entry. \ No newline at end of file From da1995466675b587a59de91578576365006083ec Mon Sep 17 00:00:00 2001 From: PacoDw <__pm@outlook.com> Date: Mon, 6 Jul 2020 11:29:51 -0500 Subject: [PATCH 6/6] chore: updated README by requiremts changes --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 250b1dabb..ad72e157a 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,21 @@ 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 + username = "admin" + password = "myPassword" + port = 9440 + endpoint = "10.36.7.201" + insecure = true + wait_timeout = 10 } ``` @@ -74,7 +76,7 @@ provider "nutanix" { * nutanix_network_security_rule * nutanix_image * nutanix_host -* nutanix_hots +* nutanix_hosts * nutanix_cluster * nutanix_clusters * nutanix_category_key