From 34a2943495471d4d653a34fd40a8e0498fde1c56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 04:20:54 +0000 Subject: [PATCH 01/67] chore(deps): bump github/codeql-action from 2.21.1 to 2.21.2 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.1 to 2.21.2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/6ca1aa8c195c3ca3e77c174fe0356db1bce3b319...0ba4244466797eb048eb91a6cd43d5c03ca8bd05) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f1f0e3740..97195a12c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,10 +21,10 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Initialize CodeQL - uses: github/codeql-action/init@6ca1aa8c195c3ca3e77c174fe0356db1bce3b319 # v2.21.1 + uses: github/codeql-action/init@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 with: languages: '${{ matrix.language }}' - name: Autobuild - uses: github/codeql-action/autobuild@6ca1aa8c195c3ca3e77c174fe0356db1bce3b319 # v2.21.1 + uses: github/codeql-action/autobuild@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6ca1aa8c195c3ca3e77c174fe0356db1bce3b319 # v2.21.1 + uses: github/codeql-action/analyze@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 From f553ec02b3a804460c88233b65edb9309bae42ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Jun 2023 04:33:38 +0000 Subject: [PATCH 02/67] chore(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.26.1 to 2.27.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.26.1...v2.27.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 48 +++++----- go.sum | 286 +++++++++++++-------------------------------------------- 2 files changed, 90 insertions(+), 244 deletions(-) diff --git a/go.mod b/go.mod index de8a05db8..9fa13205c 100644 --- a/go.mod +++ b/go.mod @@ -4,35 +4,37 @@ go 1.18 require ( github.com/davecgh/go-spew v1.1.1 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 github.com/mitchellh/copystructure v1.2.0 github.com/vmware/govmomi v0.30.4 ) require ( + github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/cloudflare/circl v1.3.3 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.4.0 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.8 // indirect + github.com/hashicorp/go-plugin v1.4.10 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.5.0 // indirect - github.com/hashicorp/hcl/v2 v2.16.2 // indirect + github.com/hashicorp/hc-install v0.5.2 // indirect + github.com/hashicorp/hcl/v2 v2.17.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.18.1 // indirect - github.com/hashicorp/terraform-json v0.16.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect - github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect - github.com/hashicorp/terraform-registry-address v0.1.0 // indirect - github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect + github.com/hashicorp/terraform-json v0.17.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.16.0 // indirect + github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.1 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect @@ -43,16 +45,16 @@ require ( github.com/oklog/run v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect - github.com/zclconf/go-cty v1.13.1 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect - google.golang.org/appengine v1.6.6 // indirect - google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect - google.golang.org/grpc v1.51.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/zclconf/go-cty v1.13.2 // indirect + golang.org/x/crypto v0.10.0 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.11.0 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + google.golang.org/grpc v1.56.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect ) diff --git a/go.sum b/go.sum index c25d425b1..365a85fb0 100644 --- a/go.sum +++ b/go.sum @@ -1,335 +1,179 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dougm/pretty v0.0.0-20171025230240-2ee9d7453c02 h1:tR3jsKPiO/mb6ntzk/dJlHZtm37CPfVp1C9KIo534+4= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= +github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= -github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= -github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= +github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.5.0 h1:D9bl4KayIYKEeJ4vUDe9L5huqxZXczKaykSRcmQ0xY0= -github.com/hashicorp/hc-install v0.5.0/go.mod h1:JyzMfbzfSBSjoDCRPna1vi/24BEDxFaCPfdHtM5SCdo= -github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= -github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= +github.com/hashicorp/hc-install v0.5.2 h1:SfwMFnEXVVirpwkDuSF5kymUOhrUxrTq3udEseZdOD0= +github.com/hashicorp/hc-install v0.5.2/go.mod h1:9QISwe6newMWIfEiXpzuu1k9HAGtQYgnSH8H9T8wmoI= +github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= +github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4= github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= -github.com/hashicorp/terraform-json v0.16.0 h1:UKkeWRWb23do5LNAFlh/K3N0ymn1qTOO8c+85Albo3s= -github.com/hashicorp/terraform-json v0.16.0/go.mod h1:v0Ufk9jJnk6tcIZvScHvetlKfiNTC+WS21mnXIlc0B0= -github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= -github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= -github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= -github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= -github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= -github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= +github.com/hashicorp/terraform-json v0.17.0 h1:EiA1Wp07nknYQAiv+jIt4dX4Cq5crgP+TsTE45MjMmM= +github.com/hashicorp/terraform-json v0.17.0/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-go v0.16.0 h1:DSOQ0rz5FUiVO4NUzMs8ln9gsPgHMTsfns7Nk+6gPuE= +github.com/hashicorp/terraform-plugin-go v0.16.0/go.mod h1:4sn8bFuDbt+2+Yztt35IbOrvZc0zyEi87gJzsTgCES8= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 h1:I8efBnjuDrgPjNF1MEypHy48VgcTIUY4X6rOFunrR3Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0/go.mod h1:cUEP4ly/nxlHy5HzD6YRrHydtlheGvGRJDhiWqqVik4= +github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM= +github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/vmware/govmomi v0.30.4 h1:BCKLoTmiBYRuplv3GxKEMBLtBaJm8PA56vo9bddIpYQ= github.com/vmware/govmomi v0.30.4/go.mod h1:F7adsVewLNHsW/IIm7ziFURaXDaHEwcc+ym4r3INMdY= -github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= -github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= +github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d h1:92D1fum1bJLKSdr11OJ+54YeCMCGYIygTA7R/YZxH5M= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE= +google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 25defcf3f03b95cfac215f4a21974692c462ce89 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 2 Aug 2023 15:41:43 -0400 Subject: [PATCH 03/67] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01b6317d8..13e1e1f93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 2.5.0 (Unreleased) +CHORES: +* Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) + ## 2.4.1 (June 26, 2023) BUG FIXES: From 9a14cb6b286bb70c952411ceb83c92449a6cff2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 19:40:18 +0000 Subject: [PATCH 04/67] chore(deps): bump github.com/vmware/govmomi from 0.30.4 to 0.30.6 Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.30.4 to 0.30.6. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.30.4...v0.30.6) --- updated-dependencies: - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9fa13205c..91521f4ca 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 github.com/mitchellh/copystructure v1.2.0 - github.com/vmware/govmomi v0.30.4 + github.com/vmware/govmomi v0.30.6 ) require ( diff --git a/go.sum b/go.sum index 365a85fb0..ab8b2a1a7 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/vmware/govmomi v0.30.4 h1:BCKLoTmiBYRuplv3GxKEMBLtBaJm8PA56vo9bddIpYQ= -github.com/vmware/govmomi v0.30.4/go.mod h1:F7adsVewLNHsW/IIm7ziFURaXDaHEwcc+ym4r3INMdY= +github.com/vmware/govmomi v0.30.6 h1:O3tjSwQBy0XwI5uK1/yVIfQ1LP9bAECEDUfifnyGs9U= +github.com/vmware/govmomi v0.30.6/go.mod h1:epgoslm97rLECMV4D+08ORzUBEU7boFSepKjt7AYVGg= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= From a4bceb3897d652f552f717d901329aedcd875a4a Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 2 Aug 2023 17:08:45 -0400 Subject: [PATCH 05/67] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13e1e1f93..47161558a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ CHORES: * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) +* Update govmomi v0.30.6 ([#1952](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1952)) ## 2.4.1 (June 26, 2023) From b0e4e398c1fa72a6d341f2ce31f03d71ea875f2f Mon Sep 17 00:00:00 2001 From: Nikola Klinkachev Date: Tue, 1 Aug 2023 10:01:46 +0300 Subject: [PATCH 06/67] Fix for https://github.com/hashicorp/terraform-provider-vsphere/issues/1939 Supported guest OS are dependent on the VM hardware version. Changed querying the OS Family when deploying a VM from template to read the template hardware version instead of using the server default version. --- .../helper/computeresource/compute_resource_helper.go | 4 ++-- .../internal/helper/envbrowse/environment_browser_helper.go | 3 ++- vsphere/internal/helper/resourcepool/resource_pool_helper.go | 4 ++-- .../internal/vmworkflow/virtual_machine_clone_subresource.go | 2 +- vsphere/resource_vsphere_virtual_machine.go | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/vsphere/internal/helper/computeresource/compute_resource_helper.go b/vsphere/internal/helper/computeresource/compute_resource_helper.go index d729792fc..36bcb7931 100644 --- a/vsphere/internal/helper/computeresource/compute_resource_helper.go +++ b/vsphere/internal/helper/computeresource/compute_resource_helper.go @@ -169,14 +169,14 @@ func DefaultDevicesFromReference(client *govmomi.Client, ref types.ManagedObject // OSFamily uses the compute resource's environment browser to get the OS family // for a specific guest ID. -func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string) (string, error) { +func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string, hardwareVersion string) (string, error) { b, err := EnvironmentBrowserFromReference(client, ref) if err != nil { return "", err } ctx, cancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout) defer cancel() - return b.OSFamily(ctx, guest) + return b.OSFamily(ctx, guest, hardwareVersion) } // EnvironmentBrowserFromReference loads an environment browser for the diff --git a/vsphere/internal/helper/envbrowse/environment_browser_helper.go b/vsphere/internal/helper/envbrowse/environment_browser_helper.go index 2299f35cc..e873c0f8e 100644 --- a/vsphere/internal/helper/envbrowse/environment_browser_helper.go +++ b/vsphere/internal/helper/envbrowse/environment_browser_helper.go @@ -72,7 +72,7 @@ func (b *EnvironmentBrowser) DefaultDevices(ctx context.Context, key string, hos } // OSFamily fetches the operating system family for the supplied guest ID. -func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string, error) { +func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwareVersion string) (string, error) { var eb mo.EnvironmentBrowser err := b.Properties(ctx, b.Reference(), nil, &eb) @@ -84,6 +84,7 @@ func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string This: b.Reference(), Spec: &types.EnvironmentBrowserConfigOptionQuerySpec{ GuestId: []string{guest}, + Key: hardwareVersion, }, } res, err := methods.QueryConfigOptionEx(ctx, b.Client(), &req) diff --git a/vsphere/internal/helper/resourcepool/resource_pool_helper.go b/vsphere/internal/helper/resourcepool/resource_pool_helper.go index 99b87e748..c071daee9 100644 --- a/vsphere/internal/helper/resourcepool/resource_pool_helper.go +++ b/vsphere/internal/helper/resourcepool/resource_pool_helper.go @@ -153,13 +153,13 @@ func DefaultDevices(client *govmomi.Client, pool *object.ResourcePool, guest str // OSFamily uses the resource pool's environment browser to get the OS family // for a specific guest ID. -func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string) (string, error) { +func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string, hardwareVersion string) (string, error) { log.Printf("[DEBUG] Looking for OS family for guest ID %q", guest) pprops, err := Properties(pool) if err != nil { return "", err } - return computeresource.OSFamily(client, pprops.Owner, guest) + return computeresource.OSFamily(client, pprops.Owner, guest, hardwareVersion) } // Create creates a ResourcePool. diff --git a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go index 5092673e7..6ae960bf2 100644 --- a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go +++ b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go @@ -128,7 +128,7 @@ func ValidateVirtualMachineClone(d *schema.ResourceDiff, c *govmomi.Client) erro if err != nil { return fmt.Errorf("could not find resource pool ID %q: %s", poolID, err) } - family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string)) + family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } diff --git a/vsphere/resource_vsphere_virtual_machine.go b/vsphere/resource_vsphere_virtual_machine.go index f304fb4c7..f6341000a 100644 --- a/vsphere/resource_vsphere_virtual_machine.go +++ b/vsphere/resource_vsphere_virtual_machine.go @@ -1641,7 +1641,7 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta var cw *virtualMachineCustomizationWaiter // Send customization spec if any has been defined. if len(d.Get("clone.0.customize").([]interface{})) > 0 { - family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string)) + family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } From 39d80f2d7ecde7769fa27f1768e371052e153d2a Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 3 Aug 2023 16:31:17 -0400 Subject: [PATCH 07/67] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47161558a..82d687794 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 2.5.0 (Unreleased) +BUG FIXES: +* `r/virtual_machine`: Fix for guest os support ([#1966](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1966)) + CHORES: * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) * Update govmomi v0.30.6 ([#1952](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1952)) @@ -7,7 +10,7 @@ CHORES: ## 2.4.1 (June 26, 2023) BUG FIXES: -* `r/vsphere_compute_cluster`: Added version check for [vSphere 7.0.1 or later](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-9113BBD6-5428-4287-9F61-C8C3EE51E07E.html) when enabling vSAN HCI Mesh. ([#1931](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1931)) +* `r/compute_cluster`: Added version check for [vSphere 7.0.1 or later](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-9113BBD6-5428-4287-9F61-C8C3EE51E07E.html) when enabling vSAN HCI Mesh. ([#1931](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1931)) ## 2.4.0 (May 5, 2023) From 37531754f5809cd16ce96f326e3991ec77e8c09e Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 3 Aug 2023 20:36:08 -0400 Subject: [PATCH 08/67] Add script to check regression from previous day --- .github/workflows/acceptance-tests.yaml | 24 +++++++++++-- scripts/compare-testlogs.js | 45 +++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 scripts/compare-testlogs.js diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 78c923a1c..92a825310 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -70,17 +70,37 @@ jobs: run: go mod verify - name: Run acceptance tests + continue-on-error: true run: | set -euo pipefail TF_ACC=1 go test -json -v ./... -timeout 360m 2>&1 | tee /tmp/gotest.log | gotestfmt + + - name: Get today's date + run: echo "TODAY_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Upload test log uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - if: always() with: - name: test-log + name: test-log-${{ env.TODAY_DATE }} path: /tmp/gotest.log + - name: Get yesterday's date + run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV + + - name: Download previous day's log file + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: test-log-${{ env.YESTERDAY_DATE }} + path: /tmp/yesterday + + - name: Set up Node + uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 + with: + node-version: 18 + + - name: Run comparison script + run: node ./scripts/compare-testlogs.js /tmp/gotest.log /tmp/yesterday/gotest.log + - name: Cleanup testrun resources if: always() run: | diff --git a/scripts/compare-testlogs.js b/scripts/compare-testlogs.js new file mode 100644 index 000000000..c166bba07 --- /dev/null +++ b/scripts/compare-testlogs.js @@ -0,0 +1,45 @@ +const fs = require('fs'); + +function compareTestResults(outputA, outputB) { + // Split by newline, parse each JSON object, and filter out lines that don't parse + const resultsA = outputA.split('\n').map(line => { + try { + return JSON.parse(line); + } catch (e) { + return null; + } + }).filter(result => result !== null); + + const resultsB = outputB.split('\n').map(line => { + try { + return JSON.parse(line); + } catch (e) { + return null; + } + }).filter(result => result !== null); + + // Extract test results + const testsA = resultsA.filter(test => test.Test && ["pass", "fail"].includes(test.Action)) + .reduce((obj, test) => ({ ...obj, [test.Test]: test.Action }), {}); + const testsB = resultsB.filter(test => test.Test && ["pass", "fail"].includes(test.Action)) + .reduce((obj, test) => ({ ...obj, [test.Test]: test.Action }), {}); + + // Finding tests that failed in A but not in B + const failedInANotInB = Object.keys(testsA).filter(test => testsA[test] === "fail" && testsB[test] !== "fail"); + + return failedInANotInB; +} + +const filenameA = process.argv[2]; +const filenameB = process.argv[3]; + +if (!filenameA || !filenameB) { + console.log("Please provide filenames for both outputs as arguments."); + process.exit(1); +} + +const outputA = fs.readFileSync(filenameA, 'utf8'); +const outputB = fs.readFileSync(filenameB, 'utf8'); + +const failedTests = compareTestResults(outputA, outputB); +console.log(`Tests failed in ${filenameA} that didn't fail in ${filenameB}:`, failedTests); From 1c9cf94fd821e304eec7033d580cd2efd9f3cb9b Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 4 Aug 2023 16:21:37 -0400 Subject: [PATCH 09/67] Revert "Fix for https://github.com/hashicorp/terraform-provider-vsphere/issues/1939 Supported guest OS are dependent on the VM hardware version. Changed querying the OS Family when deploying a VM from template to read the template hardware version instead of using the server default version." This reverts commit b0e4e398c1fa72a6d341f2ce31f03d71ea875f2f. --- .../helper/computeresource/compute_resource_helper.go | 4 ++-- .../internal/helper/envbrowse/environment_browser_helper.go | 3 +-- vsphere/internal/helper/resourcepool/resource_pool_helper.go | 4 ++-- .../internal/vmworkflow/virtual_machine_clone_subresource.go | 2 +- vsphere/resource_vsphere_virtual_machine.go | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/vsphere/internal/helper/computeresource/compute_resource_helper.go b/vsphere/internal/helper/computeresource/compute_resource_helper.go index 36bcb7931..d729792fc 100644 --- a/vsphere/internal/helper/computeresource/compute_resource_helper.go +++ b/vsphere/internal/helper/computeresource/compute_resource_helper.go @@ -169,14 +169,14 @@ func DefaultDevicesFromReference(client *govmomi.Client, ref types.ManagedObject // OSFamily uses the compute resource's environment browser to get the OS family // for a specific guest ID. -func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string, hardwareVersion string) (string, error) { +func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string) (string, error) { b, err := EnvironmentBrowserFromReference(client, ref) if err != nil { return "", err } ctx, cancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout) defer cancel() - return b.OSFamily(ctx, guest, hardwareVersion) + return b.OSFamily(ctx, guest) } // EnvironmentBrowserFromReference loads an environment browser for the diff --git a/vsphere/internal/helper/envbrowse/environment_browser_helper.go b/vsphere/internal/helper/envbrowse/environment_browser_helper.go index e873c0f8e..2299f35cc 100644 --- a/vsphere/internal/helper/envbrowse/environment_browser_helper.go +++ b/vsphere/internal/helper/envbrowse/environment_browser_helper.go @@ -72,7 +72,7 @@ func (b *EnvironmentBrowser) DefaultDevices(ctx context.Context, key string, hos } // OSFamily fetches the operating system family for the supplied guest ID. -func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwareVersion string) (string, error) { +func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string, error) { var eb mo.EnvironmentBrowser err := b.Properties(ctx, b.Reference(), nil, &eb) @@ -84,7 +84,6 @@ func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwar This: b.Reference(), Spec: &types.EnvironmentBrowserConfigOptionQuerySpec{ GuestId: []string{guest}, - Key: hardwareVersion, }, } res, err := methods.QueryConfigOptionEx(ctx, b.Client(), &req) diff --git a/vsphere/internal/helper/resourcepool/resource_pool_helper.go b/vsphere/internal/helper/resourcepool/resource_pool_helper.go index c071daee9..99b87e748 100644 --- a/vsphere/internal/helper/resourcepool/resource_pool_helper.go +++ b/vsphere/internal/helper/resourcepool/resource_pool_helper.go @@ -153,13 +153,13 @@ func DefaultDevices(client *govmomi.Client, pool *object.ResourcePool, guest str // OSFamily uses the resource pool's environment browser to get the OS family // for a specific guest ID. -func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string, hardwareVersion string) (string, error) { +func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string) (string, error) { log.Printf("[DEBUG] Looking for OS family for guest ID %q", guest) pprops, err := Properties(pool) if err != nil { return "", err } - return computeresource.OSFamily(client, pprops.Owner, guest, hardwareVersion) + return computeresource.OSFamily(client, pprops.Owner, guest) } // Create creates a ResourcePool. diff --git a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go index 6ae960bf2..5092673e7 100644 --- a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go +++ b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go @@ -128,7 +128,7 @@ func ValidateVirtualMachineClone(d *schema.ResourceDiff, c *govmomi.Client) erro if err != nil { return fmt.Errorf("could not find resource pool ID %q: %s", poolID, err) } - family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) + family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string)) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } diff --git a/vsphere/resource_vsphere_virtual_machine.go b/vsphere/resource_vsphere_virtual_machine.go index f6341000a..f304fb4c7 100644 --- a/vsphere/resource_vsphere_virtual_machine.go +++ b/vsphere/resource_vsphere_virtual_machine.go @@ -1641,7 +1641,7 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta var cw *virtualMachineCustomizationWaiter // Send customization spec if any has been defined. if len(d.Get("clone.0.customize").([]interface{})) > 0 { - family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) + family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string)) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } From e835a6bfb1718e88bb2c483fe17459d59eaa99eb Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 7 Aug 2023 13:02:52 -0400 Subject: [PATCH 10/67] chore(ci): check for panic in logfile (#1975) --- .github/workflows/acceptance-tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 92a825310..b59b1ff16 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -84,6 +84,9 @@ jobs: name: test-log-${{ env.TODAY_DATE }} path: /tmp/gotest.log + - name: Check for panic in log file + run: ! grep -q "panic:" /tmp/gotest.log + - name: Get yesterday's date run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV From ba1f169b10f691ee89fbde7a82a5f8025cb396b2 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 13:04:19 -0400 Subject: [PATCH 11/67] chore: add copyright and license headers (#1979) Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> --- scripts/compare-testlogs.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/compare-testlogs.js b/scripts/compare-testlogs.js index c166bba07..c585061b9 100644 --- a/scripts/compare-testlogs.js +++ b/scripts/compare-testlogs.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + const fs = require('fs'); function compareTestResults(outputA, outputB) { From 3b2ce80e8b4a28770000873eec6b05b0360543cc Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Tue, 8 Aug 2023 17:21:02 -0400 Subject: [PATCH 12/67] Fix acceptance tests workflow - Official GH download-artifact action does not support downloads between workflow runs, disable it for now. - ! causes parsing issues in YAML, use if statement instead. --- .github/workflows/acceptance-tests.yaml | 34 +++++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index b59b1ff16..a02241733 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -85,24 +85,30 @@ jobs: path: /tmp/gotest.log - name: Check for panic in log file - run: ! grep -q "panic:" /tmp/gotest.log + run: | + if grep -q "panic:" /tmp/gotest.log; then + echo "Panic found in log file." + exit 1 + else + echo "No panic found in log file." + fi - - name: Get yesterday's date - run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV + # - name: Get yesterday's date + # run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Download previous day's log file - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: test-log-${{ env.YESTERDAY_DATE }} - path: /tmp/yesterday + # - name: Download previous day's log file + # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + # with: + # name: test-log-${{ env.YESTERDAY_DATE }} + # path: /tmp/yesterday - - name: Set up Node - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 - with: - node-version: 18 + # - name: Set up Node + # uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 + # with: + # node-version: 18 - - name: Run comparison script - run: node ./scripts/compare-testlogs.js /tmp/gotest.log /tmp/yesterday/gotest.log + # - name: Run comparison script + # run: node ./scripts/compare-testlogs.js /tmp/gotest.log /tmp/yesterday/gotest.log - name: Cleanup testrun resources if: always() From 77ca43eea6077c382fd5027b74eaf8658dbda28b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 04:17:17 +0000 Subject: [PATCH 13/67] chore(deps): bump github/codeql-action from 2.21.2 to 2.21.3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.2 to 2.21.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/0ba4244466797eb048eb91a6cd43d5c03ca8bd05...5b6282e01c62d02e720b81eb8a51204f527c3624) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 97195a12c..354d9153b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,10 +21,10 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Initialize CodeQL - uses: github/codeql-action/init@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 + uses: github/codeql-action/init@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 with: languages: '${{ matrix.language }}' - name: Autobuild - uses: github/codeql-action/autobuild@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 + uses: github/codeql-action/autobuild@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2 + uses: github/codeql-action/analyze@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 From 987a4733a88598a5eab95ecb129b5b30de9207fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 04:17:12 +0000 Subject: [PATCH 14/67] chore(deps): bump actions/setup-go from 4.0.1 to 4.1.0 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.1 to 4.1.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/fac708d6674e30b6ba41289acaab6d4b75aa0753...93397bea11091df50f3d7e59dc26a7711a8bcfbe) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/acceptance-tests.yaml | 2 +- .github/workflows/unit_tests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index a02241733..67f48a061 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -58,7 +58,7 @@ jobs: done < devrc - name: Set up Go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version-file: '.go-version' diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index cfa3dc9fc..8c63e5052 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Set up Go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version-file: '.go-version' - name: Go mod verify From 56fce4dbfb2e50117d4a7f99cca79a082bd50bf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 04:56:59 +0000 Subject: [PATCH 15/67] chore(deps): bump github.com/vmware/govmomi from 0.30.6 to 0.30.7 Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.30.6 to 0.30.7. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.30.6...v0.30.7) --- updated-dependencies: - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 91521f4ca..9357d8c80 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 github.com/mitchellh/copystructure v1.2.0 - github.com/vmware/govmomi v0.30.6 + github.com/vmware/govmomi v0.30.7 ) require ( diff --git a/go.sum b/go.sum index ab8b2a1a7..47d42a795 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/vmware/govmomi v0.30.6 h1:O3tjSwQBy0XwI5uK1/yVIfQ1LP9bAECEDUfifnyGs9U= -github.com/vmware/govmomi v0.30.6/go.mod h1:epgoslm97rLECMV4D+08ORzUBEU7boFSepKjt7AYVGg= +github.com/vmware/govmomi v0.30.7 h1:YO8CcDpLJzmq6PK5/CBQbXyV21iCMh8SbdXt+xNkXp8= +github.com/vmware/govmomi v0.30.7/go.mod h1:epgoslm97rLECMV4D+08ORzUBEU7boFSepKjt7AYVGg= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= From 6485922c1737ca9306660267cb52933076a50b5c Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 9 Aug 2023 09:20:11 -0400 Subject: [PATCH 16/67] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d687794..a2d084d93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ BUG FIXES: CHORES: * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) -* Update govmomi v0.30.6 ([#1952](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1952)) +* Update govmomi v0.30.7 ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) ## 2.4.1 (June 26, 2023) From 08306faa35c9c58b1341d46ca49678efe42394d8 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 9 Aug 2023 09:20:40 -0400 Subject: [PATCH 17/67] Update CHANGELOG.md --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d084d93..aa7e0bc89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,5 @@ ## 2.5.0 (Unreleased) -BUG FIXES: -* `r/virtual_machine`: Fix for guest os support ([#1966](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1966)) - CHORES: * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) * Update govmomi v0.30.7 ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) From 898189fc3225cb34cdddaba8d955e93d8983602d Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 9 Aug 2023 11:16:23 -0400 Subject: [PATCH 18/67] Restore regression check The previous artifact downloader action didn't support downloads accross workflows. Using a popular and HCP approved alternative that does. Added exit code to comparison scripts to flag regressions in CI. --- .github/workflows/acceptance-tests.yaml | 26 ++++++++++++------------- scripts/compare-testlogs.js | 8 +++++++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 67f48a061..ffa7338e4 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -93,22 +93,22 @@ jobs: echo "No panic found in log file." fi - # - name: Get yesterday's date - # run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Get yesterday's date + run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV - # - name: Download previous day's log file - # uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - # with: - # name: test-log-${{ env.YESTERDAY_DATE }} - # path: /tmp/yesterday + - name: Download previous day's log file + uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 + with: + name: test-log-${{ env.YESTERDAY_DATE }} + path: /tmp/yesterday - # - name: Set up Node - # uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 - # with: - # node-version: 18 + - name: Set up Node + uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 + with: + node-version: 18 - # - name: Run comparison script - # run: node ./scripts/compare-testlogs.js /tmp/gotest.log /tmp/yesterday/gotest.log + - name: Run comparison script + run: node ./scripts/compare-testlogs.js /tmp/gotest.log /tmp/yesterday/gotest.log - name: Cleanup testrun resources if: always() diff --git a/scripts/compare-testlogs.js b/scripts/compare-testlogs.js index c585061b9..5156e215c 100644 --- a/scripts/compare-testlogs.js +++ b/scripts/compare-testlogs.js @@ -47,4 +47,10 @@ const outputA = fs.readFileSync(filenameA, 'utf8'); const outputB = fs.readFileSync(filenameB, 'utf8'); const failedTests = compareTestResults(outputA, outputB); -console.log(`Tests failed in ${filenameA} that didn't fail in ${filenameB}:`, failedTests); + +if (failedTests.length > 0) { + console.log(`Tests failed in ${filenameA} that didn't fail in ${filenameB}:`, failedTests); + process.exit(1) +} else { + console.log("No new failures") +} From 9f361c8da2a5e989480ef157f8eb8cd9c069d51d Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 9 Aug 2023 17:35:34 -0400 Subject: [PATCH 19/67] Summarize test output Small script to summarize sums of pass/skip/fail. Will error if pass count is 0. Tweak regression check to flag new failures that passed in previous log (subtle difference). --- .github/workflows/acceptance-tests.yaml | 17 +++++++----- scripts/compare-testlogs.js | 4 +-- scripts/summarize-testlog.js | 36 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 scripts/summarize-testlog.js diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index ffa7338e4..a738a4ea0 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -61,6 +61,11 @@ jobs: uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version-file: '.go-version' + + - name: Set up Node + uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 + with: + node-version: 18 # Due to third party action restrictions, install and use the tool directly - name: Set up gotestfmt @@ -84,7 +89,7 @@ jobs: name: test-log-${{ env.TODAY_DATE }} path: /tmp/gotest.log - - name: Check for panic in log file + - name: Panic check run: | if grep -q "panic:" /tmp/gotest.log; then echo "Panic found in log file." @@ -93,6 +98,9 @@ jobs: echo "No panic found in log file." fi + - name: Summary + run: node ./scripts/summarize-testlog.js /tmp/gotest.log + - name: Get yesterday's date run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV @@ -102,12 +110,7 @@ jobs: name: test-log-${{ env.YESTERDAY_DATE }} path: /tmp/yesterday - - name: Set up Node - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 - with: - node-version: 18 - - - name: Run comparison script + - name: Regression check run: node ./scripts/compare-testlogs.js /tmp/gotest.log /tmp/yesterday/gotest.log - name: Cleanup testrun resources diff --git a/scripts/compare-testlogs.js b/scripts/compare-testlogs.js index 5156e215c..8c09df55e 100644 --- a/scripts/compare-testlogs.js +++ b/scripts/compare-testlogs.js @@ -30,7 +30,7 @@ function compareTestResults(outputA, outputB) { .reduce((obj, test) => ({ ...obj, [test.Test]: test.Action }), {}); // Finding tests that failed in A but not in B - const failedInANotInB = Object.keys(testsA).filter(test => testsA[test] === "fail" && testsB[test] !== "fail"); + const failedInANotInB = Object.keys(testsA).filter(test => testsA[test] === "fail" && testsB[test] === "pass"); return failedInANotInB; } @@ -49,7 +49,7 @@ const outputB = fs.readFileSync(filenameB, 'utf8'); const failedTests = compareTestResults(outputA, outputB); if (failedTests.length > 0) { - console.log(`Tests failed in ${filenameA} that didn't fail in ${filenameB}:`, failedTests); + console.log(`Tests failed in ${filenameA} that passed in ${filenameB}:`, failedTests); process.exit(1) } else { console.log("No new failures") diff --git a/scripts/summarize-testlog.js b/scripts/summarize-testlog.js new file mode 100644 index 000000000..a9a0318de --- /dev/null +++ b/scripts/summarize-testlog.js @@ -0,0 +1,36 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const fs = require('fs'); + +const filePath = process.argv[2]; +if (!filePath) { + console.error('Please provide the log file path as an argument.'); + process.exit(1); +} + +const fileContent = fs.readFileSync(filePath, 'utf8'); +const lines = fileContent.split('\n'); + +let pass = 0, skip = 0, fail = 0; + +lines.forEach((line) => { + try { + const test = JSON.parse(line); + if (test.Action === 'pass') pass++; + else if (test.Action === 'skip') skip++; + else if (test.Action === 'fail') fail++; + } catch (err) { + // Ignore lines that are not valid JSON + } +}); + +// Print summary +console.log(`Pass: ${pass}`); +console.log(`Skip: ${skip}`); +console.log(`Fail: ${fail}`); + +// Exit with code 1 if passed is 0 +if (pass === 0) process.exit(1); From 99586ed487b62d35f5e36701e9b1e77c69b92b28 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 11 Aug 2023 11:41:23 -0400 Subject: [PATCH 20/67] chore(ci): ignore workflow status in log download (#1989) --- .github/workflows/acceptance-tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index a738a4ea0..f2d33f5da 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -108,6 +108,7 @@ jobs: uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 with: name: test-log-${{ env.YESTERDAY_DATE }} + workflow_conclusion: "" # ignore status path: /tmp/yesterday - name: Regression check From b64964978231bcda33009205a98b47b5e8fa6414 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Sat, 12 Aug 2023 13:53:41 -0400 Subject: [PATCH 21/67] Search artifacts for log downloader --- .github/workflows/acceptance-tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index f2d33f5da..6b137e59c 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -109,6 +109,7 @@ jobs: with: name: test-log-${{ env.YESTERDAY_DATE }} workflow_conclusion: "" # ignore status + search_artifacts: true path: /tmp/yesterday - name: Regression check From d129307d63916801be68c777d430dbe4357aa3c0 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Sat, 12 Aug 2023 14:02:11 -0400 Subject: [PATCH 22/67] Fix summary script --- scripts/summarize-testlog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/summarize-testlog.js b/scripts/summarize-testlog.js index a9a0318de..642038205 100644 --- a/scripts/summarize-testlog.js +++ b/scripts/summarize-testlog.js @@ -19,6 +19,7 @@ let pass = 0, skip = 0, fail = 0; lines.forEach((line) => { try { const test = JSON.parse(line); + if (!test.Test) return; if (test.Action === 'pass') pass++; else if (test.Action === 'skip') skip++; else if (test.Action === 'fail') fail++; From e259dbe7108a6db71635fa46d71894901918ac66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 04:19:24 +0000 Subject: [PATCH 23/67] chore(deps): bump github/codeql-action from 2.21.3 to 2.21.4 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.3 to 2.21.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/5b6282e01c62d02e720b81eb8a51204f527c3624...a09933a12a80f87b87005513f0abb1494c27a716) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 354d9153b..603f684c3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,10 +21,10 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Initialize CodeQL - uses: github/codeql-action/init@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/init@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 with: languages: '${{ matrix.language }}' - name: Autobuild - uses: github/codeql-action/autobuild@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/autobuild@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/analyze@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 From 16129400ae4d60f27118eefe366a4277964421d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 04:19:19 +0000 Subject: [PATCH 24/67] chore(deps): bump actions/setup-node from 3.7.0 to 3.8.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.7.0 to 3.8.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/e33196f7422957bea03ed53f6fbb155025ffc7b8...bea5baf987ba7aa777a8a0b4ace377a21c45c381) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/acceptance-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 6b137e59c..a7a76b504 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -63,7 +63,7 @@ jobs: go-version-file: '.go-version' - name: Set up Node - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # 3.7.0 + uses: actions/setup-node@bea5baf987ba7aa777a8a0b4ace377a21c45c381 # 3.8.0 with: node-version: 18 From bad1ecdf0751717761c7923920ad77df629b4b3b Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 17 Aug 2023 06:58:27 -0400 Subject: [PATCH 25/67] Update contributing documentation (#1993) --- acctests/README.md | 9 +++++++-- docs/CONTRIBUTING.md | 36 +++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/acctests/README.md b/acctests/README.md index bb6f5b79b..8bd99f993 100644 --- a/acctests/README.md +++ b/acctests/README.md @@ -1,5 +1,5 @@ # Acceptance Tests -Acceptance testing is undergoing revamping and streamlining. The current process recommends hosting on Equinix Metal. +Acceptance testing is undergoing revamping and streamlining. The current process recommends hosting on Equinix Metal and currently is only meant to test vSphere 7 running on an ESXi 7 host (with nested ESXi 7 hosts). ## Download 1. Log in to VMware Customer Connect. @@ -137,11 +137,16 @@ With these set, the nightly acceptances tests should run, normally the results o * Despite sweepers looking for it specifically, a common datastore called `nfs-vol2` can fail to unmount, causing widespread test failure. From the vSphere UI you will have to right-click and remove the datastore (it takes a few moments). * Sometimes the API seems to lockup/crash or lockout the CI client resulting in widespread error 503s. +### PLEASE NOTE +The current VCSA deployment seen in `acctests/equinix/vcsa_deploy.json` is set to thin provision the primary datastore `datastore1`. It seems that over time the VCSA VM will continue to expand until the datastore is full. There is probably a way to prevent this. Without this being corrected, or a bare metal server with more primary disk space being chosen, the CI probably needs to be rebuilt from scratch about once a month. + +The main ESXi also only comes with an evaluation license good for 60 days (not an issue if we are forced to rebuild every 30 due to space issue). We do have an ESXi 7 license, but it has to be manually assigned to the host and generally it's been easier to just rebuild from scratch every 60 days (although this could easily be added as a manual step alongside the networking manual steps). The short term time limits this poses may not be a problem if CI can be improved to the point where the entire system is brought up and torn down daily. + # Local Testing The tests and required infrastructure have been heavily streamlined (believe it or not...) however its still expected they run Equinix for now, but it should be theoretically possible to run tests against local hardware (or perhaps totally virtualized). The main requirement is ESXi 7 with the following: * A lot of memory (20GB or more), ESXi/vCenter will need a lot, and then there will be a few VMs at play for now that probably all need 0.5 to 1GB each. -* Probably 4 hard drives. The first hosts the vSphere and primary ESXi install (~70GB), a second one will serve as the datastore the NAS and 3 nested ESXi VMs run from (~100GB should be fine). The other 2 are needed as apart of the vmfs datastore tests, the size for these should not matter, make sure the override the regexp pattern for finding them `TF_VAR_VSPHERE_VMFS_REGEXP`. +* Probably 4 hard drives. The first hosts the vSphere and primary ESXi install, a second one will serve as the datastore the NAS and 3 nested ESXi VMs run from (~100GB should be fine). The other 2 are needed as apart of the vmfs datastore tests, the size for these should not matter, make sure the override the regexp pattern for finding them `TF_VAR_VSPHERE_VMFS_REGEXP`. * 2 NICs and 2 Networks. The topology of the test cluster is 1 IPv4 network on NIC0 (needs to be reachable by wherever Terraform runs from) and another IPv4 network on NIC1 (this network can be private to the caller/Terraform, but needs to be reachable by ESXi.. obviously). Two /29 subnets may look like this: * "Public" Network: * (1) Gateway diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 6ce864b0c..eb06d2b83 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -52,24 +52,38 @@ See [Building the Provider](#building-the-provider) for details on building the # Testing the Provider -**NOTE:** Testing the vSphere provider is currently a complex operation as it requires having a vCenter Server endpoint to test against, which should be hosting a standard configuration for a vSphere cluster. Some of the tests will work against ESXi, but YMMV. +Terraform providers tend to create, update, and destroy real resources to assert the provider is working as expected. This is called [Acceptance Testing](https://developer.hashicorp.com/terraform/plugin/sdkv2/testing/acceptance-tests). The vSphere provider's implementation is a bit more complex than the average provider, and creating a test environment that covers all possible hardware and settings combinations is a challenge. Effort has been put into streamlining the acceptance testing lab and instructions can be found in the acctests [README](/acctests/README.md). -## Configuring Environment Variables +# Maintaining the Changelog -Most of the tests in this provider require a comprehensive list of environment variables to run. See the individual `*_test.go` files in the [`vsphere/`](vsphere/) directory for more details. +In the future this should be automated, but between releases it's expected to add a SemVer entry at the top of the file with the following format. -## Running the Acceptance Tests +``` +## 2.4.0 (Unreleased) -After this is done, you can run the acceptance tests by running: +FEATURES: +* `d/datasource_name`: Summary of the pull request. ([#1234](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1234)) +* `r/resource_name`: ... -```shell -$ make testacc +BUG FIXES: +... + +IMPROVEMENTS: +... + +CHORES: +... ``` +Generally the changes should fall into the categories listed above, when a resource or datasource is affected please follow the format seen above and link to the pull request (mind the brackets). -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: +# Release the Provider -```shell -make testacc TESTARGS="-run=TestAccVSphereVirtualMachine" +Releases will be performed by authorized HashiCorp, VMware, or community contributors. The release process is automated via GitHub Actions and is triggered by pushing a tag. To perform a release, please visit the Changelog and replace `(Unreleased)` with the current date (see the Changelog for the format). + +Make sure to have pulled all the latest code changes to the main branch on your local machine (especially if the Changelog was edited via GitHub.com). When ready, create and push an annotated tag with the correct version number. +``` +$ git tag -a v1.2.3 -m "v1.2.3" +$ git push --tag ``` -This following example would run all of the acceptance tests matching `TestAccVSphereVirtualMachine`. Change this for the specific tests you want to run. \ No newline at end of file +The process should not require any additional actions. See the release workflow for details. Generally speaking the binaries should be built, signed, and uploaded in a matter of minutes. After which it can take up to an hour for the new release to be picked up by the Terraform Registry. If anything appears to have gone wrong, contact HashiCorp. \ No newline at end of file From 6c668def1fe786c3252aff11f85671e8516db95f Mon Sep 17 00:00:00 2001 From: Nikola Klinkachev Date: Tue, 1 Aug 2023 10:01:46 +0300 Subject: [PATCH 26/67] Fix for https://github.com/hashicorp/terraform-provider-vsphere/issues/1939 Supported guest OS are dependent on the VM hardware version. Changed querying the OS Family when deploying a VM from template to read the template hardware version instead of using the server default version. --- .../helper/computeresource/compute_resource_helper.go | 4 ++-- .../internal/helper/envbrowse/environment_browser_helper.go | 3 ++- vsphere/internal/helper/resourcepool/resource_pool_helper.go | 4 ++-- .../internal/vmworkflow/virtual_machine_clone_subresource.go | 2 +- vsphere/resource_vsphere_virtual_machine.go | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/vsphere/internal/helper/computeresource/compute_resource_helper.go b/vsphere/internal/helper/computeresource/compute_resource_helper.go index d729792fc..36bcb7931 100644 --- a/vsphere/internal/helper/computeresource/compute_resource_helper.go +++ b/vsphere/internal/helper/computeresource/compute_resource_helper.go @@ -169,14 +169,14 @@ func DefaultDevicesFromReference(client *govmomi.Client, ref types.ManagedObject // OSFamily uses the compute resource's environment browser to get the OS family // for a specific guest ID. -func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string) (string, error) { +func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string, hardwareVersion string) (string, error) { b, err := EnvironmentBrowserFromReference(client, ref) if err != nil { return "", err } ctx, cancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout) defer cancel() - return b.OSFamily(ctx, guest) + return b.OSFamily(ctx, guest, hardwareVersion) } // EnvironmentBrowserFromReference loads an environment browser for the diff --git a/vsphere/internal/helper/envbrowse/environment_browser_helper.go b/vsphere/internal/helper/envbrowse/environment_browser_helper.go index 2299f35cc..e873c0f8e 100644 --- a/vsphere/internal/helper/envbrowse/environment_browser_helper.go +++ b/vsphere/internal/helper/envbrowse/environment_browser_helper.go @@ -72,7 +72,7 @@ func (b *EnvironmentBrowser) DefaultDevices(ctx context.Context, key string, hos } // OSFamily fetches the operating system family for the supplied guest ID. -func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string, error) { +func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwareVersion string) (string, error) { var eb mo.EnvironmentBrowser err := b.Properties(ctx, b.Reference(), nil, &eb) @@ -84,6 +84,7 @@ func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string This: b.Reference(), Spec: &types.EnvironmentBrowserConfigOptionQuerySpec{ GuestId: []string{guest}, + Key: hardwareVersion, }, } res, err := methods.QueryConfigOptionEx(ctx, b.Client(), &req) diff --git a/vsphere/internal/helper/resourcepool/resource_pool_helper.go b/vsphere/internal/helper/resourcepool/resource_pool_helper.go index 99b87e748..c071daee9 100644 --- a/vsphere/internal/helper/resourcepool/resource_pool_helper.go +++ b/vsphere/internal/helper/resourcepool/resource_pool_helper.go @@ -153,13 +153,13 @@ func DefaultDevices(client *govmomi.Client, pool *object.ResourcePool, guest str // OSFamily uses the resource pool's environment browser to get the OS family // for a specific guest ID. -func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string) (string, error) { +func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string, hardwareVersion string) (string, error) { log.Printf("[DEBUG] Looking for OS family for guest ID %q", guest) pprops, err := Properties(pool) if err != nil { return "", err } - return computeresource.OSFamily(client, pprops.Owner, guest) + return computeresource.OSFamily(client, pprops.Owner, guest, hardwareVersion) } // Create creates a ResourcePool. diff --git a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go index 5092673e7..6ae960bf2 100644 --- a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go +++ b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go @@ -128,7 +128,7 @@ func ValidateVirtualMachineClone(d *schema.ResourceDiff, c *govmomi.Client) erro if err != nil { return fmt.Errorf("could not find resource pool ID %q: %s", poolID, err) } - family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string)) + family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } diff --git a/vsphere/resource_vsphere_virtual_machine.go b/vsphere/resource_vsphere_virtual_machine.go index f304fb4c7..f6341000a 100644 --- a/vsphere/resource_vsphere_virtual_machine.go +++ b/vsphere/resource_vsphere_virtual_machine.go @@ -1641,7 +1641,7 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta var cw *virtualMachineCustomizationWaiter // Send customization spec if any has been defined. if len(d.Get("clone.0.customize").([]interface{})) > 0 { - family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string)) + family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } From e72c587e4ac9950a52ba434871aa7e2a6b57532b Mon Sep 17 00:00:00 2001 From: Nikola Klinkachev Date: Thu, 17 Aug 2023 17:59:42 +0300 Subject: [PATCH 27/67] Bugfix for issue 1939. The code now correctly reads hardware version from the template and the terraform spec and passes along the higher of the two values to the environment browser. This allows configuration of vm deployments from templates with OSes newer than what the default hardware compatibility version of the ESXi server allows. --- .../compute_resource_helper.go | 5 +++-- .../envbrowse/environment_browser_helper.go | 8 +++++-- .../resourcepool/resource_pool_helper.go | 5 +++-- .../virtual_machine_clone_subresource.go | 21 ++++++++++++++++++- vsphere/resource_vsphere_virtual_machine.go | 8 ++++++- 5 files changed, 39 insertions(+), 8 deletions(-) diff --git a/vsphere/internal/helper/computeresource/compute_resource_helper.go b/vsphere/internal/helper/computeresource/compute_resource_helper.go index 36bcb7931..05bbcd1dd 100644 --- a/vsphere/internal/helper/computeresource/compute_resource_helper.go +++ b/vsphere/internal/helper/computeresource/compute_resource_helper.go @@ -168,8 +168,9 @@ func DefaultDevicesFromReference(client *govmomi.Client, ref types.ManagedObject } // OSFamily uses the compute resource's environment browser to get the OS family -// for a specific guest ID. -func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string, hardwareVersion string) (string, error) { +// for a specific guest ID. The list of supported OS is dependent on the hardware version of the vm/template +// so that is also passed to the environment browser. +func OSFamily(client *govmomi.Client, ref types.ManagedObjectReference, guest string, hardwareVersion int) (string, error) { b, err := EnvironmentBrowserFromReference(client, ref) if err != nil { return "", err diff --git a/vsphere/internal/helper/envbrowse/environment_browser_helper.go b/vsphere/internal/helper/envbrowse/environment_browser_helper.go index e873c0f8e..6003fc1c1 100644 --- a/vsphere/internal/helper/envbrowse/environment_browser_helper.go +++ b/vsphere/internal/helper/envbrowse/environment_browser_helper.go @@ -9,6 +9,7 @@ import ( "fmt" "log" + "github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/virtualmachine" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/methods" @@ -72,7 +73,8 @@ func (b *EnvironmentBrowser) DefaultDevices(ctx context.Context, key string, hos } // OSFamily fetches the operating system family for the supplied guest ID. -func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwareVersion string) (string, error) { +// The list of supported OS is dependent on the hardware version of the vm/template +func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwareVersion int) (string, error) { var eb mo.EnvironmentBrowser err := b.Properties(ctx, b.Reference(), nil, &eb) @@ -84,9 +86,11 @@ func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string, hardwar This: b.Reference(), Spec: &types.EnvironmentBrowserConfigOptionQuerySpec{ GuestId: []string{guest}, - Key: hardwareVersion, }, } + if hardwareVersion > 0 { + req.Spec.Key = virtualmachine.GetHardwareVersionID(hardwareVersion) + } res, err := methods.QueryConfigOptionEx(ctx, b.Client(), &req) if err != nil { return "", err diff --git a/vsphere/internal/helper/resourcepool/resource_pool_helper.go b/vsphere/internal/helper/resourcepool/resource_pool_helper.go index c071daee9..e4b150a2b 100644 --- a/vsphere/internal/helper/resourcepool/resource_pool_helper.go +++ b/vsphere/internal/helper/resourcepool/resource_pool_helper.go @@ -152,8 +152,9 @@ func DefaultDevices(client *govmomi.Client, pool *object.ResourcePool, guest str } // OSFamily uses the resource pool's environment browser to get the OS family -// for a specific guest ID. -func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string, hardwareVersion string) (string, error) { +// for a specific guest ID. The list of supported OS is dependent on the hardware version of the vm/template +// so that is also passed to the environment browser. +func OSFamily(client *govmomi.Client, pool *object.ResourcePool, guest string, hardwareVersion int) (string, error) { log.Printf("[DEBUG] Looking for OS family for guest ID %q", guest) pprops, err := Properties(pool) if err != nil { diff --git a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go index 6ae960bf2..5fb50adc6 100644 --- a/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go +++ b/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go @@ -128,10 +128,29 @@ func ValidateVirtualMachineClone(d *schema.ResourceDiff, c *govmomi.Client) erro if err != nil { return fmt.Errorf("could not find resource pool ID %q: %s", poolID, err) } - family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) + + // Retrieving the vm/template data to extract the hardware version. + // If there's a higher hardware version specified in the spec that value is used instead. + vm, err := virtualmachine.FromUUID(c, tUUID) + if err != nil { + return fmt.Errorf("cannot locate virtual machine or template with UUID %q: %s", tUUID, err) + } + vprops, err := virtualmachine.Properties(vm) + if err != nil { + return fmt.Errorf("error fetching virtual machine or template properties: %s", err) + } + vmHardwareVersion := virtualmachine.GetHardwareVersionNumber(vprops.Config.Version) + vmSpecHardwareVersion := d.Get("hardware_version").(int) + if vmSpecHardwareVersion > vmHardwareVersion { + vmHardwareVersion = vmSpecHardwareVersion + } + + // Retrieving the guest OS family of the vm/template. + family, err := resourcepool.OSFamily(c, pool, d.Get("guest_id").(string), vmHardwareVersion) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } + // Validating the customization spec is valid for the vm/template's guest OS family if err := ValidateCustomizationSpec(d, family); err != nil { return err } diff --git a/vsphere/resource_vsphere_virtual_machine.go b/vsphere/resource_vsphere_virtual_machine.go index f6341000a..f1d9a1f25 100644 --- a/vsphere/resource_vsphere_virtual_machine.go +++ b/vsphere/resource_vsphere_virtual_machine.go @@ -1641,7 +1641,13 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta var cw *virtualMachineCustomizationWaiter // Send customization spec if any has been defined. if len(d.Get("clone.0.customize").([]interface{})) > 0 { - family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string), d.Get("hardware_version").(string)) + vmHardwareVersion := virtualmachine.GetHardwareVersionNumber(vprops.Config.Version) + vmSpecHardwareVersion := d.Get("hardware_version").(int) + if vmSpecHardwareVersion > vmHardwareVersion { + vmHardwareVersion = vmSpecHardwareVersion + } + fmt.Errorf(virtualmachine.GetHardwareVersionID(vmHardwareVersion)) + family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string), vmHardwareVersion) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) } From 820788a3036f28d0f8da1675ea07f151d5c4f890 Mon Sep 17 00:00:00 2001 From: Nikola Klinkachev Date: Thu, 17 Aug 2023 18:07:23 +0300 Subject: [PATCH 28/67] Removed printf debug statement. --- vsphere/resource_vsphere_virtual_machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsphere/resource_vsphere_virtual_machine.go b/vsphere/resource_vsphere_virtual_machine.go index f1d9a1f25..272f28950 100644 --- a/vsphere/resource_vsphere_virtual_machine.go +++ b/vsphere/resource_vsphere_virtual_machine.go @@ -1646,7 +1646,7 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta if vmSpecHardwareVersion > vmHardwareVersion { vmHardwareVersion = vmSpecHardwareVersion } - fmt.Errorf(virtualmachine.GetHardwareVersionID(vmHardwareVersion)) + family, err := resourcepool.OSFamily(client, pool, d.Get("guest_id").(string), vmHardwareVersion) if err != nil { return fmt.Errorf("cannot find OS family for guest ID %q: %s", d.Get("guest_id").(string), err) From 2b2ebbd40278eac2b2c01cc30f01185e331d9272 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 17 Aug 2023 15:55:45 -0400 Subject: [PATCH 29/67] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa7e0bc89..eb65c3bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 2.5.0 (Unreleased) +BUG FIXES: +* `r/virtual_machine`: Fix hardware version error when cloning and/or configuring a VM/Template ([#1995](https://github.com/hashicorp/terraform-provider-vsphere/pull/1995)) + CHORES: * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) * Update govmomi v0.30.7 ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) From cdf972514ebfc55f7de8951eeae2c5eb350e0861 Mon Sep 17 00:00:00 2001 From: Nikola Klinkachev Date: Mon, 14 Aug 2023 10:23:01 +0300 Subject: [PATCH 30/67] Bugfix addressing issue-1809. Split the storage controller change and the harddisk edit operations into separate API calls to vsphere. The previosu behaviour was to generate 2 edit operations for the harddisk object which leads to an undefined API behavior. --- vsphere/resource_vsphere_virtual_machine.go | 77 +++++++++++++++++---- 1 file changed, 63 insertions(+), 14 deletions(-) diff --git a/vsphere/resource_vsphere_virtual_machine.go b/vsphere/resource_vsphere_virtual_machine.go index 272f28950..99daae615 100644 --- a/vsphere/resource_vsphere_virtual_machine.go +++ b/vsphere/resource_vsphere_virtual_machine.go @@ -1535,11 +1535,17 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta log.Printf("[DEBUG] VM %q - UUID is %q", vm.InventoryPath, vprops.Config.Uuid) d.SetId(vprops.Config.Uuid) - // Before starting or proceeding any further, we need to normalize the - // configuration of the newly cloned VM. This is basically a subset of update - // with the stipulation that there is currently no state to help move this - // along. - cfgSpec, err := expandVirtualMachineConfigSpec(d, client) + // To apply device changes, we need the current devicecfgSpec from the config + // info. We then filter this list through the same apply process we did for + // create, which will apply the changes in an incremental fashion. + devices := object.VirtualDeviceList(vprops.Config.Hardware.Device) + var delta []types.BaseVirtualDeviceConfigSpec + // First check the state of our SCSI bus. Normalize it if we need to. + + // Reconfigure VM after normalizing the bus to avoid sending duplicate edit operations for + // devices attached to the controllers. + // Continue with a fresh cfgSpec since all the changes have been applied + storageControllercfgSpec, err := expandVirtualMachineConfigSpec(d, client) if err != nil { return resourceVSphereVirtualMachineRollbackCreate( d, @@ -1548,13 +1554,6 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta fmt.Errorf("error in virtual machine configuration: %s", err), ) } - - // To apply device changes, we need the current devicecfgSpec from the config - // info. We then filter this list through the same apply process we did for - // create, which will apply the changes in an incremental fashion. - devices := object.VirtualDeviceList(vprops.Config.Hardware.Device) - var delta []types.BaseVirtualDeviceConfigSpec - // First check the state of our SCSI bus. Normalize it if we need to. devices, delta, err = virtualdevice.NormalizeBus(devices, d) if err != nil { return resourceVSphereVirtualMachineRollbackCreate( @@ -1564,7 +1563,58 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta fmt.Errorf("error normalizing SCSI bus post-clone: %s", err), ) } - cfgSpec.DeviceChange = virtualdevice.AppendDeviceChangeSpec(cfgSpec.DeviceChange, delta...) + storageControllercfgSpec.DeviceChange = virtualdevice.AppendDeviceChangeSpec(storageControllercfgSpec.DeviceChange, delta...) + + timeout := meta.(*Client).timeout + err = virtualmachine.Reconfigure(vm, storageControllercfgSpec, timeout) + if err != nil { + return resourceVSphereVirtualMachineRollbackCreate( + d, + meta, + vm, + fmt.Errorf("error reconfiguring virtual machine: %s", err), + ) + } + + // The VM has been reconfigured, we need to refresh some objects holding + // The current state of the vm + + vm, err = virtualmachine.FromUUID(client, vprops.Config.Uuid) + if err != nil { + return resourceVSphereVirtualMachineRollbackCreate( + d, + meta, + vm, + fmt.Errorf("cannot fetch properties of created virtual machine: %s", err), + ) + } + vprops, err = virtualmachine.Properties(vm) + if err != nil { + return resourceVSphereVirtualMachineRollbackCreate( + d, + meta, + vm, + fmt.Errorf("cannot fetch properties of created virtual machine: %s", err), + ) + } + log.Printf("[DEBUG] VM %q - UUID is %q", vm.InventoryPath, vprops.Config.Uuid) + d.SetId(vprops.Config.Uuid) + + // Before starting or proceeding any further, we need to normalize the + // configuration of the newly cloned VM. This is basically a subset of update + // with the stipulation that there is currently no state to help move this + // along. + cfgSpec, err := expandVirtualMachineConfigSpec(d, client) + if err != nil { + return resourceVSphereVirtualMachineRollbackCreate( + d, + meta, + vm, + fmt.Errorf("error in virtual machine configuration: %s", err), + ) + } + devices = object.VirtualDeviceList(vprops.Config.Hardware.Device) + // Disks devices, delta, err = virtualdevice.DiskPostCloneOperation(d, client, devices, postOvf) if err != nil { @@ -1613,7 +1663,6 @@ func resourceVSphereVirtualMachinePostDeployChanges(d *schema.ResourceData, meta log.Printf("[DEBUG] %s: Final device change cfgSpec: %s", resourceVSphereVirtualMachineIDString(d), virtualdevice.DeviceChangeString(cfgSpec.DeviceChange)) // Perform updates - timeout := meta.(*Client).timeout err = virtualmachine.Reconfigure(vm, cfgSpec, timeout) if err != nil { return resourceVSphereVirtualMachineRollbackCreate( From 9094ff5cea1df7ff3ef243714e0149a2867a6e93 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 17 Aug 2023 16:19:38 -0400 Subject: [PATCH 31/67] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb65c3bbf..7b6ab795f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: * `r/virtual_machine`: Fix hardware version error when cloning and/or configuring a VM/Template ([#1995](https://github.com/hashicorp/terraform-provider-vsphere/pull/1995)) +* `r/virtual_machine`: Fix invalid operation for device '0' when reconfiguring a VM ([#1996](https://github.com/hashicorp/terraform-provider-vsphere/pull/1996)) CHORES: * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) From 2a086a8e901cf639e36bb63686433c1f7c1a5488 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 04:48:02 +0000 Subject: [PATCH 32/67] chore(deps): bump actions/setup-node from 3.8.0 to 3.8.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.0 to 3.8.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/bea5baf987ba7aa777a8a0b4ace377a21c45c381...5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/acceptance-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index a7a76b504..d5c3fa894 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -63,7 +63,7 @@ jobs: go-version-file: '.go-version' - name: Set up Node - uses: actions/setup-node@bea5baf987ba7aa777a8a0b4ace377a21c45c381 # 3.8.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # 3.8.1 with: node-version: 18 From 5a889bd665eea457a0a0da8bb5c070cb94634730 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 21 Aug 2023 13:55:56 -0400 Subject: [PATCH 33/67] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b6ab795f..ac534bbd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.5.0 (Unreleased) +## 2.4.2 (August 21, 2023) BUG FIXES: * `r/virtual_machine`: Fix hardware version error when cloning and/or configuring a VM/Template ([#1995](https://github.com/hashicorp/terraform-provider-vsphere/pull/1995)) From f8989de314345b4b9edb251b184cbdefd6922555 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 21 Aug 2023 14:16:29 -0400 Subject: [PATCH 34/67] Update lockfiles --- acctests/equinix/.terraform.lock.hcl | 32 ++++++++++---------- acctests/vsphere/base/.terraform.lock.hcl | 26 ++++++++-------- acctests/vsphere/testrun/.terraform.lock.hcl | 26 ++++++++-------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/acctests/equinix/.terraform.lock.hcl b/acctests/equinix/.terraform.lock.hcl index 10dc6ed01..1542f7f89 100644 --- a/acctests/equinix/.terraform.lock.hcl +++ b/acctests/equinix/.terraform.lock.hcl @@ -2,23 +2,23 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/equinix/equinix" { - version = "1.14.3" + version = "1.14.6" hashes = [ - "h1:dQD1//RGMq17YYqRyNPUZiR8e9XmzO/Edz3WgU0Bads=", - "zh:0c775e1867793c4e2ac1c01f6f8f62ab7052c77cf7bbb7a547a53e3c1d4d9e41", - "zh:1b31dd64a51ee08da5dd8dad69c918995bc3e8460aa016c9d3c420f68cf87a2f", - "zh:2e3f2a1b7ebca407faecd984376451c50d92d7d9845511ef93fe84d2cb1d90f2", - "zh:6c808e8c26299f4f45a51463a7d0174736ad55dac81582200d1a8de2ae5ff929", - "zh:71a14f57ffda6c42df1316125395b8a62fc86e64c2c96d56287377dc171588d4", - "zh:7d416558e2059e29b56345a32f87f239342243f29c8eca8cf41a3f61699ebe54", - "zh:9035eee4a4b8984caf0099bdd9c0339c1efb6193d3f49276c639b6010da14354", - "zh:9fa46be0021524dafaaa8b54b9171d3331e50dd55d588d35e504ee00f95a1a6e", - "zh:abf72f188cf5c05657be3f3a46e7ba8de137d3e1bd58c1e281bff19e21120646", - "zh:c33375747011a58b89fa5d7ae47d9cc1f44052bc97f8fd6296084c59540a7bc9", - "zh:e3ac23e2544a46f577df14320ce829a498a6b24ff936d6558c14696a10afdacf", - "zh:ecdffb2694053cced2abaf0595903ae708f90ac41da8c4c504c4bcdde09e8227", - "zh:f76e175cb871f48b4e352942ae4308253a7113674d4e21108d072b55cb734fa2", - "zh:f7cc0717495f108ddfcaf843d25707ae0f6c8f2e6532f676037dc4c33380f31a", + "h1:7r/as5a8SMmdEqqp7B84V9QKtHJ5RfKrB6+dcvE857g=", + "zh:0e4975e07d3d1da02398254927bee68428f3988362ddbac13de577eaff840cb4", + "zh:148c81ad531aaad1c197beb0ba199507c1ef72ce60fd477cc6a4b279c98b5314", + "zh:17a436fd86030d1fc20b2d11d50846568fc9a3bc85beac2036f5a693a2ba7889", + "zh:1856b7b7f6c02b2b37a65409a3d43378af9ff879d576daf848662574e902d620", + "zh:45347bd9b0fff4110c5fe38d6aaa2410788fa19e133c3ec8c5d8680b067dd569", + "zh:4c3fd2dc049979ef4e59a32eb826a9dfd119bf47462c00e15ab64b6beec1ea25", + "zh:781429fdbadf447ce62dea3742ffa94e0630ad7f57974a55a5f6c9440e6f27ae", + "zh:797048c1b4a99c0c0541d8dff2bd2f5190532de9646df313fea9de7cbfe378ef", + "zh:8b8183d44c0ece1bc8f119ddf72c912f919def9ac50cf56eabc693642602ff8b", + "zh:9f9320b8e5538002a72e911c1c320780535fba5d11994c03e28875b9af7dfe82", + "zh:b0be0698d3ced13f1fd6c647ef0dadfff4447301eb4d3656bf3c89eedd9bac0b", + "zh:bea010032e3768a3cdfebf912bf7f1836babb4d48409660d4a454deb04f0bda4", + "zh:d3a6dcc63d5e839c67f484bb820984b17b43a5be248aa24c3b13cfd3234ec3f5", + "zh:e58771b3c0d2db0e8166c8d528c50f6c5c77d4b2400267a3f2f2810cb2776ada", ] } diff --git a/acctests/vsphere/base/.terraform.lock.hcl b/acctests/vsphere/base/.terraform.lock.hcl index 63c402ae8..c20123759 100644 --- a/acctests/vsphere/base/.terraform.lock.hcl +++ b/acctests/vsphere/base/.terraform.lock.hcl @@ -40,20 +40,20 @@ provider "registry.terraform.io/hashicorp/time" { } provider "registry.terraform.io/hashicorp/vsphere" { - version = "2.4.1" + version = "2.4.2" hashes = [ - "h1:LNsoAjl8Pdk1OA2OMjhzj9+P9dwe6ycCva1A5CQp3mw=", + "h1:4XUhLS7McWVYRMKfoSs7+uk8OWKz9+dgH/njJHE24Ug=", + "zh:04fe2aa13bee6f19e7e8cb1e8daa7d5c86c13bad18f9db31128e0f91290de40a", "zh:0fa82a384b25a58b65523e0ea4768fa1212b1f5cfc0c9379d31162454fedcc9d", - "zh:28789999b89e3d8437bdecae33148440f6230d83c956d1f3a7bdf6b3b6a5cbee", - "zh:3fa05a851f2915378acd3f9b033249176a1f34d711ab1405f7cf246521e50aca", - "zh:4490a2fe8bb8da58992a422e29df44defae46b81f0ea6cb899a19e7516d6d2c5", - "zh:468061c16caed498d3dec45ea8c2bbacea5fa33ce1dd0960a08de4357127f3fb", - "zh:6f10ab08971d1602f56b593ace31cd6d9ec63129666920ffaf2e799fa2efdb60", - "zh:958448da9912f84683c9b28cbd9b52dbbce53867e8994f93910a95742cbac90c", - "zh:99bfe452b2a0a314b6fcc9dc12c008687f1cfe12c1a58ee746d2a09294fc2478", - "zh:acd8020f684c924ca7036da0f2dbf16e67d1a9fd1145635e3c9a5544a9f1b11c", - "zh:eb85322ebc1129d0d22e461dc90a3da86d7ddb8ea70681fe535d8f6fb6f0adce", - "zh:ec9a24270c466e628d700d9f4f5bec61e99593b015d9ad2b0db282e94f2a3609", - "zh:f2e6c93c2406a1e6e7ea8617d239f8ef78da8d6aa8ddf654e6f955d9e240721d", + "zh:20300aeb26647ab01736422d0fecabab6a5746b30bba18be12a905e8a15135fb", + "zh:3d38b34039d8440c5532855aa8f505e9da99b1bf9bad114352a288b3ac7bf7b3", + "zh:7512ace70fc4c9639bedd1f30f006e9304d776d0d14db7d16fa49acffb204d07", + "zh:95ddf3000a26b001f119f1402a246aa30cdae8a001dd155d92c02a3e0dc141f3", + "zh:ac2d5c0efe7219609606998a41a1307447f235e3fa5f478007a5013d5272ba4f", + "zh:ad5728a03771920e3849a8a7793931f1cf18cf7575d622c9471b9e12820c6c12", + "zh:c8a05d8aed4f8ca5417a63c39937567e45ec3222dac659daf4a8cf6d664bdb16", + "zh:c8b5581714c81217d4b48c6209fb84ea98543b3fc568be28281a98846749d457", + "zh:d95677d78a60d47b7cefa810c988801ca8ad6ae0f2eb61055f8012c081a2da25", + "zh:de9eaaa554dcac7d9c96efe4a478cb05bd67885105b5af7d835b21d5091fe0fe", ] } diff --git a/acctests/vsphere/testrun/.terraform.lock.hcl b/acctests/vsphere/testrun/.terraform.lock.hcl index acd525562..5a95a4da8 100644 --- a/acctests/vsphere/testrun/.terraform.lock.hcl +++ b/acctests/vsphere/testrun/.terraform.lock.hcl @@ -78,20 +78,20 @@ provider "registry.terraform.io/hashicorp/time" { } provider "registry.terraform.io/hashicorp/vsphere" { - version = "2.4.1" + version = "2.4.2" hashes = [ - "h1:LNsoAjl8Pdk1OA2OMjhzj9+P9dwe6ycCva1A5CQp3mw=", + "h1:4XUhLS7McWVYRMKfoSs7+uk8OWKz9+dgH/njJHE24Ug=", + "zh:04fe2aa13bee6f19e7e8cb1e8daa7d5c86c13bad18f9db31128e0f91290de40a", "zh:0fa82a384b25a58b65523e0ea4768fa1212b1f5cfc0c9379d31162454fedcc9d", - "zh:28789999b89e3d8437bdecae33148440f6230d83c956d1f3a7bdf6b3b6a5cbee", - "zh:3fa05a851f2915378acd3f9b033249176a1f34d711ab1405f7cf246521e50aca", - "zh:4490a2fe8bb8da58992a422e29df44defae46b81f0ea6cb899a19e7516d6d2c5", - "zh:468061c16caed498d3dec45ea8c2bbacea5fa33ce1dd0960a08de4357127f3fb", - "zh:6f10ab08971d1602f56b593ace31cd6d9ec63129666920ffaf2e799fa2efdb60", - "zh:958448da9912f84683c9b28cbd9b52dbbce53867e8994f93910a95742cbac90c", - "zh:99bfe452b2a0a314b6fcc9dc12c008687f1cfe12c1a58ee746d2a09294fc2478", - "zh:acd8020f684c924ca7036da0f2dbf16e67d1a9fd1145635e3c9a5544a9f1b11c", - "zh:eb85322ebc1129d0d22e461dc90a3da86d7ddb8ea70681fe535d8f6fb6f0adce", - "zh:ec9a24270c466e628d700d9f4f5bec61e99593b015d9ad2b0db282e94f2a3609", - "zh:f2e6c93c2406a1e6e7ea8617d239f8ef78da8d6aa8ddf654e6f955d9e240721d", + "zh:20300aeb26647ab01736422d0fecabab6a5746b30bba18be12a905e8a15135fb", + "zh:3d38b34039d8440c5532855aa8f505e9da99b1bf9bad114352a288b3ac7bf7b3", + "zh:7512ace70fc4c9639bedd1f30f006e9304d776d0d14db7d16fa49acffb204d07", + "zh:95ddf3000a26b001f119f1402a246aa30cdae8a001dd155d92c02a3e0dc141f3", + "zh:ac2d5c0efe7219609606998a41a1307447f235e3fa5f478007a5013d5272ba4f", + "zh:ad5728a03771920e3849a8a7793931f1cf18cf7575d622c9471b9e12820c6c12", + "zh:c8a05d8aed4f8ca5417a63c39937567e45ec3222dac659daf4a8cf6d664bdb16", + "zh:c8b5581714c81217d4b48c6209fb84ea98543b3fc568be28281a98846749d457", + "zh:d95677d78a60d47b7cefa810c988801ca8ad6ae0f2eb61055f8012c081a2da25", + "zh:de9eaaa554dcac7d9c96efe4a478cb05bd67885105b5af7d835b21d5091fe0fe", ] } From 1f6cd8b0819cab0e929478ef0fa4f4c1f7282a42 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 24 Aug 2023 21:09:37 -0400 Subject: [PATCH 35/67] Update acctests README --- acctests/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/acctests/README.md b/acctests/README.md index 8bd99f993..647bc9191 100644 --- a/acctests/README.md +++ b/acctests/README.md @@ -74,6 +74,7 @@ A few manual steps need to be taken to privately network the nested ESXis setup 4. Power on the vcsa VM 5. Visit the vCenter IP again, but this time port `:5480`, signing in may fail the first time, but it is the vsphere username/password found in `acctests/equinix/devrc` 6. In the networking tab give it a valid IP on the private network (assuming 3 nested ESXIs will be created, use the 6th address). +7. OPTIONAL: vCenter ships with a 60 day evaluation license. You could take this opportunity to add a permanent license into inventory, and right click the top-level vCenter instance and assign the license. ### TestRun Step This config can be destroyed between full test runs of the provider. It should cover cleaning up of things like the nested ESXis running in the wrong cluster, and cleaning up any leftover files in the NFS. Any lingering resources outside of those may need manual cleanup. @@ -138,9 +139,9 @@ With these set, the nightly acceptances tests should run, normally the results o * Sometimes the API seems to lockup/crash or lockout the CI client resulting in widespread error 503s. ### PLEASE NOTE -The current VCSA deployment seen in `acctests/equinix/vcsa_deploy.json` is set to thin provision the primary datastore `datastore1`. It seems that over time the VCSA VM will continue to expand until the datastore is full. There is probably a way to prevent this. Without this being corrected, or a bare metal server with more primary disk space being chosen, the CI probably needs to be rebuilt from scratch about once a month. +The current VCSA deployment seen in `acctests/equinix/vcsa_deploy.json` is set to thin provision the primary datastore `datastore1`. It seems that over time the VCSA VM will continue to expand until the datastore is full. There is probably a way to properly configure this in `acctests/equinix/vcsa_deploy.json`. Without this being corrected, or a bare metal server with more primary disk space being chosen, the CI probably needs to be rebuilt from scratch every 45 days. -The main ESXi also only comes with an evaluation license good for 60 days (not an issue if we are forced to rebuild every 30 due to space issue). We do have an ESXi 7 license, but it has to be manually assigned to the host and generally it's been easier to just rebuild from scratch every 60 days (although this could easily be added as a manual step alongside the networking manual steps). The short term time limits this poses may not be a problem if CI can be improved to the point where the entire system is brought up and torn down daily. +vSphere vCenter comes with a 60 day evaluation license. Until the space issue is resolved it is not essential that a permanent vCenter license be added. Longterm it would be nice if the entire infrastructure could be brought up and torn down daily, meaning neither issue would need to be addressed. # Local Testing The tests and required infrastructure have been heavily streamlined (believe it or not...) however its still expected they run Equinix for now, but it should be theoretically possible to run tests against local hardware (or perhaps totally virtualized). The main requirement is ESXi 7 with the following: From 78f7ae05f97b4597b1e76769936ec3b9e16afbd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 04:50:40 +0000 Subject: [PATCH 36/67] chore(deps): bump actions/checkout from 3.5.3 to 3.6.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/c85c95e3d7251135ab7dc9ce3241c5835cc595a9...f43a0e5ff2bd294095638e18286ca9a3d1956744) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/acceptance-tests.yaml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/issue-opened.yml | 2 +- .github/workflows/issue_greeting.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/unit_tests.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index d5c3fa894..8988689f2 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -27,7 +27,7 @@ jobs: VSPHERE_PERSIST_SESSION: true steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 with: ref: 'main' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 603f684c3..f18f04dfe 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,7 +19,7 @@ jobs: - go steps: - name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - name: Initialize CodeQL uses: github/codeql-action/init@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 with: diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml index 46accc35b..db0f1024f 100644 --- a/.github/workflows/issue-opened.yml +++ b/.github/workflows/issue-opened.yml @@ -8,7 +8,7 @@ jobs: issue_triage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/issue_greeting.yml b/.github/workflows/issue_greeting.yml index 8efeae0c1..939e64f8d 100644 --- a/.github/workflows/issue_greeting.yml +++ b/.github/workflows/issue_greeting.yml @@ -11,7 +11,7 @@ jobs: if: github.event.issue.author_association == 'NONE' steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 with: fetch-depth: 1 - name: Render Template diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61479992b..b1cba206a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: release-notes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 with: fetch-depth: 0 - name: Generate Release Notes diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 8c63e5052..87a7dda03 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - name: Set up Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: From dc5492167f5a547ab0b9a31c621647c6fe1a8591 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 04:06:38 +0000 Subject: [PATCH 37/67] chore(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.27.0 to 2.28.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.27.0...v2.28.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 16 ++++++++-------- go.sum | 34 +++++++++++++++++----------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index 9357d8c80..fc89f0321 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/davecgh/go-spew v1.1.1 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 github.com/mitchellh/copystructure v1.2.0 github.com/vmware/govmomi v0.30.7 ) @@ -30,8 +30,8 @@ require ( github.com/hashicorp/hcl/v2 v2.17.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.18.1 // indirect - github.com/hashicorp/terraform-json v0.17.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.16.0 // indirect + github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-plugin-go v0.18.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.1 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect @@ -48,13 +48,13 @@ require ( github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.13.2 // indirect - golang.org/x/crypto v0.10.0 // indirect + golang.org/x/crypto v0.12.0 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/grpc v1.56.1 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 47d42a795..890877aab 100644 --- a/go.sum +++ b/go.sum @@ -60,14 +60,14 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4= github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= -github.com/hashicorp/terraform-json v0.17.0 h1:EiA1Wp07nknYQAiv+jIt4dX4Cq5crgP+TsTE45MjMmM= -github.com/hashicorp/terraform-json v0.17.0/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= -github.com/hashicorp/terraform-plugin-go v0.16.0 h1:DSOQ0rz5FUiVO4NUzMs8ln9gsPgHMTsfns7Nk+6gPuE= -github.com/hashicorp/terraform-plugin-go v0.16.0/go.mod h1:4sn8bFuDbt+2+Yztt35IbOrvZc0zyEi87gJzsTgCES8= +github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= +github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-go v0.18.0 h1:IwTkOS9cOW1ehLd/rG0y+u/TGLK9y6fGoBjXVUquzpE= +github.com/hashicorp/terraform-plugin-go v0.18.0/go.mod h1:l7VK+2u5Kf2y+A+742GX0ouLut3gttudmvMgN0PA74Y= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 h1:I8efBnjuDrgPjNF1MEypHy48VgcTIUY4X6rOFunrR3Y= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0/go.mod h1:cUEP4ly/nxlHy5HzD6YRrHydtlheGvGRJDhiWqqVik4= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 h1:gY4SG34ANc6ZSeWEKC9hDTChY0ZiN+Myon17fSA0Xgc= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0/go.mod h1:deXEw/iJXtJxNV9d1c/OVJrvL7Zh0a++v7rzokW6wVY= github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM= github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -128,8 +128,8 @@ github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0 github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -147,15 +147,15 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -163,12 +163,12 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE= -google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 92e3b9b30ff8959258c32dc5e15d6865beae9da2 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 28 Aug 2023 08:55:17 -0400 Subject: [PATCH 38/67] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac534bbd8..d591604d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.5.0 (Unreleased) + +CHORES: +* Update terraform-plugin-sdk v2.28.0 ([#2002](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2002)) + ## 2.4.2 (August 21, 2023) BUG FIXES: From 5ca39fa7e5d44d45d1bf977b5aa9b2593995f0a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 04:48:27 +0000 Subject: [PATCH 39/67] chore(deps): bump github/codeql-action from 2.21.4 to 2.21.5 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.4 to 2.21.5. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/a09933a12a80f87b87005513f0abb1494c27a716...00e563ead9f72a8461b24876bee2d0c2e8bd2ee8) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f18f04dfe..ad84d3044 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,10 +21,10 @@ jobs: - name: Checkout repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - name: Initialize CodeQL - uses: github/codeql-action/init@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 + uses: github/codeql-action/init@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 with: languages: '${{ matrix.language }}' - name: Autobuild - uses: github/codeql-action/autobuild@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 + uses: github/codeql-action/autobuild@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 + uses: github/codeql-action/analyze@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 From 838180c530e677b05b7516d4ac87f6492a7b8f41 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 1 Sep 2023 12:05:51 -0400 Subject: [PATCH 40/67] Fix hardware version bug --- .../internal/helper/virtualmachine/virtual_machine_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsphere/internal/helper/virtualmachine/virtual_machine_helper.go b/vsphere/internal/helper/virtualmachine/virtual_machine_helper.go index c4bd79881..87f3d6650 100644 --- a/vsphere/internal/helper/virtualmachine/virtual_machine_helper.go +++ b/vsphere/internal/helper/virtualmachine/virtual_machine_helper.go @@ -1002,7 +1002,7 @@ func GetHardwareVersionID(vint int) string { if vint == 0 { return "" } - return fmt.Sprintf("vmx-%d", vint) + return fmt.Sprintf("vmx-%02d", vint) } // GetHardwareVersionNumber gets the hardware version number from string. From 5af37942bc18db47beda079b435bc38b853b2d35 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 1 Sep 2023 12:31:36 -0400 Subject: [PATCH 41/67] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d591604d8..2cdd49eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 2.5.0 (Unreleased) +BUG FIXES: +* `r/virtual_machine`: Fix hardware version conversion ([#2011](https://github.com/hashicorp/terraform-provider-vsphere/pull/2011)) + CHORES: * Update terraform-plugin-sdk v2.28.0 ([#2002](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2002)) From e1677a8398a41d76c0a25b88b526d917a3faf8ce Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 1 Sep 2023 12:15:29 -0400 Subject: [PATCH 42/67] Remove legacy folder CI is in a good enough place to iterate on what exists in acctests/ --- legacy/GNUmakefile | 74 - legacy/README.md | 7 - legacy/circle.yml | 1649 ----------------- legacy/scripts/acc_setup/init.sh | 15 - legacy/scripts/acc_setup/init/main.tf | 42 - .../scripts/acc_setup/init/vcsa_deploy.json | 49 - legacy/scripts/acc_setup/main.tf | 241 --- legacy/scripts/changelog-links.sh | 34 - legacy/scripts/config_builder.sh | 92 - legacy/scripts/errcheck.sh | 27 - legacy/scripts/esxi_restore_snapshot.sh | 9 - legacy/scripts/gogetcookie.sh | 13 - legacy/scripts/test_runner.sh | 47 - legacy/tf-vsphere-devrc.mk.example | 64 - 14 files changed, 2363 deletions(-) delete mode 100644 legacy/GNUmakefile delete mode 100644 legacy/README.md delete mode 100644 legacy/circle.yml delete mode 100755 legacy/scripts/acc_setup/init.sh delete mode 100644 legacy/scripts/acc_setup/init/main.tf delete mode 100644 legacy/scripts/acc_setup/init/vcsa_deploy.json delete mode 100644 legacy/scripts/acc_setup/main.tf delete mode 100755 legacy/scripts/changelog-links.sh delete mode 100755 legacy/scripts/config_builder.sh delete mode 100755 legacy/scripts/errcheck.sh delete mode 100755 legacy/scripts/esxi_restore_snapshot.sh delete mode 100755 legacy/scripts/gogetcookie.sh delete mode 100755 legacy/scripts/test_runner.sh delete mode 100644 legacy/tf-vsphere-devrc.mk.example diff --git a/legacy/GNUmakefile b/legacy/GNUmakefile deleted file mode 100644 index a3402bb11..000000000 --- a/legacy/GNUmakefile +++ /dev/null @@ -1,74 +0,0 @@ -CFG ?= $(HOME)/.tf-vsphere-devrc.mk - --include $(CFG) - -TEST?=$$(go list ./... |grep -v 'vendor') -GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) -WEBSITE_REPO=github.com/hashicorp/terraform-website -PKG_NAME=vsphere - - -default: build - -envvars: - @cat ~/.tf-vsphere-devrc.mk | sed -e "s/\?=/=/g" -e "s/ *= */=/g" - -build: fmtcheck - go install - -test: fmtcheck - go test $(TEST) || exit 1 - echo $(TEST) | \ - xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 - -testacc: fmtcheck - TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 240m - -debugacc: fmtcheck - TF_ACC=1 dlv test $(TEST) -- -test.v $(TESTARGS) - -vet: - @echo "go vet ." - @go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \ - echo ""; \ - echo "Vet found suspicious constructs. Please check the reported constructs"; \ - echo "and fix them if necessary before submitting the code for review."; \ - exit 1; \ - fi - -fmt: - gofmt -w $(GOFMT_FILES) - -docscheck: - @sh -c "'$(CURDIR)/scripts/docscheck.sh'" - -fmtcheck: - @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" - -errcheck: - @sh -c "'$(CURDIR)/scripts/errcheck.sh'" - -test-compile: - @if [ "$(TEST)" = "./..." ]; then \ - echo "ERROR: Set TEST to a specific package. For example,"; \ - echo " make test-compile TEST=./$(PKG_NAME)"; \ - exit 1; \ - fi - go test -c $(TEST) $(TESTARGS) - -website: -ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) - echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." - git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) -endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) - -website-test: -ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) - echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." - git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) -endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) - -.PHONY: build test testacc vet docscheck fmt fmtcheck errcheck test-compile website website-test - diff --git a/legacy/README.md b/legacy/README.md deleted file mode 100644 index 85048c3b4..000000000 --- a/legacy/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Legacy scripts and testing workflow - -This folder contain files and scripts mostly used in the CI and development workflow of the provider from previous maintainers that are no longer active/supported. The acceptance tests have a patchy history and have run in TeamCity, Circle, Packet (now Equinix Metal), then on local homelabs, and now finally back in Equinix Metal (for now). The vSphere provider is unique in nature, it operates much closer to physical hardware, providing test coverage for these environments has proven to be challenging over the years, as well as costly. - -These files are being kept around and isolated until a new official acceptance testing setup is developed and documented. For the current Equinix Metal based setup, see the folder `acctests`. - -The provider will be undergoing some technical debt servicing and part of that effort is to develop a more scalable acceptance testing workflow. \ No newline at end of file diff --git a/legacy/circle.yml b/legacy/circle.yml deleted file mode 100644 index 2a31f7b5e..000000000 --- a/legacy/circle.yml +++ /dev/null @@ -1,1649 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -version: 2 - -references: - images: - go: &GOLANG_IMAGE docker.mirror.hashicorp.services/circleci/circleci/golang:1.18 - -jobs: - build: - docker: - - image: *GOLANG_IMAGE - working_directory: ~/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - run: - name: "Run Tests" - command: | - cd $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - make test - - run: - name: "Run docscheck script " - command: | - cd $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - make docscheck - - run: - name: "Run Build" - command: | - cd $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - make build - linters: - docker: - - image: *GOLANG_IMAGE - working_directory: $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Get tfproviderlint" - command: | - GO111MODULE=on go install github.com/bflad/tfproviderlint/cmd/tfproviderlint - - run: - no_output_timeout: 90m - name: "Run tfproviderlint" - command: | - cd $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - tfproviderlint -AT00{1..3} -R00{2..4} -S0{{01..12},{14..19}} ./... - revert_snapshot: - docker: - - image: *GOLANG_IMAGE - working_directory: $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - name: "revert snapshot" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/revert_snapshot.sh - test_acc_Client: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh Client - - test_acc_DataSourceVSphereComputeCluster: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereComputeCluster - - test_acc_DataSourceVSphereCustomAttribute: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereCustomAttribute - - test_acc_DataSourceVSphereDatacenter: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereDatacenter - - test_acc_DataSourceVSphereDatastore: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereDatastore - - test_acc_DataSourceVSphereDatastoreCluster: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereDatastoreCluster - - test_acc_DataSourceVSphereDistributedVirtualSwitch: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereDistributedVirtualSwitch - - test_acc_DataSourceVSphereFolder: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereFolder - - test_acc_DataSourceVSphereHost: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereHost - - test_acc_DataSourceVSphereNetwork: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereNetwork - - test_acc_DataSourceVSphereResourcePool: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereResourcePool - - test_acc_DataSourceVSphereTag: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereTag - - test_acc_DataSourceVSphereTagCategory: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereTagCategory - - test_acc_DataSourceVSphereVAppContainer: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereVAppContainer - - test_acc_DataSourceVSphereVirtualMachine: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereVirtualMachine - - test_acc_DataSourceVSphereVmfsDisks: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh DataSourceVSphereVmfsDisks - - test_acc_ResourceVSphereComputeCluster: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeCluster - - test_acc_ResourceVSphereComputeClusterHostGroup: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeClusterHostGroup - - test_acc_ResourceVSphereComputeClusterVMAffinityRule: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeClusterVMAffinityRule - - test_acc_ResourceVSphereComputeClusterVMAntiAffinityRule: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeClusterVMAntiAffinityRule - - test_acc_ResourceVSphereComputeClusterVMDependencyRule: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeClusterVMDependencyRule - - test_acc_ResourceVSphereComputeClusterVMGroup: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeClusterVMGroup - - test_acc_ResourceVSphereComputeClusterVMHostRule: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereComputeClusterVMHostRule - - test_acc_ResourceVSphereCustomAttribute: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereCustomAttribute - - test_acc_ResourceVSphereDatacenter: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDatacenter - - test_acc_ResourceVSphereDatastoreCluster: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDatastoreCluster - - test_acc_ResourceVSphereDatastoreClusterVMAntiAffinityRule: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDatastoreClusterVMAntiAffinityRule - - test_acc_ResourceVSphereDistributedPortGroup: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDistributedPortGroup - - test_acc_ResourceVSphereDistributedVirtualSwitch: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDistributedVirtualSwitch - - test_acc_ResourceVSphereDPMHostOverride: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDPMHostOverride - - test_acc_ResourceVSphereDRSVMOverride: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereDRSVMOverride - - test_acc_ResourceVSphereFile: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereFile - - test_acc_ResourceVSphereFolder: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereFolder - - test_acc_ResourceVSphereHAVMOverride: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereHAVMOverride - - test_acc_ResourceVSphereHost: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereHost - - test_acc_ResourceVSphereHostPortGroup: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereHostPortGroup - - test_acc_ResourceVSphereHostVirtualSwitch: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereHostVirtualSwitch - - test_acc_ResourceVSphereLicense: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereLicense - - test_acc_ResourceVSphereNasDatastore: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereNasDatastore - - test_acc_ResourceVSphereResourcePool: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereResourcePool - - test_acc_ResourceVSphereStorageDrsVMOverride: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereStorageDrsVMOverride - - test_acc_ResourceVSphereTag: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereTag - - test_acc_ResourceVSphereTagCategory: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereTagCategory - - test_acc_ResourceVSphereVAppContainer: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereVAppContainer - - test_acc_ResourceVSphereVAppEntity: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereVAppEntity - - test_acc_ResourceVSphereVirtualDisk: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereVirtualDisk - - test_acc_ResourceVSphereVirtualMachine: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereVirtualMachine - - test_acc_ResourceVSphereVirtualMachineSnapshot: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereVirtualMachineSnapshot - - test_acc_ResourceVSphereVmfsDatastore: - docker: - - image: *GOLANG_IMAGE - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh $TUNNEL_USER@$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 90m - name: "Run Acceptance Tests" - command: | - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh ResourceVSphereVmfsDatastore - -workflows: - version: 2 - nightly_1: - triggers: - - schedule: - cron: "0 3 * * *" - filters: - branches: - only: - - main - jobs: - - linters - - build - - test_acc_Client: - requires: - - build - - test_acc_DataSourceVSphereComputeCluster: - requires: - - test_acc_Client - - test_acc_DataSourceVSphereCustomAttribute: - requires: - - test_acc_DataSourceVSphereComputeCluster - - test_acc_DataSourceVSphereDatacenter: - requires: - - test_acc_DataSourceVSphereCustomAttribute - - test_acc_DataSourceVSphereDatastore: - requires: - - test_acc_DataSourceVSphereDatacenter - - test_acc_DataSourceVSphereDatastoreCluster: - requires: - - test_acc_DataSourceVSphereDatastore - - test_acc_DataSourceVSphereDistributedVirtualSwitch: - requires: - - test_acc_DataSourceVSphereDatastoreCluster - - test_acc_DataSourceVSphereFolder: - requires: - - test_acc_DataSourceVSphereDistributedVirtualSwitch - - test_acc_DataSourceVSphereHost: - requires: - - test_acc_DataSourceVSphereFolder - - test_acc_DataSourceVSphereNetwork: - requires: - - test_acc_DataSourceVSphereHost - - test_acc_DataSourceVSphereResourcePool: - requires: - - test_acc_DataSourceVSphereNetwork - nightly_2: - triggers: - - schedule: - cron: "0 7 * * *" - filters: - branches: - only: - - main - jobs: - - linters - - build - - test_acc_DataSourceVSphereTag: - requires: - - build - - test_acc_DataSourceVSphereTagCategory: - requires: - - test_acc_DataSourceVSphereTag - - test_acc_DataSourceVSphereVAppContainer: - requires: - - test_acc_DataSourceVSphereTagCategory - - test_acc_DataSourceVSphereVirtualMachine: - requires: - - test_acc_DataSourceVSphereVAppContainer - - test_acc_DataSourceVSphereVmfsDisks: - requires: - - test_acc_DataSourceVSphereVirtualMachine - - test_acc_ResourceVSphereComputeCluster: - requires: - - test_acc_DataSourceVSphereVmfsDisks - - test_acc_ResourceVSphereComputeClusterHostGroup: - requires: - - test_acc_ResourceVSphereComputeCluster - - test_acc_ResourceVSphereComputeClusterVMAffinityRule: - requires: - - test_acc_ResourceVSphereComputeClusterHostGroup - - test_acc_ResourceVSphereComputeClusterVMAntiAffinityRule: - requires: - - test_acc_ResourceVSphereComputeClusterVMAffinityRule - - test_acc_ResourceVSphereComputeClusterVMDependencyRule: - requires: - - test_acc_ResourceVSphereComputeClusterVMAntiAffinityRule - - test_acc_ResourceVSphereComputeClusterVMGroup: - requires: - - test_acc_ResourceVSphereComputeClusterVMDependencyRule - - test_acc_ResourceVSphereComputeClusterVMHostRule: - requires: - - test_acc_ResourceVSphereComputeClusterVMGroup - nightly_3: - triggers: - - schedule: - cron: "0 11 * * *" - filters: - branches: - only: - - main - jobs: - - linters - - build - - test_acc_ResourceVSphereCustomAttribute: - requires: - - build - - test_acc_ResourceVSphereDatacenter: - requires: - - test_acc_ResourceVSphereCustomAttribute - - test_acc_ResourceVSphereDatastoreCluster: - requires: - - test_acc_ResourceVSphereDatacenter - - test_acc_ResourceVSphereDatastoreClusterVMAntiAffinityRule: - requires: - - test_acc_ResourceVSphereDatastoreCluster - - test_acc_ResourceVSphereDistributedPortGroup: - requires: - - test_acc_ResourceVSphereDatastoreClusterVMAntiAffinityRule - - test_acc_ResourceVSphereDistributedVirtualSwitch: - requires: - - test_acc_ResourceVSphereDistributedPortGroup - - test_acc_ResourceVSphereDPMHostOverride: - requires: - - test_acc_ResourceVSphereDistributedVirtualSwitch - - test_acc_ResourceVSphereDRSVMOverride: - requires: - - test_acc_ResourceVSphereDPMHostOverride - - test_acc_ResourceVSphereFile: - requires: - - test_acc_ResourceVSphereDRSVMOverride - - test_acc_ResourceVSphereFolder: - requires: - - test_acc_ResourceVSphereFile - - test_acc_ResourceVSphereHAVMOverride: - requires: - - test_acc_ResourceVSphereFolder - - test_acc_ResourceVSphereHost: - requires: - - test_acc_ResourceVSphereHAVMOverride - - test_acc_ResourceVSphereHostPortGroup: - requires: - - test_acc_ResourceVSphereHost - - test_acc_ResourceVSphereHostVirtualSwitch: - requires: - - test_acc_ResourceVSphereHostPortGroup - nightly_4: - triggers: - - schedule: - cron: "0 15 * * *" - filters: - branches: - only: - - main - jobs: - - linters - - build - - test_acc_ResourceVSphereLicense: - requires: - - build - - test_acc_ResourceVSphereNasDatastore: - requires: - - test_acc_ResourceVSphereLicense - - test_acc_ResourceVSphereResourcePool: - requires: - - test_acc_ResourceVSphereNasDatastore - - test_acc_ResourceVSphereStorageDrsVMOverride: - requires: - - test_acc_ResourceVSphereResourcePool - - test_acc_ResourceVSphereTag: - requires: - - test_acc_ResourceVSphereStorageDrsVMOverride - - test_acc_ResourceVSphereTagCategory: - requires: - - test_acc_ResourceVSphereTag - - test_acc_ResourceVSphereVmfsDatastore: - requires: - - test_acc_ResourceVSphereTagCategory - - test_acc_ResourceVSphereVAppEntity: - requires: - - test_acc_ResourceVSphereVmfsDatastore - - test_acc_ResourceVSphereVirtualDisk: - requires: - - test_acc_ResourceVSphereVAppEntity - - test_acc_ResourceVSphereVirtualMachineSnapshot: - requires: - - test_acc_ResourceVSphereVirtualDisk - - test_acc_ResourceVSphereVAppContainer: - requires: - - test_acc_ResourceVSphereVirtualMachineSnapshot - nightly_5: - triggers: - - schedule: - cron: "0 19 * * *" - filters: - branches: - only: - - main - jobs: - - linters - - build - - test_acc_ResourceVSphereVirtualMachine: - requires: - - build diff --git a/legacy/scripts/acc_setup/init.sh b/legacy/scripts/acc_setup/init.sh deleted file mode 100755 index 1fa6a5133..000000000 --- a/legacy/scripts/acc_setup/init.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -set -e -u -o pipefail - -if ! ping -c1 -W1 $TF_VAR_VSPHERE_SERVER; then - sudo mount -o loop $TF_VAR_VCENTER_ISO /mnt - cd init - terraform init - terraform apply --auto-approve - rm terraform.tfstate* - sudo umount /mnt -fi - diff --git a/legacy/scripts/acc_setup/init/main.tf b/legacy/scripts/acc_setup/init/main.tf deleted file mode 100644 index 14f801929..000000000 --- a/legacy/scripts/acc_setup/init/main.tf +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -resource "local_file" "vcsa_template" { - content = templatefile("${path.cwd}/vcsa_deploy.json", { - hostname = var.host1 - password = var.esxi_password - ip_address = var.vcenter_address - ip_prefix = var.vcenter_prefix - gateway = var.vcenter_gateway - vcenter_fqdn = var.vcenter_fqdn - admin_password = "Password123!" - }) - filename = "/tmp/vcsa.json" - provisioner "local-exec" { - command = "/mnt/vcsa-cli-installer/lin64/vcsa-deploy install --accept-eula --acknowledge-ceip --no-ssl-certificate-verification /tmp/vcsa.json" - } -} - -variable "esxi_password" { - default = "changeme" -} - -variable "host1" { - default = "lab1.example.org" -} - -variable "vcenter_address" { - default = "192.168.10.31" -} - -variable "vcenter_prefix" { - default = "24" -} - -variable "vcenter_gateway" { - default = "192.168.10.1" -} - -variable "vcenter_fqdn" { - default = "vcenter.example.org" -} diff --git a/legacy/scripts/acc_setup/init/vcsa_deploy.json b/legacy/scripts/acc_setup/init/vcsa_deploy.json deleted file mode 100644 index 116708779..000000000 --- a/legacy/scripts/acc_setup/init/vcsa_deploy.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "__version": "2.13.0", - "__comments": "Sample template to deploy a vCenter Server Appliance with an embedded Platform Services Controller on an ESXi host.", - "new_vcsa": { - "esxi": { - "hostname": "${hostname}", - "username": "root", - "password": "${password}", - "deployment_network": "VM Network", - "datastore": "datastore1" - }, - "appliance": { - "__comments": [ - "" - ], - "thin_disk_mode": true, - "deployment_option": "tiny", - "name": "vcsa" - }, - "network": { - "ip_family": "ipv4", - "mode": "static", - "ip": "${ip_address}", - "dns_servers": [ - "8.8.8.8" - ], - "prefix": "${ip_prefix}", - "gateway": "${gateway}", - "system_name": "${ip_address}" - }, - "os": { - "password": "${admin_password}", - "ssh_enable": true, - "time_tools_sync": true - }, - "sso": { - "password": "${admin_password}", - "domain_name": "${vcenter_fqdn}" - } - }, - "ceip": { - "description": { - "__comments": "" - }, - "settings": { - "ceip_enabled": false - } - } -} diff --git a/legacy/scripts/acc_setup/main.tf b/legacy/scripts/acc_setup/main.tf deleted file mode 100644 index 7ea0f2913..000000000 --- a/legacy/scripts/acc_setup/main.tf +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -provider "vsphere" { - user = var.VSPHERE_USER - password = var.VSPHERE_PASSWORD - vsphere_server = var.VSPHERE_SERVER - allow_unverified_ssl = true -} - -variable "VSPHERE_SERVER" { -} - -variable "VSPHERE_USER" { -} - -variable "VSPHERE_PASSWORD" { -} - -variable "VSPHERE_ESXI_USERNAME" { -} - -variable "VSPHERE_ESXI1_PASSWORD" { -} - -variable "VSPHERE_ESXI2_PASSWORD" { -} - -variable "VSPHERE_LICENSE" { -} - -variable "VSPHERE_NAS_HOST" { -} - -variable "VSPHERE_NFS_PATH" { -} - -variable "VSPHERE_ESXI1" { -} - -variable "VSPHERE_ESXI2" { -} - -variable "VSPHERE_ESXI1_THUMBPRINT" { -} - -variable "VSPHERE_ESXI2_THUMBPRINT" { -} - -variable "VSPHERE_ESXI_TRUNK_NIC" { -} - -variable "VSPHERE_PXE_VLAN" { -} - -variable "VSPHERE_VCENTER_ADDRESS" { -} - -variable "VSPHERE_VCENTER_NETWORK_PREFIX" { -} - -variable "VSPHERE_VCENTER_GATEWAY" { -} - -variable "VSPHERE_DATACENTER" { -} - -variable "VSPHERE_CLUSTER" { -} - -variable "VSPHERE_RESOURCE_POOL" { -} - -variable "VSPHERE_DVS_NAME" { -} - -variable "VSPHERE_NFS_DS_NAME" { -} - -variable "VSPHERE_PG_NAME" { -} - -variable "VSPHERE_TEMPLATE" {} - -data "vsphere_network" "vmnet" { - datacenter_id = vsphere_datacenter.dc.moid - name = "VM Network" -} - -resource "vsphere_datacenter" "dc" { - name = var.VSPHERE_DATACENTER -} -resource "vsphere_license" "license" { - license_key = var.VSPHERE_LICENSE -} - -resource "vsphere_compute_cluster" "compute_cluster" { - name = var.VSPHERE_CLUSTER - datacenter_id = vsphere_datacenter.dc.moid - host_managed = true - - drs_enabled = true - drs_automation_level = "fullyAutomated" - - ha_enabled = true -} - -resource "vsphere_host" "host1" { - hostname = var.VSPHERE_ESXI1 - username = var.VSPHERE_ESXI_USERNAME - password = var.VSPHERE_ESXI1_PASSWORD - license = vsphere_license.license.license_key - force = true - cluster = vsphere_compute_cluster.compute_cluster.id - thumbprint = var.VSPHERE_ESXI1_THUMBPRINT -} - -resource "vsphere_host" "host2" { - hostname = var.VSPHERE_ESXI2 - username = var.VSPHERE_ESXI_USERNAME - password = var.VSPHERE_ESXI2_PASSWORD - license = vsphere_license.license.license_key - force = true - cluster = vsphere_compute_cluster.compute_cluster.id - thumbprint = var.VSPHERE_ESXI2_THUMBPRINT -} - -resource "vsphere_resource_pool" "pool" { - name = var.VSPHERE_RESOURCE_POOL - parent_resource_pool_id = vsphere_compute_cluster.compute_cluster.resource_pool_id -} - -resource "vsphere_nas_datastore" "ds" { - name = var.VSPHERE_NFS_DS_NAME - host_system_ids = [vsphere_host.host1.id, vsphere_host.host2.id] - type = "NFS" - remote_hosts = [var.VSPHERE_NAS_HOST] - remote_path = var.VSPHERE_NFS_PATH -} - -resource "vsphere_distributed_virtual_switch" "dvs" { - name = var.VSPHERE_DVS_NAME - datacenter_id = vsphere_datacenter.dc.moid - - uplinks = ["uplink1", "uplink2"] - active_uplinks = ["uplink1"] - standby_uplinks = ["uplink2"] - - host { - host_system_id = vsphere_host.host1.id - devices = [var.VSPHERE_ESXI_TRUNK_NIC] - } - - host { - host_system_id = vsphere_host.host2.id - devices = [var.VSPHERE_ESXI_TRUNK_NIC] - } -} - -resource "vsphere_distributed_port_group" "pg" { - name = var.VSPHERE_PG_NAME - distributed_virtual_switch_uuid = vsphere_distributed_virtual_switch.dvs.id - - vlan_id = var.VSPHERE_PXE_VLAN -} - -resource "vsphere_virtual_machine" "template" { - name = var.VSPHERE_TEMPLATE - resource_pool_id = vsphere_compute_cluster.compute_cluster.resource_pool_id - datastore_id = vsphere_nas_datastore.ds.id - datacenter_id = vsphere_datacenter.dc.moid - host_system_id = vsphere_host.host1.id - - template = true - wait_for_guest_net_timeout = -1 - - num_cpus = 2 - memory = 2048 - guest_id = "other3xLinux64Guest" - - network_interface { - network_id = vsphere_distributed_port_group.pg.id - } - - ovf_deploy { - remote_ovf_url = "https://acctest-images.storage.googleapis.com/template_test.ovf" - ovf_network_map = { - "terraform-test-pg" = vsphere_distributed_port_group.pg.id - } - } - disk { - label = "disk0" - size = 20 - } - - cdrom { - client_device = true - } -} - -resource "vsphere_virtual_machine_snapshot" "template_snap" { - virtual_machine_uuid = vsphere_virtual_machine.template.id - snapshot_name = "Snapshot1" - description = "Snapshot for templates" - memory = "true" - quiesce = "true" - remove_children = "false" - consolidate = "true" -} - -resource "vsphere_virtual_machine" "pxe" { - name = "pxe-server" - resource_pool_id = vsphere_compute_cluster.compute_cluster.resource_pool_id - datastore_id = vsphere_nas_datastore.ds.id - - num_cpus = 2 - memory = 2048 - guest_id = "ubuntu64Guest" - - network_interface { - network_id = data.vsphere_network.vmnet.id - } - - network_interface { - network_id = vsphere_distributed_port_group.pg.id - } - - clone { - template_uuid = vsphere_virtual_machine.template.id - } - - disk { - label = "disk0" - size = 20 - } - - cdrom { - client_device = true - } -} - diff --git a/legacy/scripts/changelog-links.sh b/legacy/scripts/changelog-links.sh deleted file mode 100755 index 50f13d75a..000000000 --- a/legacy/scripts/changelog-links.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - - -# This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to -# be Markdown links to the given github issues. -# -# This is run during releases so that the issue references in all of the -# released items are presented as clickable links, but we can just use the -# easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section -# while merging things between releases. - -set -e - -if [[ ! -f CHANGELOG.md ]]; then - echo "ERROR: CHANGELOG.md not found in pwd." - echo "Please run this from the root of the terraform provider repository" - exit 1 -fi - -if [[ `uname` == "Darwin" ]]; then - echo "Using BSD sed" - SED="sed -i.bak -E -e" -else - echo "Using GNU sed" - SED="sed -i.bak -r -e" -fi - -PROVIDER_URL="https:\/\/github.com\/terraform-providers\/terraform-provider-vsphere\/issues" - -$SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md - -rm CHANGELOG.md.bak diff --git a/legacy/scripts/config_builder.sh b/legacy/scripts/config_builder.sh deleted file mode 100755 index 3c3cf9cd0..000000000 --- a/legacy/scripts/config_builder.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -set -e -u -o pipefail - -cat << EOF > /tmp/config.yml -version: 2 -jobs: -EOF - -tests=$(TF_ACC=1 go test github.com/hashicorp/terraform-provider-vsphere/vsphere | grep "\-\-\- FAIL" | awk '{ print $3 }') -categories=$(sed -e s/^TestAcc//g <<< "$tests" | sed -e s/_.*//g | sort -u) -cat << EOF >> /tmp/config.yml - linters: - docker: - - image: circleci/golang:1.19 - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p \$GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* \$GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - run: - name: "Get tfproviderlint" - command: | - go get -u github.com/bflad/tfproviderlint - - run: - no_output_timeout: 30m - name: "Run tfproviderlint" - command: | - CGO_ENABLED=1 tfproviderlint -AT00{1..3} -R00{2..4} -S0{{01..12},{14..19}} ./... -EOF - -for category in $categories; do - cat << EOF >> /tmp/config.yml - test_acc_$category: - docker: - - image: circleci/golang:1.19 - working_directory: /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere - steps: - - checkout - - run: - name: "Move to GOPATH" - command: | - mkdir -p \$GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - mv /home/circleci/src/github.com/hashicorp/terraform-provider-vsphere/* \$GOPATH/src/github.com/hashicorp/terraform-provider-vsphere - - add_ssh_keys: - fingerprints: - - "62:4d:8d:04:48:f7:0f:5a:63:da:de:a6:30:f4:b4:12" - - run: - name: "SSH Tunnel" - command: | - ssh \$TUNNEL_USER@\$TUNNEL_HOST -L 4430:vcenter.vsphere.hashicorptest.internal:443 -L 4431:esxi1.vsphere.hashicorptest.internal:443 -o StrictHostKeyChecking=no -f sleep 32400 - - run: - name: "Get GOVC" - command: | - go get -u github.com/vmware/govmomi/govc - - run: - no_output_timeout: 30m - name: "Run Acceptance Tests" - command: | - \$GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/test_runner.sh $category - -EOF -done - -cat << EOF >> /tmp/config.yml -workflows: - version: 2 - commit: -# triggers: -# - schedule: -# cron: "0 3 * * *" -# filters: -# branches: -# only: -# - main - jobs: - - linters -EOF - -unset $lastCat -for category in $categories; do - [ -z "$lastCat" ] && echo " - test_acc_$category" >> /tmp/config.yml - [ -z "$lastCat" ] || echo " - test_acc_$category:" >> /tmp/config.yml - [ -z "$lastCat" ] || echo " requires:" >> /tmp/config.yml - [ -z "$lastCat" ] || echo " - test_acc_$lastCat" >> /tmp/config.yml - lastCat=$category -done diff --git a/legacy/scripts/errcheck.sh b/legacy/scripts/errcheck.sh deleted file mode 100755 index 2589dc856..000000000 --- a/legacy/scripts/errcheck.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - - -# Check gofmt -echo "==> Checking for unchecked errors..." - -if ! which errcheck > /dev/null; then - echo "==> Installing errcheck..." - go get -u github.com/kisielk/errcheck -fi - -err_files=$(errcheck -ignoretests \ - -ignore 'github.com/hashicorp/terraform/helper/schema:Set' \ - -ignore 'bytes:.*' \ - -ignore 'io:Close|Write' \ - $(go list ./...| grep -v /vendor/)) - -if [[ -n ${err_files} ]]; then - echo 'Unchecked errors found in the following places:' - echo "${err_files}" - echo "Please handle returned errors. You can check directly with \`make errcheck\`" - exit 1 -fi - -exit 0 diff --git a/legacy/scripts/esxi_restore_snapshot.sh b/legacy/scripts/esxi_restore_snapshot.sh deleted file mode 100755 index d7807656d..000000000 --- a/legacy/scripts/esxi_restore_snapshot.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -set -e -u -o pipefail - -for i in `govc ls /ha-datacenter/vm`; do - govc snapshot.revert -vm $i $VSPHERE_ESXI_SNAPSHOT; -done diff --git a/legacy/scripts/gogetcookie.sh b/legacy/scripts/gogetcookie.sh deleted file mode 100755 index b69984c0e..000000000 --- a/legacy/scripts/gogetcookie.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - - -touch ~/.gitcookies -chmod 0600 ~/.gitcookies - -git config --global http.cookiefile ~/.gitcookies - -tr , \\t <<\__END__ >>~/.gitcookies -.googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE -__END__ diff --git a/legacy/scripts/test_runner.sh b/legacy/scripts/test_runner.sh deleted file mode 100755 index e96dd33b1..000000000 --- a/legacy/scripts/test_runner.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -set -e -u -o pipefail - -main () { - eCode=0 - set +e - testList=$(TF_ACC=1 go test github.com/hashicorp/terraform-provider-vsphere/vsphere | grep "\-\-\- FAIL" | awk '{ print $3 }' | grep TestAcc$1_) - set -e - for testName in $testList; do - runTest $testName || eCode=1 - done - exit $eCode -} - -runTest () { - eCode=0 - logfile="/tmp/tpv-build.log.$$" - for try in {1..2}; do - TF_ACC=1 go test github.com/hashicorp/terraform-provider-vsphere/vsphere -v -count=1 -run="$1\$" -timeout 240m 2>&1 | tee $logfile - if grep PASS $logfile &> /dev/null; then - eCode=0 - break - else - echo "test failed. reverting" - revertAndWait - sleep 30 - eCode=1 - fi - done - rm $logfile - return $eCode -} - - -revertAndWait () { - $GOPATH/src/github.com/hashicorp/terraform-provider-vsphere/scripts/esxi_restore_snapshot.sh $VSPHERE_ESXI_SNAPSHOT - sleep 30 - until curl -k "https://$VSPHERE_SERVER/rest/vcenter/datacenter" -i -m 10 2> /dev/null | grep "401 Unauthorized" &> /dev/null; do - echo -n . ;sleep 30 - done - echo ' Done!' -} - -main $1 diff --git a/legacy/tf-vsphere-devrc.mk.example b/legacy/tf-vsphere-devrc.mk.example deleted file mode 100644 index 25db24d84..000000000 --- a/legacy/tf-vsphere-devrc.mk.example +++ /dev/null @@ -1,64 +0,0 @@ -# This file is designed to assist you with configuring your environment for -# testing the vSphere provider, and also serves as a catalog of the environment -# variables that are required to test all of the resources in this provider. -# -# This should be copied to ~/.tf-vsphere-devrc.mk and edited accordingly. -# -# Note that the use of all of this file is not required - environment variables -# can still be completely set from the command line or your existing -# environment. In this case, don't use this file as it may cause conflicts. -# -# NOTE: Remove the annotations from any variables that have them inline, or -# else make will add the whitespace to the variable as well. -# -# The essentials. None of the tests will run if you don't have these. -export VSPHERE_SERVER = vcenter.example.org -export VSPHERE_USER = 'administrator@vcenter.example.org' -export VSPHERE_PASSWORD = changeme -export VSPHERE_ALLOW_UNVERIFIED_SSL = true - - -# The following variables must be altered for your environment -export TF_VAR_VSPHERE_VCENTER_ISO = '/tmp/VMware-VCSA-all-6.7.0-16046470.iso' -export TF_VAR_VSPHERE_ESXI1 = 192.168.10.29 -export TF_VAR_VSPHERE_ESXI2 = 192.168.10.34 -export TF_VAR_VSPHERE_ESXI1_THUMBPRINT = E6:A8:37:75:94:DF:B3:40:CF:DD:F6:35:70:A0:33:A9:9B:42:4C:74 -export TF_VAR_VSPHERE_ESXI2_THUMBPRINT = F0:CE:33:36:2F:BC:95:D2:9A:E8:39:EB:CE:00:FE:21:57:38:D0:AA -export TF_VAR_VSPHERE_ESXI_USERNAME = root -export TF_VAR_VSPHERE_ESXI1_PASSWORD = changeme -export TF_VAR_VSPHERE_ESXI2_PASSWORD = changeme -export TF_VAR_VSPHERE_LICENSE = 00000-00000-00000-00000-00000 -export TF_VAR_VSPHERE_NAS_HOST = nas.example.org -export TF_VAR_VSPHERE_NFS_PATH = /vSphereShared -export TF_VAR_VSPHERE_ESXI_TRUNK_NIC = vmnic1 -export TF_VAR_VSPHERE_PXE_VLAN = 34 -export TF_VAR_VSPHERE_VCENTER_ADDRESS = 192.168.10.31 -export TF_VAR_VSPHERE_VCENTER_NETWORK_PREFIX= 24 -export TF_VAR_VSPHERE_VCENTER_GATEWAY = 192.168.10.1 -export TF_VAR_VSPHERE_REST_SESSION_PATH = /home/user/.govmomi/rest_sessions -export TF_VAR_VSPHERE_VIM_SESSION_PATH = /home/user/.govmomi/sessions - -# These can be changed, but will work at their defaults. They are used for -# altering the default names acceptance tests will use. -export TF_VAR_VSPHERE_DATACENTER = hashi-dc -export TF_VAR_VSPHERE_CLUSTER = hashi-cluster -export TF_VAR_VSPHERE_NFS_DS_NAME = nfs1 -export TF_VAR_VSPHERE_DVS_NAME = testacc-dvs -export TF_VAR_VSPHERE_PG_NAME = terraform-test-portgroup -export TF_VAR_VSPHERE_RESOURCE_POOL = hashi-resource-pool -export TF_VAR_VSPHERE_TEMPLATE = template_test -export TF_VAR_VSPHERE_INIT_TYPE = thin -export TF_VAR_VSPHERE_ADAPTER_TYPE = lsiLogic -export TF_VAR_VSPHERE_DC_FOLDER = dc-folder -export TF_VAR_VSPHERE_DS_FOLDER = datastore-folder/foo -export TF_VAR_VSPHERE_USE_LINKED_CLONE = true -export TF_VAR_VSPHERE_PERSIST_SESSION = true -export TF_VAR_VSPHERE_CLONED_VM_DISK_SIZE = 32 -export TF_VAR_VSPHERE_CONTENT_LIBRARY_FILES = '[ "https://acctest-images.storage.googleapis.com/template_test.ovf", "https://acctest-images.storage.googleapis.com/template_test.mf", "https://acctest-images.storage.googleapis.com/template_test-1.vmdk" ]' -export TF_VAR_REMOTE_OVF_URL = https://acctest-images.storage.googleapis.com/template_test.ovf - -# These are added for compatibility with setup scripts. -export TF_VAR_VSPHERE_SERVER = ${VSPHERE_SERVER} -export TF_VAR_VSPHERE_USER = ${VSPHERE_USER} -export TF_VAR_VSPHERE_PASSWORD = ${VSPHERE_PASSWORD} -export TF_VAR_VSPHERE_ALLOW_UNVERIFIED_SSL = ${VSPHERE_ALLOW_UNVERIFIED_SSL} From 0c5dc5629088db883d5245fb53985ee2171898a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 07:08:31 -0400 Subject: [PATCH 43/67] chore(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3 (#2015) --- .github/workflows/acceptance-tests.yaml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 8988689f2..c2d0c356b 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -84,7 +84,7 @@ jobs: run: echo "TODAY_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Upload test log - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: test-log-${{ env.TODAY_DATE }} path: /tmp/gotest.log diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1cba206a..81d75edfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: fetch-depth: 0 - name: Generate Release Notes run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > release-notes.txt - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: release-notes path: release-notes.txt From 8898dd702c330d7d4fd7b6dc144b8eb0f2261e09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 09:00:11 -0400 Subject: [PATCH 44/67] chore(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 (#2014) --- go.mod | 34 ++++++++-------- go.sum | 120 ++++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 93 insertions(+), 61 deletions(-) diff --git a/go.mod b/go.mod index fc89f0321..fe7126078 100644 --- a/go.mod +++ b/go.mod @@ -4,15 +4,15 @@ go 1.18 require ( github.com/davecgh/go-spew v1.1.1 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/mitchellh/copystructure v1.2.0 github.com/vmware/govmomi v0.30.7 ) require ( - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect github.com/agext/levenshtein v1.2.2 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/fatih/color v1.13.0 // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -23,17 +23,17 @@ require ( github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-plugin v1.5.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.5.2 // indirect - github.com/hashicorp/hcl/v2 v2.17.0 // indirect + github.com/hashicorp/hc-install v0.6.0 // indirect + github.com/hashicorp/hcl/v2 v2.18.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.18.1 // indirect + github.com/hashicorp/terraform-exec v0.19.0 // indirect github.com/hashicorp/terraform-json v0.17.1 // indirect - github.com/hashicorp/terraform-plugin-go v0.18.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-registry-address v0.2.1 // indirect + github.com/hashicorp/terraform-registry-address v0.2.2 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/mattn/go-colorable v0.1.12 // indirect @@ -47,14 +47,14 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - golang.org/x/crypto v0.12.0 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + github.com/zclconf/go-cty v1.14.0 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.13.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect + google.golang.org/grpc v1.57.0 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 890877aab..ba0431e1d 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,15 @@ -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -18,10 +19,11 @@ github.com/dougm/pretty v0.0.0-20171025230240-2ee9d7453c02 h1:tR3jsKPiO/mb6ntzk/ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= +github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -45,38 +47,37 @@ github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.5.2 h1:SfwMFnEXVVirpwkDuSF5kymUOhrUxrTq3udEseZdOD0= -github.com/hashicorp/hc-install v0.5.2/go.mod h1:9QISwe6newMWIfEiXpzuu1k9HAGtQYgnSH8H9T8wmoI= -github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= -github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= +github.com/hashicorp/hc-install v0.6.0 h1:fDHnU7JNFNSQebVKYhHZ0va1bC6SrPQ8fpebsvNr2w4= +github.com/hashicorp/hc-install v0.6.0/go.mod h1:10I912u3nntx9Umo1VAeYPUUuehk0aRQJYpMwbX5wQA= +github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8= +github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4= -github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= +github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM= +github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg= github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= -github.com/hashicorp/terraform-plugin-go v0.18.0 h1:IwTkOS9cOW1ehLd/rG0y+u/TGLK9y6fGoBjXVUquzpE= -github.com/hashicorp/terraform-plugin-go v0.18.0/go.mod h1:l7VK+2u5Kf2y+A+742GX0ouLut3gttudmvMgN0PA74Y= +github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= +github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0 h1:gY4SG34ANc6ZSeWEKC9hDTChY0ZiN+Myon17fSA0Xgc= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0/go.mod h1:deXEw/iJXtJxNV9d1c/OVJrvL7Zh0a++v7rzokW6wVY= -github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM= -github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 h1:wcOKYwPI9IorAJEBLzgclh3xVolO7ZorYd6U1vnok14= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0/go.mod h1:qH/34G25Ugdj5FcM95cSoXzUgIbgfhVLXCcEcYaMwq8= +github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= +github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -109,7 +110,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= +github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= @@ -124,20 +125,33 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV github.com/vmware/govmomi v0.30.7 h1:YO8CcDpLJzmq6PK5/CBQbXyV21iCMh8SbdXt+xNkXp8= github.com/vmware/govmomi v0.30.7/go.mod h1:epgoslm97rLECMV4D+08ORzUBEU7boFSepKjt7AYVGg= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= -github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= -github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc= +github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -145,26 +159,44 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= -google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 4d6bc0c4d0e2f04872ad8f5070ef95e7f125681d Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 8 Sep 2023 16:18:05 -0400 Subject: [PATCH 45/67] docs: update `CHANGELOG.md` Updated `CHANGELOG.md` for v2.4.3 release. Signed-off-by: Ryan Johnson --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cdd49eae..4454ccaeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.5.0 (Unreleased) +## 2.4.3 (September 08, 2023) BUG FIXES: * `r/virtual_machine`: Fix hardware version conversion ([#2011](https://github.com/hashicorp/terraform-provider-vsphere/pull/2011)) From c8166763ca6e3482c7583462373b7d7ae5dd2327 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 18:34:14 -0400 Subject: [PATCH 46/67] chore(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#2012) --- .github/workflows/acceptance-tests.yaml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/issue-opened.yml | 2 +- .github/workflows/issue_greeting.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/unit_tests.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index c2d0c356b..24ad831bb 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -27,7 +27,7 @@ jobs: VSPHERE_PERSIST_SESSION: true steps: - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: 'main' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ad84d3044..f3c4e45b5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,7 +19,7 @@ jobs: - go steps: - name: Checkout repository - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Initialize CodeQL uses: github/codeql-action/init@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 with: diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml index db0f1024f..897bfa4cc 100644 --- a/.github/workflows/issue-opened.yml +++ b/.github/workflows/issue-opened.yml @@ -8,7 +8,7 @@ jobs: issue_triage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/issue_greeting.yml b/.github/workflows/issue_greeting.yml index 939e64f8d..0f3982146 100644 --- a/.github/workflows/issue_greeting.yml +++ b/.github/workflows/issue_greeting.yml @@ -11,7 +11,7 @@ jobs: if: github.event.issue.author_association == 'NONE' steps: - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: fetch-depth: 1 - name: Render Template diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81d75edfa..7d8d72fb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: release-notes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: fetch-depth: 0 - name: Generate Release Notes diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 87a7dda03..f3f28859e 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Set up Go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: From 76c0a2fdf797de875975b66021422a9554cfb5e8 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Mon, 11 Sep 2023 13:28:25 -0400 Subject: [PATCH 47/67] docs: update `r/vsphere_nic` docs (#2017) - Updated the example to show `services` instead of `enabled_services`. - Updated minor markdown errors. - Updated `CHANGELOG.md`. Ref: #1976 Signed-off-by: Ryan Johnson --- CHANGELOG.md | 85 ++++++++++++++++++++++++++++++- website/docs/r/vnic.html.markdown | 24 ++++----- 2 files changed, 93 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4454ccaeb..7d1e32fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,42 +1,60 @@ +# + +## 2.5.0 (Unreleased) + +IMPROVEMENTS: + +* `vsphere_nic`: Documentation updates to resource. ([#2017](https://github.com/hashicorp/terraform-provider-vsphere/pull/2017)) + ## 2.4.3 (September 08, 2023) BUG FIXES: + * `r/virtual_machine`: Fix hardware version conversion ([#2011](https://github.com/hashicorp/terraform-provider-vsphere/pull/2011)) CHORES: + * Update terraform-plugin-sdk v2.28.0 ([#2002](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2002)) + ## 2.4.2 (August 21, 2023) BUG FIXES: + * `r/virtual_machine`: Fix hardware version error when cloning and/or configuring a VM/Template ([#1995](https://github.com/hashicorp/terraform-provider-vsphere/pull/1995)) * `r/virtual_machine`: Fix invalid operation for device '0' when reconfiguring a VM ([#1996](https://github.com/hashicorp/terraform-provider-vsphere/pull/1996)) CHORES: + * Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) * Update govmomi v0.30.7 ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) ## 2.4.1 (June 26, 2023) BUG FIXES: + * `r/compute_cluster`: Added version check for [vSphere 7.0.1 or later](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-9113BBD6-5428-4287-9F61-C8C3EE51E07E.html) when enabling vSAN HCI Mesh. ([#1931](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1931)) ## 2.4.0 (May 5, 2023) FEATURES: + * `d/virtual_machine`: Support lookup by moid. ([#1868](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1868)) * `r/vnic`: Support services for vmkernel adapter/vnic. ([#1855](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1855)) BUG FIXES: + * `r/nas_datastore`: Fix issue mounting and/or unmounting NFS datastores when updating `host_system_ids` as a day-two operation. ([#1860](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1860)) * `r/vm_storage_policy`: Updates the `resourceVMStoragePolicyDelete` method to check the response of `pbmClient.DeleteProfile()` API for errors. If a storage policy is in use and cannot be deleted, the destroy operation will fail and the storage policy will remain in the state. ([#1863](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1863)) * `r/virtual_machine`: Fix vSAN timeout ([#1864](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1864)) IMPROVEMENTS: + * `r/host`: Update docs ([#1884](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1884)) * `r/vnic`: Fix vnic tests ([#1887](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1887)) CHORES: + * Update to terraform-plugin-sdk v2.26.1 ([#1862](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1862)) * Update govmomi v0.30.4 ([#1858](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1858)) @@ -45,12 +63,14 @@ CHORES: **If you are using v2.3.0, please upgrade to this new version as soon as possible.** BUG FIXES: + * `resource/compute_cluster`: Fix panic when reading vSAN. ([#1835](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1835)) * `r/vsphere_file`: Fixes a provider crash by updating the createDirectory method to check if the provided file path has any parent folder(s). If no folders need to be created FileManager.MakeDirectory is not invoked. ([#1866](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1866)) ## 2.3.0 (February 8, 2023) FEATURES: + * `resource/virtual_machine`: Add support for the paravirtual RDMA (PVRDMA) `vmxnet3vrdma` network interface adapter type. ([#1598](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1598)) * `resource/virtual_machine`: Adds support for an optional `extra_config_reboot_required` argument to `r/virtual_machine`. This argument allows you to configure if a virtual machine reboot is enforced when `extra_config` is changed. ([#1603](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1603)) * `resource/virtual_machine`: Adds support for two (2) CD-ROMs attached to a virtual machine. ([#1631](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1631)) @@ -62,12 +82,14 @@ FEATURES: * `resource/role`: Adds support for import. ([#1822](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1822)) BUG FIXES: + * `resource/datastore_cluster`: Fixes error parsing string as enum type for `sdrs_advanced_options`. [(1749](https://github.com/hashicorp/terraform-provider-vsphere/pull/1749)) * `provider`: Reverts a linting update from #1416 back to SHA1. SHA1 is used by vmware/govmomi for the session file. This will allow session reuse from govc. [(1808](https://github.com/hashicorp/terraform-provider-vsphere/pull/1808)) * `resource/compute_cluster`: Fix panic in vsan disk group ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) * `resource/virtual_machine`: Updating the datastore_id on r/virtual_machine will apply to disk sub-resources resolving issue GH-1268. ([#1817](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1817)) IMPROVEMENTS: + * `resource/distributed_virtual_switch`: Adds support for vSphere distributed switch version `8.0.0` in vSphere 8.0. [(1767](https://github.com/hashicorp/terraform-provider-vsphere/pull/1767)) * `resource/virtual_machine`: Enables virtual machine reconfiguration tasks to use the provider `api_timeout` setting. ([#1645](https://github.com/hashicorp/terraform-provider-vsphere/pull/1645)) * `resource/host`: Documentation updates. ([#1675](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1675)) @@ -76,11 +98,13 @@ IMPROVEMENTS: * `vsphere_ovf_vm_template`: Documentation updates to resource and datasource. ([#1792](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1792)) CHORES: + * Bumps [`vmware/govmomi`](https://github.com/vmware/govmomi) from `v0.25.0` to `v0.29.0`. ([#1701](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1701)) ## 2.2.0 (June 16, 2022) BUG FIXES: + * `resource/virtual_machine`: Fixes ability to clone and import virtual machine resources with SATA and IDE controllers. ([#1629](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1629)) * `resource/dvs`: Prevent setting unsupported traffic classes. ([#1633](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1633)) * `resource/virtual_machine`: Fixes provider panic when a non supported PCI device is added outside Terraform to a virtual machine. ([#1627](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1627)) @@ -89,6 +113,7 @@ BUG FIXES: * `helper/content_library`: Fixes content library item local iso upload ([#1665](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1665)) FEATURES: + * `resource/vsphere_host`: Adds support for custom attributes. ([#1619](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1619)) * `resource/virtual_machine`: Adds support for guest customization script for Linux guest operating systems. ([#1621](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1621)) * `datasource/virtual_machine`: support lookup by `uuid`. ([#1650](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1650)) @@ -97,6 +122,7 @@ FEATURES: * `datasource/compute_cluster_host_group`: New data source can be used to read general attributes of a host group. ([#1636](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1636)) IMPROVEMENTS: + * `resource/vsphere_resource_pool`: Documentation updates. ([#1620](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1620)) * `resource/virtual_machine`: Documentation updates. ([#1630](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1630)) * `resource/virtual_machine`: Adds `tools_upgrade_policy` to list of params that trigger a reboot ([#1644](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1644)) @@ -111,14 +137,17 @@ IMPROVEMENTS: **If you are using v2.1.0, please upgrade to this new version as soon as possible.** BUG FIXES: + * `resource/compute_cluster`: Reverts ([#1432](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1432)) switching `vsan_disk_group` back to `TypeList`. Switching from `TypeList` to `TypeSet` is a sore spot when it comes to what is considered a breaking change to provider configuration. Generally we accept that users may use list indices within their config. When this attribute switched to `TypeSet` this caused a breaking change for configurations doing that, as `TypeSet` is indexed by a hash value that Terraform calculates. Furthermore other code around type assertions was not changed and this attribute actually crashed the provider in `v2.1.0`, we will address the now re-opened ([#1205](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1205)) in `v3.0.0` of the provider. ([#1615](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1615)) FEATURES: + * `resource/virtual_machine`: Adds support to check the power state of the resource. ([#1407](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1407)) ## 2.1.0 (February 28, 2022) BUG FIXES: + * `resource/compute_cluster`: Updates `ha_datastore_apd_response_delay` to the API default (180) for `vmTerminateDelayForAPDSec`. Previously set to 3 (minutes) however the codebase uses this value as seconds. Users who had the field left blank may see a warning about the state value drifting from 3 to 180, after applying this should go away. ([#1542](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1542)) * `resource/virtual_machine`: Don't read `storage_policy_id` if vCenter is not configured. This is not a scenario we test or support explicitly ([#1408](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1408)) * `datasource/virtual_machine`: Fixes silent failure and add `default_ip_address` attribute. ([#1532](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1532)) @@ -131,10 +160,12 @@ BUG FIXES: * `resource/virtual_machine`: Sets `annotation` to optional + computed. ([#1588](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1588)) FEATURES: + * `datasource/license`: New datasource can be used to read general attributes of a license. ([#1580](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1580)) * `resource/virtual_machine`: Adds the `tools_upgrade_policy` argument to set the upgrade policy for VMware Tools. ([#1506](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1506)) IMPROVEMENTS: + * `resource/vapp_container`: Documentation updates. ([#1551](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1551)) * `resource/computer_cluster_vm_affinity_rule`: Documentation updates. ([#1544](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1544)) * `resource/computer_cluster_vm_anti_affinity_rule`: Documentation updates. ([#1544](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1544)) @@ -161,30 +192,36 @@ IMPROVEMENTS: ## 2.0.2 (June 25, 2021) BUG FIXES: + * `resource/virtual_machine`: Fix logic bug that caused the provider to set unsupported fields when talking to vsphere 6.5. ([1430](https://github.com/hashicorp/terraform-provide-vsphere/pull/1430)) * `resource/virtual_machine`: Fix resource diff bug where it was not possible to ignore changes to `cdrom` subresource. ([1433](https://github.com/hashicorp/terraform-provide-vsphere/pull/1433)) IMPROVEMENTS: + * `resource/virtual_machine`: Support periodic time syncing for VMs on vsphere 7.0U1 onwards. ([1431](https://github.com/hashicorp/terraform-provide-vsphere/pull/1431)) ## 2.0.1 (June 09, 2021) BUG FIXES: + * `resource/virtual_machine`: Only set vvtd/vbs if vsphere version is newer than 6.5. ([1423](https://github.com/hashicorp/terraform-provider-vsphere/pull/1423)) ## 2.0.0 (June 02, 2021) BREAKING CHANGES: + * `provider`: Moving forward this provider will only work with Terraform version v0.12 and later. * `resource/virtual_machine`: [Deprecated attribute `name`](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/CHANGELOG.md#130-january-26-2018) has been removed from the `disk` subresource. BUG FIXES: + * `datasource/ovf_datasource`: Fix validation error when importing OVF spec. ([1398](https://github.com/hashicorp/terraform-provider-vsphere/pull/1398)) * `resource/virtual_machine`: Fix post-import VM regression. ([1361](https://github.com/hashicorp/terraform-provider-vsphere/pull/1361)) * `resource/virtual_machine`: Round up when calculating disk capacity. ([1397](https://github.com/hashicorp/terraform-provider-vsphere/pull/1397)) * `resource/vnic`: Fix default netstack name. ([1376](https://github.com/hashicorp/terraform-provider-vsphere/pull/1376)) IMPROVEMENTS: + * `provider`: Provider wide API timeout setting. ([1405](https://github.com/hashicorp/terraform-provider-vsphere/pull/1405)) * `provider`: Enable keepalive for REST API sessions. ([1301](https://github.com/hashicorp/terraform-provider-vsphere/pull/1301)) * `provider`: Upgrade Plugin SDK to 2.6.1 ([1379](https://github.com/hashicorp/terraform-provider-vsphere/pull/1379)) @@ -196,41 +233,49 @@ IMPROVEMENTS: ## 1.26.0 (April 20, 2021) BUG FIXES: + * Minor fixes of issues that came up during testing against vSphere 7.0 * Change the way we set the timeout for maintenance mode ([#1392](https://github.com/hashicorp/terraform-provider-vsphere/pull/1392)) IMPROVEMENTS: + * `provider`: vSphere 7 compatibility validation ([#1381](https://github.com/hashicorp/terraform-provider-vsphere/pull/1381)) * `resource/vm`: Allow hardware version up to 19 ([#1391](https://github.com/hashicorp/terraform-provider-vsphere/pull/1391)) ## 1.25.0 (March 17, 2021) BUG FIXES: + * `resource/vsphere_entity_permissions`: Sorting permission objects on username/groupname before storing. ([#1311](https://github.com/hashicorp/terraform-provider-vsphere/pull/1311)) * `resource/vm`: Limit netmask length for ipv4 and ipv6 netmasks. ([#1321](https://github.com/hashicorp/terraform-provider-vsphere/pull/1321)) * `resource/vm`: Fix missing vApp properties. ([#1322](https://github.com/hashicorp/terraform-provider-vsphere/pull/1322)) FEATURES: + * `data/vsphere_ovf_vm_template`: Created data source OVF VM Template. This new data source allows `vsphere_virtual_machine` to be created by its exported attributes. See PR for more details. ([#1339](https://github.com/hashicorp/terraform-provider-vsphere/pull/1339)) IMPROVEMENTS: + * `resource/distributed_virtual_switch`: Allow vsphere 7. ([#1363](https://github.com/hashicorp/terraform-provider-vsphere/pull/1363)) * `provider`: Bump Go to version 1.16. ([#1365](https://github.com/hashicorp/terraform-provider-vsphere/pull/1365)) ## 1.24.3 (December 14, 2020) BUG FIXES: + * `resource/vm`: Support for no disks in config ([#1241](https://github.com/hashicorp/terraform-provider-vsphere/pull/1241)) * `resource/vm`: Make API timeout configurable when building VMs ([#1278](https://github.com/hashicorp/terraform-provider-vsphere/pull/1278)) ## 1.24.2 (October 16, 2020) BUG FIXES: + * `resource/vm`: Prevent guest_id nil condition. ([#1234](https://github.com/hashicorp/terraform-provider-vsphere/pull/1234)) ## 1.24.1 (October 07, 2020) IMPROVEMENTS: + * `data/content_library_item`: Add `type` to content library item data source. ([#1184](https://github.com/hashicorp/terraform-provider-vsphere/pull/1184)) * `resource/virtual_switch`: Fix port group resource to enable LACP in virtual switch only. ([#1214](https://github.com/hashicorp/terraform-provider-vsphere/pull/1214)) * `resource/distributed_port_group`: Import distributed port group using MOID. ([#1208](https://github.com/hashicorp/terraform-provider-vsphere/pull/1208)) @@ -239,6 +284,7 @@ IMPROVEMENTS: * `resource/VM`: Convert folder path to MOID. ([#1207](https://github.com/hashicorp/terraform-provider-vsphere/pull/1207)) BUG FIXES: + * `resource/datastore_cluster`: Fix missing field in import. ([#1203](https://github.com/hashicorp/terraform-provider-vsphere/pull/1203)) * `resource/VM`: Change default OS method on bare VMs. ([#1217](https://github.com/hashicorp/terraform-provider-vsphere/pull/1217)) * `resource/VM`: Read virtual machine after clone and OVF/OVA deploy. ([#1221](https://github.com/hashicorp/terraform-provider-vsphere/pull/1221)) @@ -246,6 +292,7 @@ BUG FIXES: ## 1.24.0 (September 02, 2020) BUG FIXES: + * `resource/vm`: Skip SCSI controller check when empty. ([#1179](https://github.com/hashicorp/terraform-provider-vsphere/pull/1179)) * `resource/vm`: Make storage_policy_id computed to prevent flapping when unset. ([#1185](https://github.com/hashicorp/terraform-provider-vsphere/pull/1185)) * `resource/vm`: Ignore nil objects in host network on read. ([#1186](https://github.com/hashicorp/terraform-provider-vsphere/pull/1186)) @@ -253,6 +300,7 @@ BUG FIXES: * `resource/vm`: Set SCSI controller type to unknown when nil. ([#1188](https://github.com/hashicorp/terraform-provider-vsphere/pull/1188)) IMPROVEMENTS: + * `resource/content_library_item`: Add local upload, OVA, and vm-template sources. ([#1196](https://github.com/hashicorp/terraform-provider-vsphere/pull/1196)) * `resource/content_library`: Subscription and publication support. ([#1197](https://github.com/hashicorp/terraform-provider-vsphere/pull/1197)) @@ -262,17 +310,20 @@ IMPROVEMENTS: ## 1.23.0 (August 21, 2020) BUG FIXES: + * `resource/vnic`: Fix missing fields on vnic import. ([#1162](https://github.com/hashicorp/terraform-provider-vsphere/pull/1162)) * `resource/virtual_machine`: Ignore thin_provisioned and eagerly_scrub during DiskPostCloneOperation. ([#1161](https://github.com/hashicorp/terraform-provider-vsphere/pull/1161)) * `resource/virtual_machine`: Fix SetHardwareOptions to fetch the hardware version from QueryConfigOption. ([#1159](https://github.com/hashicorp/terraform-provider-vsphere/pull/1159)) IMPROVEMENTS: + * `resource/virtual_machine`: Allow performing a linked-clone from a template. ([#1158](https://github.com/hashicorp/terraform-provider-vsphere/pull/1158)) * `data/virtual_machine`: Merge the virtual machine configuration schema. ([#1157](https://github.com/hashicorp/terraform-provider-vsphere/pull/1157)) ## 1.22.0 (August 07, 2020) FEATURES: + * `resource/compute_cluster`: Basic vSAN support on compute clusters. ([#1151](https://github.com/hashicorp/terraform-provider-vsphere/pull/1151)) * `resource/role`: Resource and data source to create and manage vSphere roles. ([#1144](https://github.com/hashicorp/terraform-provider-vsphere/pull/1144)) * `resource/entity_permission`: Resource to create and manage vSphere permissions. ([#1144](https://github.com/hashicorp/terraform-provider-vsphere/pull/1144)) @@ -280,24 +331,29 @@ FEATURES: ## 1.21.1 (July 20, 2020) BUG FIXES: + * `resource/vm`: Set guest_id before customization. ([#1139](https://github.com/hashicorp/terraform-provider-vsphere/pull/1139)) ## 1.21.0 (June 30, 2020) FEATURES: + * `resource/vm`: Support for SATA and IDE disks. ([#1118](https://github.com/hashicorp/terraform-provider-vsphere/pull/1118)) ## 1.20.0 (June 23, 2020) FEATURES: + * `resource/vm`: Add support for OVA deployment. ([#1105](https://github.com/hashicorp/terraform-provider-vsphere/pull/1105)) BUG FIXES: + * `resource/vm`: Delete disks on destroy when deployed from OVA/OVF. ([#1106](https://github.com/hashicorp/terraform-provider-vsphere/pull/1106)) * `resource/vm`: Skip PCI passthrough operations if there are no changes. ([#1112](https://github.com/hashicorp/terraform-provider-vsphere/pull/1112)) ## 1.19.0 (June 16, 2020) FEATURES: + * `data/dynamic`: Data source which can be used to match any tagged managed object. ([#1103](https://github.com/hashicorp/terraform-provider-vsphere/pull/1103)) * `resource/vm_storage_policy_profile`: A resource for tag based storage placement. policies management. ([#1094](https://github.com/hashicorp/terraform-provider-vsphere/pull/1094)) @@ -309,6 +365,7 @@ FEATURES: ## 1.18.3 (June 01, 2020) IMPROVEMENTS: + * `resource/custom_attribute`: Fix id in error message when category is missing. ([#1088](https://github.com/hashicorp/terraform-provider-vsphere/pull/1088)) * `resource/virtual_machine`: Add vApp properties with OVF deployment. ([#1082](https://github.com/hashicorp/terraform-provider-vsphere/pull/1082)) @@ -316,6 +373,7 @@ IMPROVEMENTS: ## 1.18.2 (May 22, 2020) IMPROVEMENTS: + * `resource/host` & `resource/compute_cluster`: Add arguments for specifying if cluster management should be handled in `host` or `compute_cluster` resource. ([#1085](https://github.com/hashicorp/terraform-provider-vsphere/pull/1085)) @@ -324,85 +382,98 @@ IMPROVEMENTS: * `resource/host`: Disconnect rather than entering maintenance mode when deleting. ([#1083](https://github.com/hashicorp/terraform-provider-vsphere/pull/1083)) - ## 1.18.1 (May 12, 2020) BUG FIXES: + * `resource/virtual_machine`: Skip unexpected NIC entries. ([#1067](https://github.com/hashicorp/terraform-provider-vsphere/pull/1067)) * Respect `session_persistence` for REST sessions. ([#1077](https://github.com/hashicorp/terraform-provider-vsphere/pull/1077)) ## 1.18.0 (May 04, 2020) FEATURES: + * `resource/virtual_machine`: Allow users to deploy OVF templates from both from local system and remote URL. ([#1052](https://github.com/hashicorp/terraform-provider-vsphere/pull/1052)) ## 1.17.4 (April 29, 2020) IMPROVEMENTS: + * `resource/virtual_machine`: Mark `product_key` as sensitive. ([#1045](https://github.com/hashicorp/terraform-provider-vsphere/pull/1045)) * `resource/virtual_machine`: Increase max `hardware_version` for vSphere v7.0. ([#1056](https://github.com/hashicorp/terraform-provider-vsphere/pull/1056)) BUG FIXES: + * `resource/virtual_machine`: Fix to disk bus sorting. ([#1039](https://github.com/hashicorp/terraform-provider-vsphere/pull/1039)) * `resource/virtual_machine`: Only include `hardware_version` in CreateSpecs. ([#1055](https://github.com/hashicorp/terraform-provider-vsphere/pull/1055)) ## 1.17.3 (April 22, 2020) - IMPROVEMENTS: + * Use built in session persistence in govmomi. ([#1050](https://github.com/hashicorp/terraform-provider-vsphere/pull/1050)) ## 1.17.2 (April 13, 2020) IMPROVEMENTS: + * `resource/virtual_disk`: Support VMDK files. ([#987](https://github.com/hashicorp/terraform-provider-vsphere/pull/987)) BUG FIXES: + * `resource/virtual_machine`: Fix disk controller sorting. ([#1032](https://github.com/hashicorp/terraform-provider-vsphere/pull/1032)) ## 1.17.1 (April 07, 2020) IMPROVEMENTS: + * `resource/virtual_machine`: Add support for hardware version tracking and upgrading. ([#1020](https://github.com/hashicorp/terraform-provider-vsphere/pull/1020)) * `data/vsphere_network`: Handle cases of network port groups with same name using `distributed_virtual_switch_uuid`. ([#1001](https://github.com/hashicorp/terraform-provider-vsphere/pull/1001)) BUG FIXES: + * `resource/virtual_machine`: Fix working with orphaned devices. ([#1005](https://github.com/hashicorp/terraform-provider-vsphere/pull/1005)) * `resource/virtual_machine`: Ignore `guest_id` with content library. ([#1014](https://github.com/hashicorp/terraform-provider-vsphere/pull/1014)) ## 1.17.0 (March 23, 2020) FEATURES: + * **New Data Source:** `content_library` ([#985](https://github.com/hashicorp/terraform-provider-vsphere/pull/985)) * **New Data Source:** `content_library_item` ([#985](https://github.com/hashicorp/terraform-provider-vsphere/pull/985)) * **New Resource:** `content_library` ([#985](https://github.com/hashicorp/terraform-provider-vsphere/pull/985)) * **New Resource:** `content_library_item` ([#985](https://github.com/hashicorp/terraform-provider-vsphere/pull/985)) IMPROVEMENTS: + * `resource/virtual_machine`: Add `poweron_timeout` option for the amount of time to give a VM to power on. ([#990](https://github.com/hashicorp/terraform-provider-vsphere/pull/990)) ## 1.16.2 (March 04, 2020) IMPROVEMENTS: + * `resource/virtual_machine`: Optimize OS family query. ([#959](https://github.com/hashicorp/terraform-provider-vsphere/pull/959)) * Migrate provider to Terraform plugin SDK. ([#982](https://github.com/hashicorp/terraform-provider-vsphere/pull/982)) ## 1.16.1 (February 06, 2020) BUG FIXES: + * `resource/virtual_machine`: Set `storage_policy_id` based off of VM rather than template. ([#970](https://github.com/hashicorp/terraform-provider-vsphere/pull/970)) ## 1.16.0 (February 04, 2020) FEATURES: + * **New Data Source:** `storage_policy` ([#881](https://github.com/hashicorp/terraform-provider-vsphere/pull/881)) IMPROVEMENTS: + * Switch to govmomi REST client ([#955](https://github.com/hashicorp/terraform-provider-vsphere/pull/955)) * Add storage policy to `virtual_machine` resource. ** Requires `profile-driven storage` privilege on vCenter Server for the Terraform provider user. ([#881](https://github.com/hashicorp/terraform-provider-vsphere/pull/881)) @@ -410,10 +481,12 @@ IMPROVEMENTS: ## 1.15.0 (January 23, 2020) IMPROVEMENTS: + * `resource/virtual_machine`: Do not throw error when disk path is not known yet. ([#944](https://github.com/hashicorp/terraform-provider-vsphere/pull/944)) BUG FIXES: + * `resource/virtual_machine`: Do not set datastoreID in RelocateSpec when datastore_cluster is set. ([#933](https://github.com/hashicorp/terraform-provider-vsphere/pull/933)) * `resource/vapp_container`: Fix handling of child vApp containers. ([#941](https://github.com/hashicorp/terraform-provider-vsphere/pull/941)) @@ -422,14 +495,17 @@ BUG FIXES: ## 1.14.0 (December 18, 2019) IMPROVEMENTS + * `resource/host` Add details to error messages. ([#850](https://github.com/hashicorp/terraform-provider-vsphere/pull/850)) * `resource/virtual_machine`: Pick default datastore for extra disks. ([#897](https://github.com/hashicorp/terraform-provider-vsphere/pull/897)) * `resource/virtual_machine`: Extend `ignored_guest_ips` to support CIDR. ([#841](https://github.com/hashicorp/terraform-provider-vsphere/pull/841)) FEATURES: + * **New Resource:** `vsphere_vnic` ([#876](https://github.com/hashicorp/terraform-provider-vsphere/pull/876)) BUG FIXES: + * `resource/virtual_machine`: Allow blank networkID in order to support cloning into clusters that do not include the source network. ([#787](https://github.com/hashicorp/terraform-provider-vsphere/pull/787)) * `resource/host`: Properly handle situation where NIC teaming policy is `nil`. ([#889](https://github.com/hashicorp/terraform-provider-vsphere/pull/889)) @@ -443,23 +519,28 @@ BUG FIXES: ## 1.13.0 (October 01, 2019) IMPROVEMENTS: + * Add `vim_keep_alive` which sets a keepalive interval for VIM session. ([#792](https://github.com/hashicorp/terraform-provider-vsphere/pull/792)) * `resource/virtual_machine`: Mark `windows_sysprep_text` as sensitive. ([#802](https://github.com/hashicorp/terraform-provider-vsphere/pull/802)) FEATURES: + * **New Resource:** `vsphere_host` ([#836](https://github.com/hashicorp/terraform-provider-vsphere/pull/836)) BUG FIXES: + * `resource/virtual_machine`: Change the way we detect if a VM is in a vApp. ([#825](https://github.com/hashicorp/terraform-provider-vsphere/pull/825)) * Delete tags and tag_categories when they are removed. ([#801](https://github.com/hashicorp/terraform-provider-vsphere/pull/801)) ## 1.12.0 (June 19, 2019) IMPROVEMENTS: + * `resource/virtual_machine`: Allow cloning of powered on virtual machines. ([#785](https://github.com/hashicorp/terraform-provider-vsphere/pull/785)) * Add keep alive timer for VIM sessions. ([#792](https://github.com/hashicorp/terraform-provider-vsphere/pull/792)) BUG FIXES: + * `resource/virtual_machine`: Ignore validation when interpolation is not available. ([#784](https://github.com/hashicorp/terraform-provider-vsphere/pull/784)) * `resource/virtual_machine`: Only set vApp properties that are diff --git a/website/docs/r/vnic.html.markdown b/website/docs/r/vnic.html.markdown index 477e246ad..9530ffdc7 100644 --- a/website/docs/r/vnic.html.markdown +++ b/website/docs/r/vnic.html.markdown @@ -25,7 +25,6 @@ data "vsphere_host" "h1" { datacenter_id = data.vsphere_datacenter.dc.id } - resource "vsphere_distributed_virtual_switch" "d1" { name = "dc_DVPG0" datacenter_id = data.vsphere_datacenter.dc.id @@ -64,7 +63,6 @@ data "vsphere_host" "h1" { datacenter_id = data.vsphere_datacenter.dc.id } - resource "vsphere_host_virtual_switch" "hvs1" { name = "dc_HPG0" host_system_id = data.vsphere_host.h1.id @@ -85,7 +83,7 @@ resource "vsphere_vnic" "v1" { ipv4 { dhcp = true } - enabled_services = ["vsan", "management"] + services = ["vsan", "management"] } ``` @@ -93,16 +91,16 @@ resource "vsphere_vnic" "v1" { * `portgroup` - (Optional) Portgroup to attach the nic to. Do not set if you set distributed_switch_port. * `distributed_switch_port` - (Optional) UUID of the DVSwitch the nic will be attached to. Do not set if you set portgroup. -* `distributed_port_group` - (Optional) Key of the distributed portgroup the nic will connect to. -* `ipv4` - (Optional) IPv4 settings. Either this or `ipv6` needs to be set. See [ipv4 options](#ipv4-options) below. -* `ipv6` - (Optional) IPv6 settings. Either this or `ipv6` needs to be set. See [ipv6 options](#ipv6-options) below. +* `distributed_port_group` - (Optional) Key of the distributed portgroup the nic will connect to. +* `ipv4` - (Optional) IPv4 settings. Either this or `ipv6` needs to be set. See [IPv4 options](#ipv4-options) below. +* `ipv6` - (Optional) IPv6 settings. Either this or `ipv6` needs to be set. See [IPv6 options](#ipv6-options) below. * `mac` - (Optional) MAC address of the interface. * `mtu` - (Optional) MTU of the interface. -* `netstack` - (Optional) TCP/IP stack setting for this interface. Possible values are 'defaultTcpipStack', 'vmotion', 'vSphereProvisioning'. Changing this will force the creation of a new interface since it's not possible to change the stack once it gets created. (Default: `defaultTcpipStack`) -* `services` - (Optional) Enabled services setting for this interface. Current possible values are 'vmotion', 'management', and 'vsan'. +* `netstack` - (Optional) TCP/IP stack setting for this interface. Possible values are `defaultTcpipStack``, 'vmotion', 'vSphereProvisioning'. Changing this will force the creation of a new interface since it's not possible to change the stack once it gets created. (Default:`defaultTcpipStack`) +* `services` - (Optional) Enabled services setting for this interface. Currently support values are `vmotion`, `management`, and `vsan`. +### IPv4 Options -### ipv4 options Configures the IPv4 settings of the network interface. Either DHCP or Static IP has to be set. * `dhcp` - Use DHCP to configure the interface's IPv4 stack. @@ -110,22 +108,20 @@ Configures the IPv4 settings of the network interface. Either DHCP or Static IP * `netmask` - Netmask of the interface, if DHCP is not set. * `gw` - IP address of the default gateway, if DHCP is not set. +### IPv6 Options -### ipv6 options Configures the IPv6 settings of the network interface. Either DHCP or Autoconfig or Static IP has to be set. -* `dhcp` - Use DHCP to configure the interface's IPv4 stack. +* `dhcp` - Use DHCP to configure the interface's IPv6 stack. * `autoconfig` - Use IPv6 Autoconfiguration (RFC2462). * `addresses` - List of IPv6 addresses * `gw` - IP address of the default gateway, if DHCP or autoconfig is not set. - ## Attribute Reference * `id` - The ID of the vNic. - -## Importing +## Importing An existing vNic can be [imported][docs-import] into this resource via supplying the vNic's ID. An example is below: From beeb98b27dce5919a005bafbbd4aa32c3517412e Mon Sep 17 00:00:00 2001 From: "hashicorp-tsccr[bot]" Date: Tue, 12 Sep 2023 14:19:42 +0000 Subject: [PATCH 48/67] Result of tsccr-helper -log-level=info -pin-all-workflows . --- .github/workflows/acceptance-tests.yaml | 2 +- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/issue_greeting.yml | 2 +- .github/workflows/remove-issue-label.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 24ad831bb..00c1423bf 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -63,7 +63,7 @@ jobs: go-version-file: '.go-version' - name: Set up Node - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # 3.8.1 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: node-version: 18 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f3c4e45b5..dee4a4aea 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,10 +21,10 @@ jobs: - name: Checkout repository uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Initialize CodeQL - uses: github/codeql-action/init@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/init@e4262713b504983e61c7728f5452be240d9385a7 # codeql-bundle-v2.14.3 with: languages: '${{ matrix.language }}' - name: Autobuild - uses: github/codeql-action/autobuild@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/autobuild@e4262713b504983e61c7728f5452be240d9385a7 # codeql-bundle-v2.14.3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/analyze@e4262713b504983e61c7728f5452be240d9385a7 # codeql-bundle-v2.14.3 diff --git a/.github/workflows/issue_greeting.yml b/.github/workflows/issue_greeting.yml index 0f3982146..d6cfae06d 100644 --- a/.github/workflows/issue_greeting.yml +++ b/.github/workflows/issue_greeting.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 1 - name: Render Template id: template - uses: chuhlomin/render-template@204ce622bc2fd5c787ff5ca885ff19fb577e7a41 # v1.6 + uses: chuhlomin/render-template@b5c1c085165d9eb712cf4f2b56f89f11146ad017 # v1.7 with: template: .github/issue_greeting_template.md vars: | diff --git a/.github/workflows/remove-issue-label.yml b/.github/workflows/remove-issue-label.yml index da16e4fa3..ae1f93a77 100644 --- a/.github/workflows/remove-issue-label.yml +++ b/.github/workflows/remove-issue-label.yml @@ -13,7 +13,7 @@ jobs: remove-label: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 env: REMOVE_LABEL: ${{ inputs.label-name }} with: From 2467aed188ac56a547528ebde6f101dd37568b43 Mon Sep 17 00:00:00 2001 From: Sheneska Williams <74882676+sheneska@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:50:37 -0400 Subject: [PATCH 49/67] Update meta.d folder --- META.d/summary.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 META.d/summary.yaml diff --git a/META.d/summary.yaml b/META.d/summary.yaml new file mode 100644 index 000000000..cbe78672a --- /dev/null +++ b/META.d/summary.yaml @@ -0,0 +1,15 @@ +--- + +schema: 1.1 + +partition: hcp +category: terraform + +summary: + owner: team-tf-hybrid-cloud + description: | + + + visibility: external + auth_methods: | + \ No newline at end of file From 738ad5c9a055001964343446d5b52d83d3d25ca1 Mon Sep 17 00:00:00 2001 From: Sheneska Williams <74882676+sheneska@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:50:38 -0400 Subject: [PATCH 50/67] Update meta.d folder --- META.d/links.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 META.d/links.yaml diff --git a/META.d/links.yaml b/META.d/links.yaml new file mode 100644 index 000000000..b15cd0fc2 --- /dev/null +++ b/META.d/links.yaml @@ -0,0 +1,7 @@ +runbooks: [] +#- name: +# link: + +other_links: [] +#- name: +# link: \ No newline at end of file From 50796c99239a5f277f6db710c63fbb8128094f19 Mon Sep 17 00:00:00 2001 From: Sheneska Williams <74882676+sheneska@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:50:38 -0400 Subject: [PATCH 51/67] Update meta.d folder --- META.d/tags.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 META.d/tags.yaml diff --git a/META.d/tags.yaml b/META.d/tags.yaml new file mode 100644 index 000000000..e69de29bb From 7fb8abae98682bca5029e032210fe2cb9701bd51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:52:13 -0400 Subject: [PATCH 52/67] chore(deps): bump dawidd6/action-download-artifact from 2.27.0 to 2.28.0 (#2022) --- .github/workflows/acceptance-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 00c1423bf..bf19523ee 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -105,7 +105,7 @@ jobs: run: echo "YESTERDAY_DATE=$(date -d 'yesterday' +'%Y-%m-%d')" >> $GITHUB_ENV - name: Download previous day's log file - uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 + uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0 with: name: test-log-${{ env.YESTERDAY_DATE }} workflow_conclusion: "" # ignore status From b4910a4f783a32b7be9168c06d726a3a37cc771b Mon Sep 17 00:00:00 2001 From: Sheneska Williams <74882676+sheneska@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:44:20 -0400 Subject: [PATCH 53/67] delete meta.d folder --- META.d/summary.yaml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 META.d/summary.yaml diff --git a/META.d/summary.yaml b/META.d/summary.yaml deleted file mode 100644 index cbe78672a..000000000 --- a/META.d/summary.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- - -schema: 1.1 - -partition: hcp -category: terraform - -summary: - owner: team-tf-hybrid-cloud - description: | - - - visibility: external - auth_methods: | - \ No newline at end of file From 6b0265f59f820bdf915591628d40c92fcc7ffc8d Mon Sep 17 00:00:00 2001 From: Sheneska Williams <74882676+sheneska@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:44:20 -0400 Subject: [PATCH 54/67] delete meta.d folder --- META.d/tags.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 META.d/tags.yaml diff --git a/META.d/tags.yaml b/META.d/tags.yaml deleted file mode 100644 index e69de29bb..000000000 From 560b7fca2e6bb4e08c5b5ac5f1c853f68f6f46e8 Mon Sep 17 00:00:00 2001 From: Sheneska Williams <74882676+sheneska@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:45:58 -0400 Subject: [PATCH 55/67] Update meta.d folder --- META.d/_summary.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 META.d/_summary.yaml diff --git a/META.d/_summary.yaml b/META.d/_summary.yaml new file mode 100644 index 000000000..4b15a27e6 --- /dev/null +++ b/META.d/_summary.yaml @@ -0,0 +1,14 @@ +--- + +schema: 1.1 + +partition: tf-ecosystem + +summary: + owner: team-tf-hybrid-cloud + description: | + The Terraform Provider for VMware vSphere is a plugin for Terraform that allows + you to interact with VMware vSphere, notably vCenter Server and ESXi. + + visibility: external + \ No newline at end of file From ab268be489d418de484bcfa6010485b427f1e92f Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:39:04 +0100 Subject: [PATCH 56/67] [COMPLIANCE] Add Copyright and License Headers (#2024) Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> --- META.d/_summary.yaml | 3 +++ META.d/links.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/META.d/_summary.yaml b/META.d/_summary.yaml index 4b15a27e6..05847e290 100644 --- a/META.d/_summary.yaml +++ b/META.d/_summary.yaml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + --- schema: 1.1 diff --git a/META.d/links.yaml b/META.d/links.yaml index b15cd0fc2..efd49fca3 100644 --- a/META.d/links.yaml +++ b/META.d/links.yaml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + runbooks: [] #- name: # link: From 37f0a77fe9e5edfbcb6526553568af43699f1228 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 13:40:27 -0600 Subject: [PATCH 57/67] chore(deps): bump github.com/vmware/govmomi from 0.30.7 to 0.31.0 (#2026) Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.30.7 to 0.31.0. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.30.7...v0.31.0) --- updated-dependencies: - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index fe7126078..e26dc976b 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/mitchellh/copystructure v1.2.0 - github.com/vmware/govmomi v0.30.7 + github.com/vmware/govmomi v0.31.0 ) require ( diff --git a/go.sum b/go.sum index ba0431e1d..513a564aa 100644 --- a/go.sum +++ b/go.sum @@ -33,7 +33,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= @@ -113,8 +113,8 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -122,8 +122,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/vmware/govmomi v0.30.7 h1:YO8CcDpLJzmq6PK5/CBQbXyV21iCMh8SbdXt+xNkXp8= -github.com/vmware/govmomi v0.30.7/go.mod h1:epgoslm97rLECMV4D+08ORzUBEU7boFSepKjt7AYVGg= +github.com/vmware/govmomi v0.31.0 h1:+NC7le8yeXj7f4YUC841jgdWsehN7A3ivqLxm79eKyo= +github.com/vmware/govmomi v0.31.0/go.mod h1:JA63Pg0SgQcSjk+LuPzjh3rJdcWBo/ZNCIwbb1qf2/0= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc= From 57874660d2fe03bbf4c6d372dc3ff8271e9281f6 Mon Sep 17 00:00:00 2001 From: Vasil Atanasov <141020316+vasilsatanasov@users.noreply.github.com> Date: Mon, 2 Oct 2023 22:59:11 +0300 Subject: [PATCH 58/67] fix: disk provisioning settings are not correctly applied (#2028) * Disk settings are not correctly applied Fixes #1028 1) According to the issue eagerly_scrubbed and thin_provision are not applied correctly when set and the providers is throwing an error. It is nomrmal VM disk to receive values different from the ones in the configuration - it depends entirely on the vSphere backend. In such cases the provider should not throw an error. See https://kb.vmware.com/s/article/2145183 - removed the validation regarding both fields so ignore_state fixes the deployment 2) In another comment of the issue it is stated that when VM is cloned with different values for eagerly_scrubbed and thin_provision from the ones of the original disk the values are not applied (tested on VMFS datastore). - initialy the provider stated that if there is no datastore explicitly set for the disk no relocation changes will be sent to the api for this disk. This is changed to making a diff between the disk properties specified in HCL and the same on the exisiting disk on the source VM Added e2e test to cover both cases. Fixed unit tests broken by Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.30.7 to 0.31.0. https://github.com/hashicorp/terraform-provider-vsphere/commit/37f0a77fe9e5edfbcb6526553568af43699f1228 Signed-off-by: Vasil Atanasov * docs: update `CHANGELOG.md` Updates `CHANGELOG.md`. Signed-off-by: Ryan Johnson --------- Signed-off-by: Vasil Atanasov Signed-off-by: Ryan Johnson Co-authored-by: Ryan Johnson --- CHANGELOG.md | 156 +++++++++--------- .../contentlibrary/content_library_helper.go | 5 +- .../virtual_machine_disk_subresource.go | 138 +++++++++++++--- ...ource_vsphere_content_library_item_test.go | 4 +- .../resource_vsphere_content_library_test.go | 4 +- .../resource_vsphere_virtual_machine_test.go | 129 +++++++++++++++ 6 files changed, 331 insertions(+), 105 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1e32fbd..6dd2ba0e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,61 +2,70 @@ ## 2.5.0 (Unreleased) +BUG FIXES: + +* `resource/virtual_machine`: Removes the validation for `eagerly_scrubbed` and `thin_provision` fields for a disk subresource so that `ignore_changes` resolves a deployment. ([#2028](https://github.com/hashicorp/terraform-provider-vsphere/pull/2028) +* `resource/virtual_machine`: Adds a differential between the disk properties specified and those existing on the source virtual machine disk, allowing changes to be sent to the API for disk subresource. ([#2028](https://github.com/hashicorp/terraform-provider-vsphere/pull/2028) + IMPROVEMENTS: -* `vsphere_nic`: Documentation updates to resource. ([#2017](https://github.com/hashicorp/terraform-provider-vsphere/pull/2017)) +* `resource/vsphere_nic`: Documentation updates. ([#2017](https://github.com/hashicorp/terraform-provider-vsphere/pull/2017)) + +CHORES: + +* `provider`: Updates `vmware/govmomi` to v0.31.0. ([#2026](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2026)) ## 2.4.3 (September 08, 2023) BUG FIXES: -* `r/virtual_machine`: Fix hardware version conversion ([#2011](https://github.com/hashicorp/terraform-provider-vsphere/pull/2011)) +* `resource/virtual_machine`: Fixes hardware version conversion. ([#2011](https://github.com/hashicorp/terraform-provider-vsphere/pull/2011)) CHORES: -* Update terraform-plugin-sdk v2.28.0 ([#2002](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2002)) +* `provider`: Updates `terraform-plugin-sdk` v2.28.0. ([#2002](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2002)) +* `provider`: Updates `vmware/govmomi` to v0.30.7. ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) - ## 2.4.2 (August 21, 2023) BUG FIXES: -* `r/virtual_machine`: Fix hardware version error when cloning and/or configuring a VM/Template ([#1995](https://github.com/hashicorp/terraform-provider-vsphere/pull/1995)) -* `r/virtual_machine`: Fix invalid operation for device '0' when reconfiguring a VM ([#1996](https://github.com/hashicorp/terraform-provider-vsphere/pull/1996)) +* `resource/virtual_machine`: Fixes hardware version error when cloning and/or configuring a VM/Template. ([#1995](https://github.com/hashicorp/terraform-provider-vsphere/pull/1995)) +* `resource/virtual_machine`: Fixes invalid operation for device '0' when reconfiguring a VM. ([#1996](https://github.com/hashicorp/terraform-provider-vsphere/pull/1996)) CHORES: -* Update to terraform-plugin-sdk v2.27.0 ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) -* Update govmomi v0.30.7 ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) +* `provider`: Updates `terraform-plugin-sdk` to v2.27.0. ([#1937](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1937)) +* `provider`: Updates `vmware/govmomi` to v0.30.7. ([#1972](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1972)) ## 2.4.1 (June 26, 2023) BUG FIXES: -* `r/compute_cluster`: Added version check for [vSphere 7.0.1 or later](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-9113BBD6-5428-4287-9F61-C8C3EE51E07E.html) when enabling vSAN HCI Mesh. ([#1931](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1931)) +* `resource/compute_cluster`: Adds version check for [vSphere 7.0.1 or later](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-9113BBD6-5428-4287-9F61-C8C3EE51E07E.html) when enabling vSAN HCI Mesh. ([#1931](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1931)) ## 2.4.0 (May 5, 2023) FEATURES: -* `d/virtual_machine`: Support lookup by moid. ([#1868](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1868)) -* `r/vnic`: Support services for vmkernel adapter/vnic. ([#1855](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1855)) +* `datasource/virtual_machine`: Adds support for lookup by moid. ([#1868](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1868)) +* `resource/vnic`: Adds support for services on vmkernel adapter/vnic. ([#1855](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1855)) BUG FIXES: -* `r/nas_datastore`: Fix issue mounting and/or unmounting NFS datastores when updating `host_system_ids` as a day-two operation. ([#1860](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1860)) -* `r/vm_storage_policy`: Updates the `resourceVMStoragePolicyDelete` method to check the response of `pbmClient.DeleteProfile()` API for errors. If a storage policy is in use and cannot be deleted, the destroy operation will fail and the storage policy will remain in the state. ([#1863](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1863)) -* `r/virtual_machine`: Fix vSAN timeout ([#1864](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1864)) +* `resource/nas_datastore`: Fixes issue mounting and/or unmounting NFS datastores when updating `host_system_ids` as a day-two operation. ([#1860](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1860)) +* `resource/virtual_machine_storage_policy`: Updates the `resourceVMStoragePolicyDelete` method to check the response of `pbmClient.DeleteProfile()` API for errors. If a storage policy is in use and cannot be deleted, the destroy operation will fail and the storage policy will remain in the state. ([#1863](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1863)) +* `resource/virtual_machine`: Fixes vSAN timeout. ([#1864](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1864)) IMPROVEMENTS: -* `r/host`: Update docs ([#1884](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1884)) -* `r/vnic`: Fix vnic tests ([#1887](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1887)) +* `resource/host`: Documentation updates. ([#1884](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1884)) +* `resource/vnic`: Fixes vnic tests. ([#1887](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1887)) CHORES: -* Update to terraform-plugin-sdk v2.26.1 ([#1862](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1862)) -* Update govmomi v0.30.4 ([#1858](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1858)) +* `provider`: Updates `terraform-plugin-sdk` to v2.26.1. ([#1862](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1862)) +* `provider`: Updates `vmware/govmomi` to v0.30.4. ([#1858](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1858)) ## 2.3.1 (February 8, 2023) @@ -64,29 +73,29 @@ CHORES: BUG FIXES: -* `resource/compute_cluster`: Fix panic when reading vSAN. ([#1835](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1835)) -* `r/vsphere_file`: Fixes a provider crash by updating the createDirectory method to check if the provided file path has any parent folder(s). If no folders need to be created FileManager.MakeDirectory is not invoked. ([#1866](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1866)) +* `resource/compute_cluster`: Fixes panic when reading vSAN. ([#1835](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1835)) +* `resource/vsphere_file`: Fixes a provider crash by updating the `createDirectory` method to check if the provided file path has any parent folder(s). If no folders need to be created `FileManager.MakeDirectory` is not invoked. ([#1866](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1866)) ## 2.3.0 (February 8, 2023) FEATURES: -* `resource/virtual_machine`: Add support for the paravirtual RDMA (PVRDMA) `vmxnet3vrdma` network interface adapter type. ([#1598](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1598)) +* `resource/virtual_machine`: Adds support for the paravirtual RDMA (PVRDMA) `vmxnet3vrdma` network interface adapter type. ([#1598](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1598)) * `resource/virtual_machine`: Adds support for an optional `extra_config_reboot_required` argument to `r/virtual_machine`. This argument allows you to configure if a virtual machine reboot is enforced when `extra_config` is changed. ([#1603](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1603)) * `resource/virtual_machine`: Adds support for two (2) CD-ROMs attached to a virtual machine. ([#1631](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1631)) -* `resource/compute_cluster`: Add support for vSAN compression and deduplication. ([#1702](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1702)) -* `resource/compute_cluster`: Add support for vSAN performance services. ([#1727](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1727)) -* `resource/compute_cluster`: Add support for vSAN unmap. ([#1745](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1745)) -* `resource/compute_cluster`: Add support for vSAN HCI Mesh. ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) -* `resource/compute_cluster`: Add support for vSAN Data-in-Transit Encryption. ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) +* `resource/compute_cluster`: Adds support for vSAN compression and deduplication. ([#1702](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1702)) +* `resource/compute_cluster`: Adds support for vSAN performance services. ([#1727](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1727)) +* `resource/compute_cluster`: Adds support for vSAN unmap. ([#1745](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1745)) +* `resource/compute_cluster`: Adds support for vSAN HCI Mesh. ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) +* `resource/compute_cluster`: Adds support for vSAN Data-in-Transit Encryption. ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) * `resource/role`: Adds support for import. ([#1822](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1822)) BUG FIXES: * `resource/datastore_cluster`: Fixes error parsing string as enum type for `sdrs_advanced_options`. [(1749](https://github.com/hashicorp/terraform-provider-vsphere/pull/1749)) -* `provider`: Reverts a linting update from #1416 back to SHA1. SHA1 is used by vmware/govmomi for the session file. This will allow session reuse from govc. [(1808](https://github.com/hashicorp/terraform-provider-vsphere/pull/1808)) -* `resource/compute_cluster`: Fix panic in vsan disk group ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) -* `resource/virtual_machine`: Updating the datastore_id on r/virtual_machine will apply to disk sub-resources resolving issue GH-1268. ([#1817](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1817)) +* `provider`: Reverts a linting update from #1416 back to SHA1. SHA1 is used by `vmware/govmomi` for the session file. This will allow session reuse from govc. [(1808](https://github.com/hashicorp/terraform-provider-vsphere/pull/1808)) +* `resource/compute_cluster`: Fixes panic in vsan disk group. ([#1820](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1820)) +* `resource/virtual_machine`: Updating the `datastore_id` will apply to disk sub-resources. ([#1817](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1817)) IMPROVEMENTS: @@ -95,11 +104,11 @@ IMPROVEMENTS: * `resource/host`: Documentation updates. ([#1675](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1675)) * `resource/host_virtual_switch`: Allows `standby_nics` on `r/vsphere_host_virtual_switch` to be an optional attribute so `standby_nics = []` does not need to be defined when no standby NICs are required/available. ([#1695](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1695)) * `resource/compute_cluster_vm_anti_affinity_rule`: Documentation updates. ([#1700](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1700)) -* `vsphere_ovf_vm_template`: Documentation updates to resource and datasource. ([#1792](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1792)) +* `vsphere_ovf_vm_template`: Documentation updates. ([#1792](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1792)) CHORES: -* Bumps [`vmware/govmomi`](https://github.com/vmware/govmomi) from `v0.25.0` to `v0.29.0`. ([#1701](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1701)) +* `provider`: Updates `vmware/govmomi` to v0.29.0. ([#1701](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1701)) ## 2.2.0 (June 16, 2022) @@ -116,10 +125,10 @@ FEATURES: * `resource/vsphere_host`: Adds support for custom attributes. ([#1619](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1619)) * `resource/virtual_machine`: Adds support for guest customization script for Linux guest operating systems. ([#1621](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1621)) -* `datasource/virtual_machine`: support lookup by `uuid`. ([#1650](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1650)) +* `datasource/virtual_machine`: Adds support for lookup by `uuid`. ([#1650](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1650)) * `resource/compute_cluster`: Adds support for scalable shares. ([#1634](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1634)) * `resource/resource_pool`: Adds support for scalable shares. ([#1634](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1634)) -* `datasource/compute_cluster_host_group`: New data source can be used to read general attributes of a host group. ([#1636](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1636)) +* `datasource/compute_cluster_host_group`: Adds support for a data source that can be used to read general attributes of a host group. ([#1636](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1636)) IMPROVEMENTS: @@ -171,7 +180,7 @@ IMPROVEMENTS: * `resource/computer_cluster_vm_anti_affinity_rule`: Documentation updates. ([#1544](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1544)) * `resource/virtual_machine`: Documentation updates. ([#1513](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1513)) * `resource/custom_attribute`: Documentation updates. ([#1508](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1508)) -* `resource/vm_storage_policy`: Documentation updates. ([#1541](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1541)) +* `resource/virtual_machine_storage_policy`: Documentation updates. ([#1541](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1541)) * `datasource/storage_policy`: Documentation updates. ([#1541](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1541)) * `resource/distributed_virtual_switch`: Documentation updates. ([#1504](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1504)) * `datasource/distributed_virtual_switch`: Documentation updates. ([#1504](https://github.com/terraform-providers/terraform-provider-vsphere/issues/1504)) @@ -240,19 +249,19 @@ BUG FIXES: IMPROVEMENTS: * `provider`: vSphere 7 compatibility validation ([#1381](https://github.com/hashicorp/terraform-provider-vsphere/pull/1381)) -* `resource/vm`: Allow hardware version up to 19 ([#1391](https://github.com/hashicorp/terraform-provider-vsphere/pull/1391)) +* `resource/virtual_machine`: Allow hardware version up to 19 ([#1391](https://github.com/hashicorp/terraform-provider-vsphere/pull/1391)) ## 1.25.0 (March 17, 2021) BUG FIXES: * `resource/vsphere_entity_permissions`: Sorting permission objects on username/groupname before storing. ([#1311](https://github.com/hashicorp/terraform-provider-vsphere/pull/1311)) -* `resource/vm`: Limit netmask length for ipv4 and ipv6 netmasks. ([#1321](https://github.com/hashicorp/terraform-provider-vsphere/pull/1321)) -* `resource/vm`: Fix missing vApp properties. ([#1322](https://github.com/hashicorp/terraform-provider-vsphere/pull/1322)) +* `resource/virtual_machine`: Limit netmask length for ipv4 and ipv6 netmasks. ([#1321](https://github.com/hashicorp/terraform-provider-vsphere/pull/1321)) +* `resource/virtual_machine`: Fix missing vApp properties. ([#1322](https://github.com/hashicorp/terraform-provider-vsphere/pull/1322)) FEATURES: -* `data/vsphere_ovf_vm_template`: Created data source OVF VM Template. This new data source allows `vsphere_virtual_machine` to be created by its exported attributes. See PR for more details. ([#1339](https://github.com/hashicorp/terraform-provider-vsphere/pull/1339)) +* `datasource/vsphere_ovf_vm_template`: Created data source OVF VM Template. This new data source allows `vsphere_virtual_machine` to be created by its exported attributes. See PR for more details. ([#1339](https://github.com/hashicorp/terraform-provider-vsphere/pull/1339)) IMPROVEMENTS: @@ -263,48 +272,48 @@ IMPROVEMENTS: BUG FIXES: -* `resource/vm`: Support for no disks in config ([#1241](https://github.com/hashicorp/terraform-provider-vsphere/pull/1241)) -* `resource/vm`: Make API timeout configurable when building VMs ([#1278](https://github.com/hashicorp/terraform-provider-vsphere/pull/1278)) +* `resource/virtual_machine`: Support for no disks in config ([#1241](https://github.com/hashicorp/terraform-provider-vsphere/pull/1241)) +* `resource/virtual_machine`: Make API timeout configurable when building VMs ([#1278](https://github.com/hashicorp/terraform-provider-vsphere/pull/1278)) ## 1.24.2 (October 16, 2020) BUG FIXES: -* `resource/vm`: Prevent guest_id nil condition. ([#1234](https://github.com/hashicorp/terraform-provider-vsphere/pull/1234)) +* `resource/virtual_machine`: Prevent guest_id nil condition. ([#1234](https://github.com/hashicorp/terraform-provider-vsphere/pull/1234)) ## 1.24.1 (October 07, 2020) IMPROVEMENTS: -* `data/content_library_item`: Add `type` to content library item data source. ([#1184](https://github.com/hashicorp/terraform-provider-vsphere/pull/1184)) +* `datasource/content_library_item`: Add `type` to content library item data source. ([#1184](https://github.com/hashicorp/terraform-provider-vsphere/pull/1184)) * `resource/virtual_switch`: Fix port group resource to enable LACP in virtual switch only. ([#1214](https://github.com/hashicorp/terraform-provider-vsphere/pull/1214)) * `resource/distributed_port_group`: Import distributed port group using MOID. ([#1208](https://github.com/hashicorp/terraform-provider-vsphere/pull/1208)) * `resource/host_port_group`: Add support for importing. ([#1194](https://github.com/hashicorp/terraform-provider-vsphere/pull/1194)) -* `resource/VM`: Allow more config options to be changed from OVF. ([#1218](https://github.com/hashicorp/terraform-provider-vsphere/pull/1218)) -* `resource/VM`: Convert folder path to MOID. ([#1207](https://github.com/hashicorp/terraform-provider-vsphere/pull/1207)) +* `resource/virtual_machine`: Allow more config options to be changed from OVF. ([#1218](https://github.com/hashicorp/terraform-provider-vsphere/pull/1218)) +* `resource/virtual_machine`: Convert folder path to MOID. ([#1207](https://github.com/hashicorp/terraform-provider-vsphere/pull/1207)) BUG FIXES: * `resource/datastore_cluster`: Fix missing field in import. ([#1203](https://github.com/hashicorp/terraform-provider-vsphere/pull/1203)) -* `resource/VM`: Change default OS method on bare VMs. ([#1217](https://github.com/hashicorp/terraform-provider-vsphere/pull/1217)) -* `resource/VM`: Read virtual machine after clone and OVF/OVA deploy. ([#1221](https://github.com/hashicorp/terraform-provider-vsphere/pull/1221)) +* `resource/virtual_machine`: Change default OS method on bare VMs. ([#1217](https://github.com/hashicorp/terraform-provider-vsphere/pull/1217)) +* `resource/virtual_machine`: Read virtual machine after clone and OVF/OVA deploy. ([#1221](https://github.com/hashicorp/terraform-provider-vsphere/pull/1221)) ## 1.24.0 (September 02, 2020) BUG FIXES: -* `resource/vm`: Skip SCSI controller check when empty. ([#1179](https://github.com/hashicorp/terraform-provider-vsphere/pull/1179)) -* `resource/vm`: Make storage_policy_id computed to prevent flapping when unset. ([#1185](https://github.com/hashicorp/terraform-provider-vsphere/pull/1185)) -* `resource/vm`: Ignore nil objects in host network on read. ([#1186](https://github.com/hashicorp/terraform-provider-vsphere/pull/1186)) -* `resource/vm`: Keep progress channel open when deploying an OVF. ([#1187](https://github.com/hashicorp/terraform-provider-vsphere/pull/1187)) -* `resource/vm`: Set SCSI controller type to unknown when nil. ([#1188](https://github.com/hashicorp/terraform-provider-vsphere/pull/1188)) +* `resource/virtual_machine`: Skip SCSI controller check when empty. ([#1179](https://github.com/hashicorp/terraform-provider-vsphere/pull/1179)) +* `resource/virtual_machine`: Make storage_policy_id computed to prevent flapping when unset. ([#1185](https://github.com/hashicorp/terraform-provider-vsphere/pull/1185)) +* `resource/virtual_machine`: Ignore nil objects in host network on read. ([#1186](https://github.com/hashicorp/terraform-provider-vsphere/pull/1186)) +* `resource/virtual_machine`: Keep progress channel open when deploying an OVF. ([#1187](https://github.com/hashicorp/terraform-provider-vsphere/pull/1187)) +* `resource/virtual_machine`: Set SCSI controller type to unknown when nil. ([#1188](https://github.com/hashicorp/terraform-provider-vsphere/pull/1188)) IMPROVEMENTS: * `resource/content_library_item`: Add local upload, OVA, and vm-template sources. ([#1196](https://github.com/hashicorp/terraform-provider-vsphere/pull/1196)) * `resource/content_library`: Subscription and publication support. ([#1197](https://github.com/hashicorp/terraform-provider-vsphere/pull/1197)) -* `resource/vm`: Content library vm-template, disk type, and vApp property +* `resource/virtual_machine`: Content library vm-template, disk type, and vApp property support. ([#1198](https://github.com/hashicorp/terraform-provider-vsphere/pull/1198)) ## 1.23.0 (August 21, 2020) @@ -318,7 +327,7 @@ BUG FIXES: IMPROVEMENTS: * `resource/virtual_machine`: Allow performing a linked-clone from a template. ([#1158](https://github.com/hashicorp/terraform-provider-vsphere/pull/1158)) -* `data/virtual_machine`: Merge the virtual machine configuration schema. ([#1157](https://github.com/hashicorp/terraform-provider-vsphere/pull/1157)) +* `datasource/virtual_machine`: Merge the virtual machine configuration schema. ([#1157](https://github.com/hashicorp/terraform-provider-vsphere/pull/1157)) ## 1.22.0 (August 07, 2020) @@ -327,39 +336,39 @@ FEATURES: * `resource/compute_cluster`: Basic vSAN support on compute clusters. ([#1151](https://github.com/hashicorp/terraform-provider-vsphere/pull/1151)) * `resource/role`: Resource and data source to create and manage vSphere roles. ([#1144](https://github.com/hashicorp/terraform-provider-vsphere/pull/1144)) * `resource/entity_permission`: Resource to create and manage vSphere permissions. ([#1144](https://github.com/hashicorp/terraform-provider-vsphere/pull/1144)) -* `data/entity_permission`: Data source to acquire ESXi host thumbprints . ([#1142](https://github.com/hashicorp/terraform-provider-vsphere/pull/1142)) +* `datasource/entity_permission`: Data source to acquire ESXi host thumbprints . ([#1142](https://github.com/hashicorp/terraform-provider-vsphere/pull/1142)) ## 1.21.1 (July 20, 2020) BUG FIXES: -* `resource/vm`: Set guest_id before customization. ([#1139](https://github.com/hashicorp/terraform-provider-vsphere/pull/1139)) +* `resource/virtual_machine`: Set guest_id before customization. ([#1139](https://github.com/hashicorp/terraform-provider-vsphere/pull/1139)) ## 1.21.0 (June 30, 2020) FEATURES: -* `resource/vm`: Support for SATA and IDE disks. ([#1118](https://github.com/hashicorp/terraform-provider-vsphere/pull/1118)) +* `resource/virtual_machine`: Support for SATA and IDE disks. ([#1118](https://github.com/hashicorp/terraform-provider-vsphere/pull/1118)) ## 1.20.0 (June 23, 2020) FEATURES: -* `resource/vm`: Add support for OVA deployment. ([#1105](https://github.com/hashicorp/terraform-provider-vsphere/pull/1105)) +* `resource/virtual_machine`: Add support for OVA deployment. ([#1105](https://github.com/hashicorp/terraform-provider-vsphere/pull/1105)) BUG FIXES: -* `resource/vm`: Delete disks on destroy when deployed from OVA/OVF. ([#1106](https://github.com/hashicorp/terraform-provider-vsphere/pull/1106)) -* `resource/vm`: Skip PCI passthrough operations if there are no changes. ([#1112](https://github.com/hashicorp/terraform-provider-vsphere/pull/1112)) +* `resource/virtual_machine`: Delete disks on destroy when deployed from OVA/OVF. ([#1106](https://github.com/hashicorp/terraform-provider-vsphere/pull/1106)) +* `resource/virtual_machine`: Skip PCI passthrough operations if there are no changes. ([#1112](https://github.com/hashicorp/terraform-provider-vsphere/pull/1112)) ## 1.19.0 (June 16, 2020) FEATURES: -* `data/dynamic`: Data source which can be used to match any tagged managed object. ([#1103](https://github.com/hashicorp/terraform-provider-vsphere/pull/1103)) -* `resource/vm_storage_policy_profile`: A resource for tag based storage placement. +* `datasource/dynamic`: Data source which can be used to match any tagged managed object. ([#1103](https://github.com/hashicorp/terraform-provider-vsphere/pull/1103)) +* `resource/virtual_machine_storage_policy_profile`: A resource for tag based storage placement. policies management. ([#1094](https://github.com/hashicorp/terraform-provider-vsphere/pull/1094)) * `resource/virtual_machine`: Add support for PCI passthrough devices on virtual machines. ([#1099](https://github.com/hashicorp/terraform-provider-vsphere/pull/1099)) -* `data/host_pci_device`: Data source which will locate the address of a PCI +* `datasource/host_pci_device`: Data source which will locate the address of a PCI device on a host. ([#1099](https://github.com/hashicorp/terraform-provider-vsphere/pull/1099)) ## 1.18.3 (June 01, 2020) @@ -412,7 +421,7 @@ BUG FIXES: IMPROVEMENTS: -* Use built in session persistence in govmomi. ([#1050](https://github.com/hashicorp/terraform-provider-vsphere/pull/1050)) +* Use built in session persistence in `vmware/govmomi`. ([#1050](https://github.com/hashicorp/terraform-provider-vsphere/pull/1050)) ## 1.17.2 (April 13, 2020) @@ -430,7 +439,7 @@ IMPROVEMENTS: * `resource/virtual_machine`: Add support for hardware version tracking and upgrading. ([#1020](https://github.com/hashicorp/terraform-provider-vsphere/pull/1020)) -* `data/vsphere_network`: Handle cases of network port groups with same name +* `datasource/vsphere_network`: Handle cases of network port groups with same name using `distributed_virtual_switch_uuid`. ([#1001](https://github.com/hashicorp/terraform-provider-vsphere/pull/1001)) BUG FIXES: @@ -474,21 +483,18 @@ FEATURES: IMPROVEMENTS: -* Switch to govmomi REST client ([#955](https://github.com/hashicorp/terraform-provider-vsphere/pull/955)) -* Add storage policy to `virtual_machine` resource. ** Requires `profile-driven - storage` privilege on vCenter Server for the Terraform provider user. ([#881](https://github.com/hashicorp/terraform-provider-vsphere/pull/881)) +* Switch to `vmware/govmomi` REST client ([#955](https://github.com/hashicorp/terraform-provider-vsphere/pull/955)) +* Add storage policy to `virtual_machine` resource. ** Requires `profile-driven storage` privilege on vCenter Server for the Terraform provider user. ([#881](https://github.com/hashicorp/terraform-provider-vsphere/pull/881)) ## 1.15.0 (January 23, 2020) IMPROVEMENTS: -* `resource/virtual_machine`: Do not throw error when disk path is not known - yet. ([#944](https://github.com/hashicorp/terraform-provider-vsphere/pull/944)) +* `resource/virtual_machine`: Do not throw error when disk path is not known yet. ([#944](https://github.com/hashicorp/terraform-provider-vsphere/pull/944)) BUG FIXES: -* `resource/virtual_machine`: Do not set datastoreID in RelocateSpec when - datastore_cluster is set. ([#933](https://github.com/hashicorp/terraform-provider-vsphere/pull/933)) +* `resource/virtual_machine`: Do not set `datastoreID` in `RelocateSpec` when `datastore_cluster`` is set. ([#933](https://github.com/hashicorp/terraform-provider-vsphere/pull/933)) * `resource/vapp_container`: Fix handling of child vApp containers. ([#941](https://github.com/hashicorp/terraform-provider-vsphere/pull/941)) * `resource/virtual_disk`: Enforce .vmdk suffix on `vmdk_path`. ([#942](https://github.com/hashicorp/terraform-provider-vsphere/pull/942)) @@ -619,7 +625,7 @@ BUG FIXES: IMPROVEMENTS: -* `data/vapp_container`: Re-add `data_source_vapp_container`. ([#617](https://github.com/hashicorp/terraform-provider-vsphere/issues/617)) +* `datasource/vapp_container`: Re-add `data_source_vapp_container`. ([#617](https://github.com/hashicorp/terraform-provider-vsphere/issues/617)) ## 1.8.0 (September 10, 2018) @@ -672,7 +678,7 @@ FEATURES: IMPROVEMENTS: -* `data/vsphere_host`: Now exports the `resource_pool_id` attribute, which +* `datasource/vsphere_host`: Now exports the `resource_pool_id` attribute, which points to the root resource pool of either the standalone host, or the cluster's root resource pool in the event the host is a member of a cluster. ([#535](https://github.com/hashicorp/terraform-provider-vsphere/issues/535)) @@ -1004,7 +1010,7 @@ BUG FIXES: * `resource/vsphere_virtual_machine`: Corrected an issue that was preventing the use of this resource on standalone ESXi. ([#263](https://github.com/hashicorp/terraform-provider-vsphere/issues/263)) -* `data/vsphere_resource_pool`: This data source now works as documented on +* `datasource/vsphere_resource_pool`: This data source now works as documented on standalone ESXi. ([#263](https://github.com/hashicorp/terraform-provider-vsphere/issues/263)) ## 1.0.0 (December 01, 2017) @@ -1052,7 +1058,7 @@ BUG FIXES: namely surrounding virtual disk and network device management. ([#244](https://github.com/hashicorp/terraform-provider-vsphere/issues/244)) * `resource/vsphere_host_virtual_switch`: This resource now correctly supports a configuration with no NICs. ([#256](https://github.com/hashicorp/terraform-provider-vsphere/issues/256)) -* `data/vsphere_network`: No longer restricted to being used on vCenter. ([#248](https://github.com/hashicorp/terraform-provider-vsphere/issues/248)) +* `datasource/vsphere_network`: No longer restricted to being used on vCenter. ([#248](https://github.com/hashicorp/terraform-provider-vsphere/issues/248)) ## 0.4.2 (October 13, 2017) diff --git a/vsphere/internal/helper/contentlibrary/content_library_helper.go b/vsphere/internal/helper/contentlibrary/content_library_helper.go index 0a2de5f56..d3f825fd3 100644 --- a/vsphere/internal/helper/contentlibrary/content_library_helper.go +++ b/vsphere/internal/helper/contentlibrary/content_library_helper.go @@ -67,8 +67,9 @@ func CreateLibrary(d *schema.ResourceData, restclient *rest.Client, backings []l log.Printf("[DEBUG] contentlibrary.CreateLibrary: Creating content library %s", name) clm := library.NewManager(restclient) ctx := context.TODO() + description := d.Get("description").(string) lib := library.Library{ - Description: d.Get("description").(string), + Description: &description, Name: name, Storage: backings, Type: "LOCAL", @@ -165,7 +166,7 @@ func CreateLibraryItem(c *rest.Client, l *library.Library, name string, desc str clm := library.NewManager(c) ctx := context.TODO() item := library.Item{ - Description: desc, + Description: &desc, LibraryID: l.ID, Name: name, Type: t, diff --git a/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go b/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go index dc9565666..0c78d09bd 100644 --- a/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go +++ b/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go @@ -892,20 +892,20 @@ func DiskMigrateRelocateOperation(data *schema.ResourceData, client *govmomi.Cli // backing data defined in config, taking on these filenames when cloned. After // the clone is complete, natural re-configuration happens to bring the disk // configurations fully in sync with what is defined. -func DiskCloneRelocateOperation(d *schema.ResourceData, c *govmomi.Client, l object.VirtualDeviceList) ([]types.VirtualMachineRelocateSpecDiskLocator, error) { +func DiskCloneRelocateOperation(resourceData *schema.ResourceData, client *govmomi.Client, deviceList object.VirtualDeviceList) ([]types.VirtualMachineRelocateSpecDiskLocator, error) { log.Printf("[DEBUG] DiskCloneRelocateOperation: Generating full disk relocate spec list") - devices := SelectDisks(l, d.Get("scsi_controller_count").(int), d.Get("sata_controller_count").(int), d.Get("ide_controller_count").(int)) + devices := SelectDisks(deviceList, resourceData.Get("scsi_controller_count").(int), resourceData.Get("sata_controller_count").(int), resourceData.Get("ide_controller_count").(int)) log.Printf("[DEBUG] DiskCloneRelocateOperation: Disk devices located: %s", DeviceListString(devices)) // Sort the device list, in case it's not sorted already. devSort := virtualDeviceListSorter{ Sort: devices, - DeviceList: l, + DeviceList: deviceList, } sort.Sort(devSort) devices = devSort.Sort log.Printf("[DEBUG] DiskCloneRelocateOperation: Disk devices order after sort: %s", DeviceListString(devices)) // Do the same for our listed disks. - curSet := d.Get(subresourceTypeDisk).([]interface{}) + curSet := resourceData.Get(subresourceTypeDisk).([]interface{}) log.Printf("[DEBUG] DiskCloneRelocateOperation: Current resource set: %s", subresourceListString(curSet)) sort.Sort(virtualDiskSubresourceSorter(curSet)) log.Printf("[DEBUG] DiskCloneRelocateOperation: Resource set order after sort: %s", subresourceListString(curSet)) @@ -913,28 +913,28 @@ func DiskCloneRelocateOperation(d *schema.ResourceData, c *govmomi.Client, l obj log.Printf("[DEBUG] DiskCloneRelocateOperation: Generating relocators for source disks") var relocators []types.VirtualMachineRelocateSpecDiskLocator for i, device := range devices { - m := curSet[i].(map[string]interface{}) + diskDataMap := curSet[i].(map[string]interface{}) vd := device.GetVirtualDevice() - ctlr := l.FindByKey(vd.ControllerKey) + ctlr := deviceList.FindByKey(vd.ControllerKey) if ctlr == nil { return nil, fmt.Errorf("could not find controller with key %d", vd.Key) } - m["key"] = int(vd.Key) + diskDataMap["key"] = int(vd.Key) var err error - m["device_address"], err = computeDevAddr(vd, ctlr.(types.BaseVirtualController)) + diskDataMap["device_address"], err = computeDevAddr(vd, ctlr.(types.BaseVirtualController)) if err != nil { return nil, fmt.Errorf("error computing device address: %s", err) } - r := NewDiskSubresource(c, d, m, nil, i) - // A disk locator is only useful if a target datastore is available. If we - // don't have a datastore specified (ie: when Storage DRS is in use), then - // we just need to skip this disk. The disk will be migrated properly - // through the SDRS API. - if dsID := r.Get("datastore_id"); dsID == "" || dsID == diskDatastoreComputedName { + r := NewDiskSubresource(client, resourceData, diskDataMap, nil, i) + + shouldRelocate := shouldAddRelocateSpec(resourceData, device.(*types.VirtualDisk), i) + if !shouldRelocate { continue } + + r = addDiskDatastore(r, resourceData) // Otherwise, proceed with generating and appending the locator. - relocator, err := r.Relocate(l, true) + relocator, err := r.Relocate(deviceList, true) if err != nil { return nil, fmt.Errorf("%s: %s", r.Addr(), err) } @@ -946,6 +946,104 @@ func DiskCloneRelocateOperation(d *schema.ResourceData, c *govmomi.Client, l obj return relocators, nil } +/* +* +Sets the value of the VM datastore +*/ +func addDiskDatastore(r *DiskSubresource, d *schema.ResourceData) *DiskSubresource { + diskDsId := r.Get("datastore_id") + dataDsId := d.Get("datastore_id") + if (diskDsId == "" || diskDsId == diskDatastoreComputedName) && dataDsId != "" { + r.Set("datastore_id", dataDsId) + } + + return r +} +func shouldAddRelocateSpec(d *schema.ResourceData, disk *types.VirtualDisk, schemaDiskIndex int) bool { + relocateProperties := []string{ + "datastore_id", + "disk_mode", + "eagerly_scrub", + "disk_sharing", + "thin_provisioned", + "write_through", + } + + diskProps := virtualDiskToSchemaPropsMap(disk) + dataProps := diskDataToSchemaProps(d, schemaDiskIndex) + + for _, key := range relocateProperties { + dataProp, dataPropOk := dataProps[key] + diskProp, diskPropOk := diskProps[key] + + diff := false + if dataPropOk && diskPropOk { + diff = dataProp != diskProp + } + + if diff { + return true + } + + } + + return false +} + +func virtualDiskToSchemaPropsMap(disk *types.VirtualDisk) map[string]interface{} { + m := make(map[string]interface{}) + if backing, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo); ok { + m["datastore_id"] = backing.Datastore.Value + m["disk_mode"] = backing.DiskMode + m["eagerly_scrub"] = backing.EagerlyScrub + m["thin_provisioned"] = backing.ThinProvisioned + m["write_through"] = backing.WriteThrough + } else if backing, ok := disk.Backing.(*types.VirtualDiskFlatVer1BackingInfo); ok { + m["datastore_id"] = backing.Datastore.Value + m["disk_mode"] = backing.DiskMode + m["write_through"] = backing.WriteThrough + } else if backing, ok := disk.Backing.(*types.VirtualDiskLocalPMemBackingInfo); ok { + m["datastore_id"] = backing.Datastore.Value + m["disk_mode"] = backing.DiskMode + } else if backing, ok := disk.Backing.(*types.VirtualDiskSeSparseBackingInfo); ok { + m["datastore_id"] = backing.Datastore.Value + m["disk_mode"] = backing.DiskMode + m["write_through"] = backing.WriteThrough + } else if backing, ok := disk.Backing.(*types.VirtualDiskSeSparseBackingInfo); ok { + m["datastore_id"] = backing.Datastore.Value + m["disk_mode"] = backing.DiskMode + m["write_through"] = backing.WriteThrough + } else if backing, ok := disk.Backing.(*types.VirtualDiskSparseVer1BackingInfo); ok { + m["datastore_id"] = backing.Datastore.Value + m["disk_mode"] = backing.DiskMode + m["write_through"] = backing.WriteThrough + } + + return m +} + +func diskDataToSchemaProps(d *schema.ResourceData, deviceIndex int) map[string]interface{} { + m := make(map[string]interface{}) + diskKey := fmt.Sprintf("disk.%d.datastore_id", deviceIndex) + if datastoreId, ok := d.GetOk(diskKey); ok { + m["datastore_id"] = datastoreId + } + + if diskMode, ok := d.GetOk(diskKey); ok { + m["disk_mode"] = diskMode + } + + if eagerlyScrub, ok := d.GetOk(diskKey); ok { + m["eagerly_scrub"] = eagerlyScrub + } + + if thinProvisioned, ok := d.GetOk(diskKey); ok { + m["thin_provisioned"] = thinProvisioned + } + + return m +} + // DiskPostCloneOperation normalizes the virtual disks on a freshly-cloned // virtual machine and outputs any necessary device change operations. It also // sets the state in advance of the post-create read. @@ -1466,15 +1564,7 @@ func (r *DiskSubresource) DiffExisting() error { return fmt.Errorf("virtual disk %q: virtual disks cannot be shrunk (old: %d new: %d)", name, osize.(int), nsize.(int)) } - // Ensure that there is no change in either eagerly_scrub or thin_provisioned - // - these values cannot be changed once set. - if _, err = r.GetWithVeto("eagerly_scrub"); err != nil { - return fmt.Errorf("virtual disk %q: %s", name, err) - } - if _, err = r.GetWithVeto("thin_provisioned"); err != nil { - return fmt.Errorf("virtual disk %q: %s", name, err) - } - // Same with attach + // Ensure that there is no change in attach value if _, err = r.GetWithVeto("attach"); err != nil { return fmt.Errorf("virtual disk %q: %s", name, err) } diff --git a/vsphere/resource_vsphere_content_library_item_test.go b/vsphere/resource_vsphere_content_library_item_test.go index 5fd28d412..d65dc3758 100644 --- a/vsphere/resource_vsphere_content_library_item_test.go +++ b/vsphere/resource_vsphere_content_library_item_test.go @@ -186,8 +186,8 @@ func testAccResourceVSphereContentLibraryItemDescription(expected *regexp.Regexp if err != nil { return err } - if !expected.MatchString(library.Description) { - return fmt.Errorf("Content Library item description does not match. expected: %s, got %s", expected.String(), library.Description) + if !expected.MatchString(*library.Description) { + return fmt.Errorf("Content Library item description does not match. expected: %s, got %v", expected.String(), library.Description) } return nil } diff --git a/vsphere/resource_vsphere_content_library_test.go b/vsphere/resource_vsphere_content_library_test.go index 092266396..16307896b 100644 --- a/vsphere/resource_vsphere_content_library_test.go +++ b/vsphere/resource_vsphere_content_library_test.go @@ -111,8 +111,8 @@ func testAccResourceVSphereContentLibraryDescription(expected *regexp.Regexp) re if err != nil { return err } - if !expected.MatchString(library.Description) { - return fmt.Errorf("Content Library description does not match. expected: %s, got %s", expected.String(), library.Description) + if !expected.MatchString(*library.Description) { + return fmt.Errorf("Content Library description does not match. expected: %s, got %v", expected.String(), library.Description) } return nil } diff --git a/vsphere/resource_vsphere_virtual_machine_test.go b/vsphere/resource_vsphere_virtual_machine_test.go index 81eb2cd99..97ff7b158 100644 --- a/vsphere/resource_vsphere_virtual_machine_test.go +++ b/vsphere/resource_vsphere_virtual_machine_test.go @@ -1828,6 +1828,26 @@ func TestAccResourceVSphereVirtualMachine_cloneWithDifferentHostname(t *testing. }, }) } +func TestAccResourceVSphereVirtualMachine_cloneWithDiskTypeChange(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + RunSweepers() + testAccPreCheck(t) + testAccResourceVSphereVirtualMachinePreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccResourceVSphereVirtualMachineCheckExists(false), + Steps: []resource.TestStep{ + { + Config: testAccResourceVSphereVirtualMachineConfigCloneChangedDiskType(), + Check: resource.ComposeTestCheckFunc( + testAccResourceVSphereVirtualMachineCheckExists(true), + testAccResourceVSphereVirtualMachineCheckEagerlyScrub(0, true), + ), + }, + }, + }) +} func TestAccResourceVSphereVirtualMachine_cpuHotAdd(t *testing.T) { resource.Test(t, resource.TestCase{ @@ -2540,6 +2560,39 @@ func testAccResourceVSphereVirtualMachineCheckExists(expected bool) resource.Tes } } +func testAccResourceVSphereVirtualMachineCheckEagerlyScrub(diskIndex int, eagerlyScrubedValue bool) resource.TestCheckFunc { + return func(s *terraform.State) error { + props, err := testGetVirtualMachineProperties(s, "vm") + if err != nil { + return err + } + + currentDiskIndex := -1 + for _, device := range props.Config.Hardware.Device { + disk, ok := device.(*types.VirtualDisk) + if !ok { + continue + } + currentDiskIndex++ + if currentDiskIndex != diskIndex { + continue + } + backing, ok := disk.Backing.(*types.VirtualDiskFlatVer2BackingInfo) + if !ok { + continue + } + + if *backing.EagerlyScrub != eagerlyScrubedValue { + return fmt.Errorf("expected %t as eagerlyScrubbed for disk %d but received %t", + eagerlyScrubedValue, diskIndex, *backing.EagerlyScrub) + } + + } + + return nil + } +} + // testAccResourceVSphereVirtualMachineCheckPowerState is a check to check for // a VirtualMachine's power state. @@ -5639,6 +5692,82 @@ resource "vsphere_virtual_machine" "vm" { ) } +func testAccResourceVSphereVirtualMachineConfigCloneChangedDiskType() string { + return fmt.Sprintf(` + %s + +data "vsphere_network" "network" { + name = "VM Network" + datacenter_id = data.vsphere_datacenter.rootdc1.id +} + +resource "vsphere_virtual_machine" "template" { + name = "vm-1-template" + resource_pool_id = data.vsphere_compute_cluster.rootcompute_cluster1.resource_pool_id + datastore_id = data.vsphere_datastore.rootds1.id + + num_cpus = 2 + memory = 2048 + guest_id = "other3xLinuxGuest" + + network_interface { + network_id = data.vsphere_network.network.id + } + + + wait_for_guest_ip_timeout = 0 + wait_for_guest_net_timeout = 0 + + disk { + label = "disk0" + size = 4 + eagerly_scrub = false + thin_provisioned = false + } + lifecycle { + ignore_changes = [disk] + } +} + + + +resource "vsphere_virtual_machine" "vm" { + name = "vm-1-template-clone" + resource_pool_id = data.vsphere_compute_cluster.rootcompute_cluster1.resource_pool_id + guest_id = vsphere_virtual_machine.template.guest_id + network_interface { + network_id = data.vsphere_network.network.id + } + datastore_id = data.vsphere_datastore.rootds1.id + + num_cpus = 2 + memory = 2048 + + scsi_type =vsphere_virtual_machine.template.scsi_type + wait_for_guest_ip_timeout = 0 + wait_for_guest_net_timeout = 0 + + disk { + label = "disk0" + size = vsphere_virtual_machine.template.disk.0.size + eagerly_scrub = true + thin_provisioned = false + } + + clone { + template_uuid = vsphere_virtual_machine.template.id + } +} + +`, + testhelper.CombineConfigs( + testhelper.ConfigDataRootDC1(), + testhelper.ConfigDataRootComputeCluster1(), + testhelper.ConfigDataRootDS1(), + ), + ) +} + func testAccResourceVSphereVirtualMachineConfigWithHotAdd(nc, nm int, cha, chr, mha bool) string { return fmt.Sprintf(` From 55898fa3a4bcbf75acff3ac811b369ac95067afb Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Mon, 9 Oct 2023 16:59:31 -0400 Subject: [PATCH 59/67] docs: update `CHANGELOG.md` (#2032) Update `CHANGELOG.md` for v2.5.0 release. Signed-off-by: Ryan Johnson --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dd2ba0e0..2682cf36c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # -## 2.5.0 (Unreleased) +## 2.5.0 (October 09, 2023) BUG FIXES: From dde20020e86f8ed27040f3180b3d1475cc36e0c4 Mon Sep 17 00:00:00 2001 From: Vasil Atanasov <141020316+vasilsatanasov@users.noreply.github.com> Date: Tue, 10 Oct 2023 21:14:41 +0300 Subject: [PATCH 60/67] fix: r/vsphere_virtual_disk with lazy forces replacement (#2033) Ref: #1824 Signed-off-by: Vasil Atanasov --- vsphere/resource_vsphere_virtual_disk.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vsphere/resource_vsphere_virtual_disk.go b/vsphere/resource_vsphere_virtual_disk.go index 0f7893866..0255dcac7 100644 --- a/vsphere/resource_vsphere_virtual_disk.go +++ b/vsphere/resource_vsphere_virtual_disk.go @@ -303,6 +303,16 @@ func resourceVSphereVirtualDiskRead(d *schema.ResourceData, meta interface{}) er Path: vDisk.vmdkPath, } diskType, err := virtualdisk.QueryDiskType(client, dp.String(), dc) + /** + Thick Provisioned Lazy Zeroed disk type a.k.a "lazy" in the provider context is actually + "preallocated" for the VC. Due to historical reasons i.e. the disk type is documented as "lazy". + In order to fix https://github.com/hashicorp/terraform-provider-vsphere/issues/1824 the value must be converted, + otherwise the disk is recreated + */ + if diskType == "preallocated" { + diskType = "lazy" + } + if err != nil { return errors.New("Failed to query disk type") } From 9c67ffa535d84bd3c16714584b91d95caeaa15ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:39:32 -0600 Subject: [PATCH 61/67] chore(deps): bump golang.org/x/net from 0.13.0 to 0.17.0 (#2035) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.13.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index e26dc976b..e849a6aeb 100644 --- a/go.mod +++ b/go.mod @@ -48,10 +48,10 @@ require ( github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.14.0 // indirect - golang.org/x/crypto v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.13.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect diff --git a/go.sum b/go.sum index 513a564aa..11338a768 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -146,8 +146,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -166,14 +166,14 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From d45b7d6edb7ee23d103a40ecb22c957d69c10d36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:40:15 -0600 Subject: [PATCH 62/67] chore(deps): bump github.com/vmware/govmomi from 0.31.0 to 0.32.0 (#2027) Bumps [github.com/vmware/govmomi](https://github.com/vmware/govmomi) from 0.31.0 to 0.32.0. - [Release notes](https://github.com/vmware/govmomi/releases) - [Changelog](https://github.com/vmware/govmomi/blob/main/CHANGELOG.md) - [Commits](https://github.com/vmware/govmomi/compare/v0.31.0...v0.32.0) --- updated-dependencies: - dependency-name: github.com/vmware/govmomi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e849a6aeb..92aab9217 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/mitchellh/copystructure v1.2.0 - github.com/vmware/govmomi v0.31.0 + github.com/vmware/govmomi v0.32.0 ) require ( diff --git a/go.sum b/go.sum index 11338a768..0e1b0ca8a 100644 --- a/go.sum +++ b/go.sum @@ -122,8 +122,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/vmware/govmomi v0.31.0 h1:+NC7le8yeXj7f4YUC841jgdWsehN7A3ivqLxm79eKyo= -github.com/vmware/govmomi v0.31.0/go.mod h1:JA63Pg0SgQcSjk+LuPzjh3rJdcWBo/ZNCIwbb1qf2/0= +github.com/vmware/govmomi v0.32.0 h1:Rsdi/HAX5Ebf9Byp/FvBir4sfM7yP5DBUeRlbC6vLBo= +github.com/vmware/govmomi v0.32.0/go.mod h1:JA63Pg0SgQcSjk+LuPzjh3rJdcWBo/ZNCIwbb1qf2/0= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc= From 326c8ebb09ed853a6f1dcefac4634ce226e538e7 Mon Sep 17 00:00:00 2001 From: Vasil Atanasov <141020316+vasilsatanasov@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:42:56 +0300 Subject: [PATCH 63/67] Fixing cloning regression on DS cluster (#2037) Issue is that when vm is cloned on DS cluster the datastore_id field in the relocate spec holds invalid value which causes the vCenter to throw an error. The fix was to restore previously implemented behavior to not send relocate specs for the VM hard disks when it is cloned on DS Cluster with exception when datastore_id is explicitly specified for the Hard Disk. Added TestAccResourceVSphereVirtualMachine_cloneOnDsCuster to cover the case. Fixes #2034 Signed-off-by: Vasil Atanasov --- vsphere/internal/helper/testhelper/testing.go | 10 ++ .../virtual_machine_disk_subresource.go | 26 ++++- .../resource_vsphere_virtual_machine_test.go | 97 +++++++++++++++++++ 3 files changed, 128 insertions(+), 5 deletions(-) diff --git a/vsphere/internal/helper/testhelper/testing.go b/vsphere/internal/helper/testhelper/testing.go index 0bb6221a8..21a3bd8aa 100644 --- a/vsphere/internal/helper/testhelper/testing.go +++ b/vsphere/internal/helper/testhelper/testing.go @@ -204,3 +204,13 @@ func ConfigDataRootVMNet() string { } ` } + +func ConfigDSClusterData() string { + return fmt.Sprintf(` + data "vsphere_datastore_cluster" "ds_cluster1" { + name = "%s" + datacenter_id = data.vsphere_datacenter.rootdc1.id + } + +`, os.Getenv("TF_VAR_VSPHERE_DS_CLUSTER1")) +} diff --git a/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go b/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go index 0c78d09bd..b36048999 100644 --- a/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go +++ b/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go @@ -972,6 +972,14 @@ func shouldAddRelocateSpec(d *schema.ResourceData, disk *types.VirtualDisk, sche diskProps := virtualDiskToSchemaPropsMap(disk) dataProps := diskDataToSchemaProps(d, schemaDiskIndex) + // If the VM is cloned to a datastore cluster and no datastore is specified for the disk + // it should not be added to the relocate spec + diskDataStoreId, _ := dataProps["datastore_id"].(string) + diskDsIsEmpty := diskDataStoreId == "" || diskDataStoreId == diskDatastoreComputedName + if d.Get("datastore_id") == "" && d.Get("datastore_cluster_id") != "" && diskDsIsEmpty { + return false + } + for _, key := range relocateProperties { dataProp, dataPropOk := dataProps[key] diskProp, diskPropOk := diskProps[key] @@ -1024,23 +1032,31 @@ func virtualDiskToSchemaPropsMap(disk *types.VirtualDisk) map[string]interface{} func diskDataToSchemaProps(d *schema.ResourceData, deviceIndex int) map[string]interface{} { m := make(map[string]interface{}) - diskKey := fmt.Sprintf("disk.%d.datastore_id", deviceIndex) - if datastoreId, ok := d.GetOk(diskKey); ok { + datastoreKey := fmt.Sprintf("disk.%d.datastore_id", deviceIndex) + if datastoreId, ok := d.GetOk(datastoreKey); ok { m["datastore_id"] = datastoreId } - if diskMode, ok := d.GetOk(diskKey); ok { + diskModeKey := fmt.Sprintf("disk.%d.disk_mode", deviceIndex) + if diskMode, ok := d.GetOk(diskModeKey); ok { m["disk_mode"] = diskMode } - if eagerlyScrub, ok := d.GetOk(diskKey); ok { + eagerlyScrubKey := fmt.Sprintf("disk.%d.eagerly_scrub", deviceIndex) + if eagerlyScrub, ok := d.GetOk(eagerlyScrubKey); ok { m["eagerly_scrub"] = eagerlyScrub } - if thinProvisioned, ok := d.GetOk(diskKey); ok { + thinProvisionedKey := fmt.Sprintf("disk.%d.thin_provisioned", deviceIndex) + if thinProvisioned, ok := d.GetOk(thinProvisionedKey); ok { m["thin_provisioned"] = thinProvisioned } + writeThroughKey := fmt.Sprintf("disk.%d.write_through", deviceIndex) + if writeThrough, ok := d.GetOk(writeThroughKey); ok { + m["write_through"] = writeThrough + } + return m } diff --git a/vsphere/resource_vsphere_virtual_machine_test.go b/vsphere/resource_vsphere_virtual_machine_test.go index 97ff7b158..05ec04ff1 100644 --- a/vsphere/resource_vsphere_virtual_machine_test.go +++ b/vsphere/resource_vsphere_virtual_machine_test.go @@ -1849,6 +1849,27 @@ func TestAccResourceVSphereVirtualMachine_cloneWithDiskTypeChange(t *testing.T) }) } +func TestAccResourceVSphereVirtualMachine_cloneOnDsCuster(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + RunSweepers() + testAccPreCheck(t) + testAccResourceVSphereVirtualMachinePreCheck(t) + testAccDsClusterRequiredPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccResourceVSphereVirtualMachineCheckExists(false), + Steps: []resource.TestStep{ + { + Config: testAccResourceVSphereVirtualMachineConfigCloneChangedDiskTypeDsCluster(), + Check: resource.ComposeTestCheckFunc( + testAccResourceVSphereVirtualMachineCheckExists(true), + ), + }, + }, + }) +} + func TestAccResourceVSphereVirtualMachine_cpuHotAdd(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { @@ -2541,6 +2562,12 @@ func testAccResourceVSphereVirtualMachinePreCheck(t *testing.T) { } } +func testAccDsClusterRequiredPreCheck(t *testing.T) { + if os.Getenv("TF_VAR_VSPHERE_DS_CLUSTER1") == "" { + t.Skip("TF_VAR_VSPHERE_DS_CLUSTER1 must be set with a name of a DS cluster in order to run tests which require DS cluster ") + } +} + func testAccResourceVSphereVirtualMachineCheckExists(expected bool) resource.TestCheckFunc { return func(s *terraform.State) error { _, err := testGetVirtualMachine(s, "vm") @@ -5768,6 +5795,76 @@ resource "vsphere_virtual_machine" "vm" { ) } +func testAccResourceVSphereVirtualMachineConfigCloneChangedDiskTypeDsCluster() string { + return fmt.Sprintf(` + %s + +data "vsphere_network" "network" { + name = "VM Network" + datacenter_id = data.vsphere_datacenter.rootdc1.id +} + +resource "vsphere_virtual_machine" "template" { + name = "vm-1-template" + resource_pool_id = data.vsphere_compute_cluster.rootcompute_cluster1.resource_pool_id + datastore_id = data.vsphere_datastore.rootds1.id + + num_cpus = 2 + memory = 2048 + guest_id = "other3xLinuxGuest" + + network_interface { + network_id = data.vsphere_network.network.id + } + + + wait_for_guest_ip_timeout = 0 + wait_for_guest_net_timeout = 0 + + disk { + label = "disk0" + size = 4 + } +} + + + +resource "vsphere_virtual_machine" "vm" { + name = "vm-1-template-clone" + resource_pool_id = data.vsphere_compute_cluster.rootcompute_cluster1.resource_pool_id + guest_id = vsphere_virtual_machine.template.guest_id + network_interface { + network_id = data.vsphere_network.network.id + } + datastore_cluster_id = data.vsphere_datastore_cluster.ds_cluster1.id + + num_cpus = 2 + memory = 2048 + + scsi_type =vsphere_virtual_machine.template.scsi_type + wait_for_guest_ip_timeout = 0 + wait_for_guest_net_timeout = 0 + + disk { + label = "disk0" + size = vsphere_virtual_machine.template.disk.0.size + } + + clone { + template_uuid = vsphere_virtual_machine.template.id + } +} + +`, + testhelper.CombineConfigs( + testhelper.ConfigDataRootDC1(), + testhelper.ConfigDataRootComputeCluster1(), + testhelper.ConfigDataRootDS1(), + testhelper.ConfigDSClusterData(), + ), + ) +} + func testAccResourceVSphereVirtualMachineConfigWithHotAdd(nc, nm int, cha, chr, mha bool) string { return fmt.Sprintf(` From fc3757a1609095b8760c5b3ee576ba0ec8fdfd28 Mon Sep 17 00:00:00 2001 From: schneif2 <48552719+schneif2@users.noreply.github.com> Date: Thu, 12 Oct 2023 19:43:29 +0200 Subject: [PATCH 64/67] Increase hardware version to 21 (#2038) * Upgrade hardware_version to 21 * Update Docs to hardware_version 21 --- vsphere/virtual_machine_config_structure.go | 2 +- website/docs/r/virtual_machine.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vsphere/virtual_machine_config_structure.go b/vsphere/virtual_machine_config_structure.go index 2f0abfc76..a478e5f37 100644 --- a/vsphere/virtual_machine_config_structure.go +++ b/vsphere/virtual_machine_config_structure.go @@ -352,7 +352,7 @@ func schemaVirtualMachineConfigSpec() map[string]*schema.Schema { "hardware_version": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validation.IntBetween(4, 19), + ValidateFunc: validation.IntBetween(4, 21), Description: "The hardware version for the virtual machine.", Computed: true, }, diff --git a/website/docs/r/virtual_machine.html.markdown b/website/docs/r/virtual_machine.html.markdown index c273c2787..7be7b9381 100644 --- a/website/docs/r/virtual_machine.html.markdown +++ b/website/docs/r/virtual_machine.html.markdown @@ -650,7 +650,7 @@ The following options are general virtual machine and provider workflow options: [vmware-docs-guest-ids]: https://vdc-download.vmware.com/vmwb-repository/dcr-public/b50dcbbf-051d-4204-a3e7-e1b618c1e384/538cf2ec-b34f-4bae-a332-3820ef9e7773/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html -* `hardware_version` - (Optional) The hardware version number. Valid range is from 4 to 19. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more information. +* `hardware_version` - (Optional) The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more information. [virtual-machine-hardware-compatibility]: https://kb.vmware.com/s/article/2007240 From 6aa0e845ef9af11737b5013ebde3665b89b676c0 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 12 Oct 2023 15:50:41 -0400 Subject: [PATCH 65/67] docs: update `CHANGELOG.md` (#2039) Update `CHANGELOG.md`. Signed-off-by: Ryan Johnson --- CHANGELOG.md | 19 +++++++++++++++++-- website/docs/r/virtual_machine.html.markdown | 5 +++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2682cf36c..9bd3e2f52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,26 @@ # +## 2.5.1 (October 12, 2023) + +BUG FIXES: + +* `resource/virtual_machine`: Fixed cloning regression on datastore cluster. Restored behavior not to send relocate specs for the virtual disks when it is cloned on datastore cluster with exception when `datastore_id`` is explicitly specified for the virtual disk. ([#2037](https://github.com/hashicorp/terraform-provider-vsphere/pull/2037)) +* `resource/vsphere_virtual_disk`: Fixed improper disk type handling forcing disks to be recreated. ([#2033](https://github.com/hashicorp/terraform-provider-vsphere/pull/2033)) + +IMPROVEMENTS: + +* `resource/virtual_machine`: Allow hardware version up to 21. ([#2038](https://github.com/hashicorp/terraform-provider-vsphere/pull/2038)) + +CHORES: + +* `provider`: Bumps `golang.org/x/net` from 0.13.0 to 0.17.0. ([#2035](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2035)) + ## 2.5.0 (October 09, 2023) BUG FIXES: -* `resource/virtual_machine`: Removes the validation for `eagerly_scrubbed` and `thin_provision` fields for a disk subresource so that `ignore_changes` resolves a deployment. ([#2028](https://github.com/hashicorp/terraform-provider-vsphere/pull/2028) -* `resource/virtual_machine`: Adds a differential between the disk properties specified and those existing on the source virtual machine disk, allowing changes to be sent to the API for disk subresource. ([#2028](https://github.com/hashicorp/terraform-provider-vsphere/pull/2028) +* `resource/virtual_machine`: Removes the validation for `eagerly_scrubbed` and `thin_provision` fields for a disk subresource so that `ignore_changes` resolves a deployment. ([#2028](https://github.com/hashicorp/terraform-provider-vsphere/pull/2028)) +* `resource/virtual_machine`: Adds a differential between the disk properties specified and those existing on the source virtual machine disk, allowing changes to be sent to the API for disk subresource. ([#2028](https://github.com/hashicorp/terraform-provider-vsphere/pull/2028)) IMPROVEMENTS: diff --git a/website/docs/r/virtual_machine.html.markdown b/website/docs/r/virtual_machine.html.markdown index 7be7b9381..43a08e8a1 100644 --- a/website/docs/r/virtual_machine.html.markdown +++ b/website/docs/r/virtual_machine.html.markdown @@ -648,10 +648,11 @@ The following options are general virtual machine and provider workflow options: * `guest_id` - (Optional) The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: `otherGuest64`. -[vmware-docs-guest-ids]: https://vdc-download.vmware.com/vmwb-repository/dcr-public/b50dcbbf-051d-4204-a3e7-e1b618c1e384/538cf2ec-b34f-4bae-a332-3820ef9e7773/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html +[vmware-docs-guest-ids]: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/184bb3ba-6fa8-4574-a767-d0c96e2a38f4/ba9422ef-405c-47dd-8553-e11b619185b2/SDK/vsphere-ws/docs/ReferenceGuide/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html -* `hardware_version` - (Optional) The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more information. +* `hardware_version` - (Optional) The hardware version number. Valid range is from 4 to 21. The hardware version cannot be downgraded. See virtual machine hardware [versions][virtual-machine-hardware-versions] and [compatibility][virtual-machine-hardware-compatibility] for more information on supported settings. +[virtual-machine-hardware-versions]: https://kb.vmware.com/s/article/1003746 [virtual-machine-hardware-compatibility]: https://kb.vmware.com/s/article/2007240 * `host_system_id` - (Optional) The [managed object reference ID][docs-about-morefs] of a host on which to place the virtual machine. See the section on [virtual machine migration](#virtual-machine-migration) for more information on modifying this value. When using a vSphere cluster, if a `host_system_id` is not supplied, vSphere will select a host in the cluster to place the virtual machine, according to any defaults or vSphere DRS placement policies. From f48cce8cfce3aeb1b95d2ecaf3b711f562d2b54b Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Mon, 16 Oct 2023 15:46:33 -0400 Subject: [PATCH 66/67] docs: update `resource/virtual_machine` (#1563) Updated `resource/virtual_machine` docs for: - `sync_time_with_host` - `sync_time_with_host_periodically` Signed-off-by: Ryan Johnson --- website/docs/r/virtual_machine.html.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/r/virtual_machine.html.markdown b/website/docs/r/virtual_machine.html.markdown index 43a08e8a1..db420fa06 100644 --- a/website/docs/r/virtual_machine.html.markdown +++ b/website/docs/r/virtual_machine.html.markdown @@ -735,6 +735,10 @@ The following options control boot settings on a virtual machine: The following options control VMware Tools settings on the virtual machine: +* `sync_time_with_host` - (Optional) Enable the guest operating system to synchronization its clock with the host when the virtual machine is powered on or resumed. Requires vSphere 7.0 Update 1 and later. Requires VMware Tools to be installed. + +* `sync_time_with_host_periodically` - (Optional) Enable the guest operating system to periodically synchronize its clock with the host. Requires vSphere 7.0 Update 1 and later. On previous versions, setting `sync_time_with_host` is will enable periodic synchronization. Requires VMware Tools to be installed. + * `run_tools_scripts_after_power_on` - (Optional) Enable post-power-on scripts to run when VMware Tools is installed. Default: `true`. * `run_tools_scripts_after_resume` - (Optional) Enable ost-resume scripts to run when VMware Tools is installed. Default: `true`. From 7c5fae0a7cf9c3e9e557bfe7f856a7c062a082a9 Mon Sep 17 00:00:00 2001 From: Xinyu Zhang <109590542+zxinyu08@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:29:04 +0800 Subject: [PATCH 67/67] feat: add vsan esa support (#1874) * feat: add vSAN ESA support * nit * add version checking * fix bug of enabling vSAN ESA for the first time * refactor version check of vsan esa. * nit * address comments * add unmap read back due to delete by mistake * skip vsan esa acceptance test due to version imcompatible * docs: update `CHANGELOG.md` Updated `CHANGELOG.md`. Signed-off-by: Ryan Johnson --------- Signed-off-by: Ryan Johnson Co-authored-by: Ryan Johnson --- CHANGELOG.md | 8 +- vsphere/resource_vsphere_compute_cluster.go | 98 ++++++++++++------- .../resource_vsphere_compute_cluster_test.go | 61 ++++++++++++ website/docs/r/compute_cluster.html.markdown | 13 ++- 4 files changed, 140 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bd3e2f52..978d1055b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,16 @@ # +## 2.6.0 (Unreleased) + +FEATURES: + +* `resource/compute_cluster`: Adds support for vSAN Express Storage Architecture in vSphere 8.0. ([#1874](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1874)) + ## 2.5.1 (October 12, 2023) BUG FIXES: -* `resource/virtual_machine`: Fixed cloning regression on datastore cluster. Restored behavior not to send relocate specs for the virtual disks when it is cloned on datastore cluster with exception when `datastore_id`` is explicitly specified for the virtual disk. ([#2037](https://github.com/hashicorp/terraform-provider-vsphere/pull/2037)) +* `resource/virtual_machine`: Fixed cloning regression on datastore cluster. Restored behavior not to send relocate specs for the virtual disks when it is cloned on datastore cluster with exception when `datastore_id` is explicitly specified for the virtual disk. ([#2037](https://github.com/hashicorp/terraform-provider-vsphere/pull/2037)) * `resource/vsphere_virtual_disk`: Fixed improper disk type handling forcing disks to be recreated. ([#2033](https://github.com/hashicorp/terraform-provider-vsphere/pull/2033)) IMPROVEMENTS: diff --git a/vsphere/resource_vsphere_compute_cluster.go b/vsphere/resource_vsphere_compute_cluster.go index 77b822ad8..a843ffa43 100644 --- a/vsphere/resource_vsphere_compute_cluster.go +++ b/vsphere/resource_vsphere_compute_cluster.go @@ -498,17 +498,26 @@ func resourceVSphereComputeCluster() *schema.Resource { Default: false, Description: "Whether the vSAN service is enabled for the cluster.", }, + "vsan_esa_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + Description: "Whether the vSAN ESA service is enabled for the cluster.", + ConflictsWith: []string{"vsan_dedup_enabled", "vsan_compression_enabled"}, + }, "vsan_dedup_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: "Whether the vSAN deduplication service is enabled for the cluster.", + Type: schema.TypeBool, + Optional: true, + Default: false, + Description: "Whether the vSAN deduplication service is enabled for the cluster.", + ConflictsWith: []string{"vsan_esa_enabled"}, }, "vsan_compression_enabled": { - Type: schema.TypeBool, - Optional: true, - Default: false, - Description: "Whether the vSAN compression service is enabled for the cluster.", + Type: schema.TypeBool, + Optional: true, + Default: false, + Description: "Whether the vSAN compression service is enabled for the cluster.", + ConflictsWith: []string{"vsan_esa_enabled"}, }, "vsan_performance_enabled": { Type: schema.TypeBool, @@ -561,13 +570,11 @@ func resourceVSphereComputeCluster() *schema.Resource { Description: "A list of disk UUIDs to add to the vSAN cluster.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - // use 4gb disk from ova in the future for acctests "cache": { Type: schema.TypeString, Description: "Cache disk.", Optional: true, }, - // use 8gb disk from ova in the future for acctests "storage": { Type: schema.TypeSet, Description: "List of storage disks.", @@ -1352,6 +1359,7 @@ func resourceVSphereComputeClusterFlattenData( } d.Set("vsan_enabled", structure.BoolNilFalse(vsanConfig.Enabled)) + d.Set("vsan_esa_enabled", structure.BoolNilFalse(vsanConfig.VsanEsaEnabled)) if vsanConfig.DataEfficiencyConfig != nil { d.Set("vsan_dedup_enabled", vsanConfig.DataEfficiencyConfig.DedupEnabled) @@ -1385,17 +1393,15 @@ func resourceVSphereComputeClusterFlattenData( d.Set("vsan_dit_rekey_interval", 0) } - if version.AtLeast(viapi.VSphereVersion{Product: version.Product, Major: 7, Minor: 0, Patch: 1}) { - var dsIDs []string - if vsanConfig.DatastoreConfig != nil { - for _, ds := range vsanConfig.DatastoreConfig.(*vsantypes.VsanAdvancedDatastoreConfig).RemoteDatastores { - dsIDs = append(dsIDs, ds.Value) - } - } - if err := d.Set("vsan_remote_datastore_ids", schema.NewSet(schema.HashString, structure.SliceStringsToInterfaces(dsIDs))); err != nil { - return err + var dsIDs []string + if vsanConfig.DatastoreConfig != nil { + for _, ds := range vsanConfig.DatastoreConfig.(*vsantypes.VsanAdvancedDatastoreConfig).RemoteDatastores { + dsIDs = append(dsIDs, ds.Value) } } + if err := d.Set("vsan_remote_datastore_ids", schema.NewSet(schema.HashString, structure.SliceStringsToInterfaces(dsIDs))); err != nil { + return err + } return flattenClusterConfigSpecEx(d, props.ConfigurationEx.(*types.ClusterConfigInfoEx), version) } @@ -1463,6 +1469,19 @@ func resourceVSphereComputeClusterApplyVsanConfig(d *schema.ResourceData, meta i return err } version := viapi.ParseVersionFromClient(client) + + if version.AtLeast(viapi.VSphereVersion{Product: version.Product, Major: 8, Minor: 0}) { + if !d.Get("vsan_enabled").(bool) && d.Get("vsan_esa_enabled").(bool) { + return fmt.Errorf("vSAN ESA service cannot be enabled on cluster due to vSAN is disabled: %s", d.Get("name").(string)) + } + if !d.HasChange("vsan_enabled") && d.HasChange("vsan_esa_enabled") { + return fmt.Errorf("vSAN ESA service must be configured along with vSAN service: %s", d.Get("name").(string)) + } + if d.Get("vsan_esa_enabled").(bool) && !d.Get("vsan_unmap_enabled").(bool) { + return fmt.Errorf("vSAN unmap service should be explicitly enabled when vSAN ESA is enabled: %s", d.Get("name").(string)) + } + } + conf := vsantypes.VimVsanReconfigSpec{ Modify: true, VsanClusterConfig: &vsantypes.VsanClusterConfigInfo{ @@ -1478,15 +1497,22 @@ func resourceVSphereComputeClusterApplyVsanConfig(d *schema.ResourceData, meta i }, } - dedupEnabled := d.Get("vsan_dedup_enabled").(bool) - compressionEnabled := d.Get("vsan_compression_enabled").(bool) - if dedupEnabled && !compressionEnabled { - return fmt.Errorf("vsan compression must be enabled if vsan dedup is enabled") + if version.AtLeast(viapi.VSphereVersion{Product: version.Product, Major: 8, Minor: 0}) { + vsanEsaEnabled := d.Get("vsan_esa_enabled").(bool) + conf.VsanClusterConfig.(*vsantypes.VsanClusterConfigInfo).VsanEsaEnabled = &vsanEsaEnabled } - conf.DataEfficiencyConfig = &vsantypes.VsanDataEfficiencyConfig{ - DedupEnabled: dedupEnabled, - CompressionEnabled: &compressionEnabled, + if d.Get("vsan_enabled").(bool) && !d.Get("vsan_esa_enabled").(bool) { + dedupEnabled := d.Get("vsan_dedup_enabled").(bool) + compressionEnabled := d.Get("vsan_compression_enabled").(bool) + if dedupEnabled && !compressionEnabled { + return fmt.Errorf("vsan compression must be enabled if vsan dedup is enabled") + } + + conf.DataEfficiencyConfig = &vsantypes.VsanDataEfficiencyConfig{ + DedupEnabled: dedupEnabled, + CompressionEnabled: &compressionEnabled, + } } perfConfig, err := expandVsanPerfConfig(d) @@ -1505,17 +1531,15 @@ func resourceVSphereComputeClusterApplyVsanConfig(d *schema.ResourceData, meta i } // handle remote datastore/HCI Mesh in a separate call - if version.AtLeast(viapi.VSphereVersion{Product: version.Product, Major: 7, Minor: 0, Patch: 1}) { - datastoreConfig, err := expandVsanDatastoreConfig(d, meta) - if err != nil { - return err - } - if err := vsanclient.Reconfigure(meta.(*Client).vsanClient, cluster.Reference(), vsantypes.VimVsanReconfigSpec{ - Modify: true, - DatastoreConfig: datastoreConfig, - }); err != nil { - return fmt.Errorf("cannot apply vsan remote datastores on cluster '%s': %s", d.Get("name").(string), err) - } + datastoreConfig, err := expandVsanDatastoreConfig(d, meta) + if err != nil { + return err + } + if err := vsanclient.Reconfigure(meta.(*Client).vsanClient, cluster.Reference(), vsantypes.VimVsanReconfigSpec{ + Modify: true, + DatastoreConfig: datastoreConfig, + }); err != nil { + return fmt.Errorf("cannot apply vsan remote datastores on cluster '%s': %s", d.Get("name").(string), err) } return nil diff --git a/vsphere/resource_vsphere_compute_cluster_test.go b/vsphere/resource_vsphere_compute_cluster_test.go index ff3efc95f..2919d0fea 100644 --- a/vsphere/resource_vsphere_compute_cluster_test.go +++ b/vsphere/resource_vsphere_compute_cluster_test.go @@ -304,6 +304,29 @@ func TestAccResourceVSphereComputeCluster_vsanDITEncryption(t *testing.T) { }) } +func TestAccResourceVSphereComputeCluster_vsanEsaEnabled(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + RunSweepers() + testAccPreCheck(t) + testAccResourceVSphereComputeClusterPreCheck(t) + testAccResourceVSphereComputeClusterVSANEsaPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccResourceVSphereComputeClusterCheckExists(false), + Steps: []resource.TestStep{ + { + Config: testAccResourceVSphereComputeClusterConfigVSANEsaEnabled(), + Check: resource.ComposeTestCheckFunc( + testAccResourceVSphereComputeClusterCheckExists(true), + resource.TestCheckResourceAttr("vsphere_compute_cluster.compute_cluster", "vsan_enabled", "true"), + resource.TestCheckResourceAttr("vsphere_compute_cluster.compute_cluster", "vsan_esa_enabled", "true"), + ), + }, + }, + }) +} + func TestAccResourceVSphereComputeCluster_explicitFailoverHost(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { @@ -563,6 +586,20 @@ func testAccResourceVSphereComputeClusterPreCheck(t *testing.T) { } } +func testAccResourceVSphereComputeClusterVSANEsaPreCheck(t *testing.T) { + meta, err := testAccProviderMeta(t) + if err != nil { + t.Skip("can not get meta") + } + client, err := resourceVSphereComputeClusterClient(meta) + if err != nil { + t.Skip("can not get client") + } + if version := viapi.ParseVersionFromClient(client); !version.AtLeast(viapi.VSphereVersion{Product: version.Product, Major: 8, Minor: 0}) { + t.Skip("vSAN ESA acceptance test should be run on vSphere 8.0 or higher") + } +} + func testAccResourceVSphereComputeClusterCheckExists(expected bool) resource.TestCheckFunc { return func(s *terraform.State) error { _, err := testGetComputeCluster(s, "compute_cluster", resourceVSphereComputeClusterName) @@ -982,6 +1019,30 @@ resource "vsphere_compute_cluster" "compute_cluster" { ) } +func testAccResourceVSphereComputeClusterConfigVSANEsaEnabled() string { + return fmt.Sprintf(` +%s + +resource "vsphere_compute_cluster" "compute_cluster" { + name = "testacc-compute-cluster" + datacenter_id = data.vsphere_datacenter.rootdc1.id + host_system_ids = [data.vsphere_host.roothost3.id, data.vsphere_host.roothost4.id] + + vsan_enabled = true + vsan_esa_enabled = true + vsan_unmap_enabled = true + force_evacuate_on_destroy = true +} + +`, + testhelper.CombineConfigs( + testhelper.ConfigDataRootDC1(), + testhelper.ConfigDataRootHost3(), + testhelper.ConfigDataRootHost4(), + ), + ) +} + func testAccResourceVSphereComputeClusterConfigBasic() string { return fmt.Sprintf(` %s diff --git a/website/docs/r/compute_cluster.html.markdown b/website/docs/r/compute_cluster.html.markdown index a027e6e3b..71764a54f 100644 --- a/website/docs/r/compute_cluster.html.markdown +++ b/website/docs/r/compute_cluster.html.markdown @@ -462,8 +462,11 @@ details, see the referenced link in the above paragraph. ### vSAN Settings * `vsan_enabled` - (Optional) Enables vSAN on the cluster. +* `vsan_esa_enabled` - (Optional) Enables vSAN ESA on the cluster. +* `vsan_unmap_enabled` - (Optional) Enables vSAN unmap on the cluster. + You must explicitly enable vSAN unmap when you enable vSAN ESA on the cluster. * `vsan_dedup_enabled` - (Optional) Enables vSAN deduplication on the cluster. - Cannot be independently set to true. When vSAN deduplication is enabled, vSAN + Cannot be independently set to `true`. When vSAN deduplication is enabled, vSAN compression must also be enabled. * `vsan_compression_enabled` - (Optional) Enables vSAN compression on the cluster. @@ -473,7 +476,6 @@ details, see the referenced link in the above paragraph. performance service on the cluster. * `vsan_network_diagnostic_mode_enabled` - (Optional) Enables network diagnostic mode for vSAN performance service on the cluster. -* `vsan_unmap_enabled` - (Optional) Enables vSAN unmap on the cluster. * `vsan_remote_datastore_ids` - (Optional) The remote vSAN datastore IDs to be mounted to this cluster. Conflicts with `vsan_dit_encryption_enabled` and `vsan_dit_rekey_interval`, i.e., vSAN HCI Mesh feature cannot be enabled with @@ -505,6 +507,7 @@ resource "vsphere_compute_cluster" "compute_cluster" { ha_enabled = false vsan_enabled = true + vsan_esa_enabled = true vsan_dedup_enabled = true vsan_compression_enabled = true vsan_performance_enabled = true @@ -558,3 +561,9 @@ specific version of vSphere. These settings require vSphere 7.0 or higher: * [`drs_scale_descendants_shares`](#drs_scale_descendants_shares) + +### Settings that Require vSphere 8.0 or higher + +These settings require vSphere 8.0 or higher: + +* [`vsan_esa_enabled`](#vsan_esa_enabled)