Skip to content

Commit 870e85b

Browse files
authored
Merge branch 'main' into fix/2363
2 parents 3741bf9 + 06b1b47 commit 870e85b

File tree

91 files changed

+612
-487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+612
-487
lines changed

.github/issue_greeting_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Hello, {{ .author }}! 🖐
22

3-
Thank you for submitting an issue for this provider. The issue will now enter into the [issue lifecycle](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/docs/ISSUES.md#issue-lifecycle).
3+
Thank you for submitting an issue for this provider. The issue will now enter into the [issue lifecycle](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/docs/issues.md#issue-lifecycle).
44

5-
If you want to contribute to this project, please review the [contributing guidelines](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/docs/CONTRIBUTING.md) and information on [submitting pull requests](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/docs/PULL_REQUESTS.md).
5+
If you want to contribute to this project, please review the [contributing guidelines](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/docs/CONTRIBUTING.md) and information on [submitting pull requests](https://github.com/hashicorp/terraform-provider-vsphere/blob/main/docs/pull_requests.md).
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: golangci-lint
3+
4+
on:
5+
pull_request:
6+
paths-ignore:
7+
- README.md
8+
push:
9+
paths-ignore:
10+
- README.md
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 5
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
- name: Setup Go
23+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
24+
with:
25+
go-version-file: go.mod
26+
cache: true
27+
- run: go mod download
28+
- run: go build -v .
29+
- name: Run Linters
30+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
31+
with:
32+
version: latest

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.22.8
1+
1.23.8

.golangci.yml

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
---
2+
version: "2"
3+
4+
output:
5+
formats:
6+
text:
7+
path: stdout
8+
9+
linters:
10+
default: none
11+
enable:
12+
- errcheck
13+
- gosec
14+
- govet
15+
- ineffassign
16+
- misspell
17+
- revive
18+
- staticcheck
19+
- unconvert
20+
- unused
21+
settings:
22+
errcheck:
23+
exclude-functions:
24+
- github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
25+
- fmt:.*
26+
- io:Close
27+
exclusions:
28+
generated: lax
29+
presets:
30+
- comments
31+
- common-false-positives
32+
- legacy
33+
- std-error-handling
34+
rules:
35+
# TODO: Setting temporary exclusions for specific linters.
36+
- linters:
37+
- errcheck
38+
text: Error return value of `d.Set` is not checked
39+
- linters:
40+
- gosec
41+
text: G107
42+
- linters:
43+
- gosec
44+
text: G109
45+
- linters:
46+
- gosec
47+
text: G115
48+
- linters:
49+
- gosec
50+
text: G401
51+
- linters:
52+
- gosec
53+
text: G402
54+
- linters:
55+
- gosec
56+
text: G505
57+
- linters:
58+
- ineffassign
59+
text: ineffectual assignment
60+
- linters:
61+
- revive
62+
text: redefines-builtin-id
63+
- linters:
64+
- revive
65+
text: unused-parameter
66+
- linters:
67+
- revive
68+
text: var-naming
69+
- linters:
70+
- revive
71+
text: superfluous-else
72+
- linters:
73+
- staticcheck
74+
text: S1002
75+
- linters:
76+
- staticcheck
77+
text: S1007
78+
- linters:
79+
- staticcheck
80+
text: ST1007
81+
- linters:
82+
- staticcheck
83+
text: SA1019
84+
- linters:
85+
- staticcheck
86+
text: SA1040
87+
- linters:
88+
- staticcheck
89+
text: SA9003
90+
- linters:
91+
- staticcheck
92+
text: ST1005
93+
- linters:
94+
- staticcheck
95+
text: QF1002
96+
- linters:
97+
- staticcheck
98+
text: QF1005
99+
- linters:
100+
- unconvert
101+
text: unnecessary conversion
102+
- linters:
103+
- unused
104+
text: is unused
105+
- linters:
106+
- revive
107+
text: indent-error-flow
108+
- linters:
109+
- revive
110+
text: error-strings
111+
- linters:
112+
- revive
113+
text: range
114+
- linters:
115+
- revive
116+
text: exported
117+
- linters:
118+
- revive
119+
text: empty-block
120+
- linters:
121+
- staticcheck
122+
text: QF1008
123+
- linters:
124+
- staticcheck
125+
text: QF1012
126+
- linters:
127+
- staticcheck
128+
text: QF1003
129+
- linters:
130+
- staticcheck
131+
text: SA1006
132+
- linters:
133+
- staticcheck
134+
text: SA4006
135+
- linters:
136+
- staticcheck
137+
text: S1009
138+
- linters:
139+
- staticcheck
140+
text: S1017
141+
- linters:
142+
- staticcheck
143+
text: S1039
144+
- linters:
145+
- staticcheck
146+
text: S1040
147+
- linters:
148+
- staticcheck
149+
text: S1005
150+
- linters:
151+
- goimports
152+
text: File is not properly formatted
153+
- linters:
154+
- errcheck
155+
path: vsphere/data_source_vsphere_datacenter.go
156+
text: Error return value of `view.Destroy` is not checked
157+
- linters:
158+
- errcheck
159+
path: vsphere/distributed_virtual_switch_helper.go
160+
text: Error return value of `task.Wait` is not checked
161+
- linters:
162+
- gofmt
163+
path: vsphere/resource_vsphere_compute_cluster.go
164+
text: File is not properly formatted
165+
166+
paths:
167+
- third_party$
168+
- builtin$
169+
- examples$
170+
171+
issues:
172+
max-same-issues: 0
173+
174+
formatters:
175+
enable:
176+
- gofmt
177+
- goimports
178+
exclusions:
179+
generated: lax
180+
paths:
181+
- third_party$
182+
- builtin$
183+
- examples$

.goreleaser.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Copyright (c) HashiCorp, Inc.
22
# SPDX-License-Identifier: MPL-2.0
33

4+
version: 2
45
archives:
56
- files:
67
# Ensure only built binary and license file are archived
78
- src: 'LICENSE'
8-
dst: 'LICENSE.txt'
9-
format: zip
9+
dst: 'LICENSE.txt'
10+
formats: ['zip']
1011
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
1112
builds:
1213
- # Special binary naming is only necessary for Terraform CLI 0.12
@@ -85,4 +86,4 @@ signs:
8586
--out ${signature}
8687
artifacts: checksum
8788
snapshot:
88-
name_template: "{{ .Tag }}-next"
89+
version_template: "{{ .Tag }}-next"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ FEATURES:
310310

311311
DOCUMENTATION:
312312

313-
- Updated `INSTALL.md` use use `unzip` for Linux and macOS examples.
313+
- Updated `install.md` use use `unzip` for Linux and macOS examples.
314314
([#2105](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2105))
315315

316316
CHORES:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Learn more:
2828
[developer.hashicorp.com][terraform-install] and
2929
[the project][terraform-github] on GitHub.
3030

31-
- [Go 1.22.8][golang-install]
31+
- [Go 1.23.8][golang-install]
3232

3333
Required if building the provider.
3434

@@ -93,9 +93,9 @@ The Terraform Provider for VMware vSphere is available under the
9393
[provider-contributing]: docs/CONTRIBUTING.md
9494
[provider-discussions]: https://discuss.hashicorp.com/tags/c/terraform-providers/31/vsphere
9595
[provider-documentation]: https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs
96-
[provider-faq]: docs/FAQ.md
97-
[provider-install]: docs/INSTALL.md
98-
[provider-issue-lifecycle]: docs/ISSUES.md
96+
[provider-faq]: docs/faq.md
97+
[provider-install]: docs/install.md
98+
[provider-issue-lifecycle]: docs/issues.md
9999
[provider-issues]: https://github.com/hashicorp/terraform-provider-vsphere/issues/new/choose
100100
[provider-license]: LICENSE
101101
[terraform-github]: https://github.com/hashicorp/terraform

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ It's the best entry point if you are new to contributing to this provider.
1313
To learn more about how to create issues and pull requests in this repository,
1414
and what happens after they are created, you may refer to the resources below:
1515

16-
- [Issue Creation and Lifecycle](ISSUES.md)
17-
- [Pull Request Creation and Lifecycle](PULL_REQUESTS.md)
16+
- [Issue Creation and Lifecycle](issues.md)
17+
- [Pull Request Creation and Lifecycle](pull_requests.md)
1818

1919
## Cloning the Project
2020

website/docs/d/compute_cluster.html.markdown renamed to docs/data-sources/compute_cluster.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
subcategory: "Host and Cluster Management"
3-
layout: "vsphere"
43
page_title: "VMware vSphere: vsphere_compute_cluster"
54
sidebar_current: "docs-vsphere-data-source-compute-cluster"
65
description: |-
76
Provides a vSphere cluster data source. This can be used to get the general
87
attributes of a vSphere cluster.
98
---
109

11-
# vsphere\_compute\_cluster
10+
# vsphere_compute_cluster
1211

1312
The `vsphere_compute_cluster` data source can be used to discover the ID of a
1413
cluster in vSphere. This is useful to fetch the ID of a cluster that you want to
@@ -51,12 +50,12 @@ The following arguments are supported:
5150
absolute path. For default datacenters, use the `id` attribute from an empty
5251
`vsphere_datacenter` data source.
5352

54-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
55-
5653
## Attribute Reference
5754

5855
The following attributes are exported:
5956

6057
* `id`: The [managed object reference ID][docs-about-morefs] of the cluster.
6158
* `resource_pool_id`: The [managed object reference ID][docs-about-morefs] of
6259
the root resource pool for the cluster.
60+
61+
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider

website/docs/d/compute_cluster_host_group.html.markdown renamed to docs/data-sources/compute_cluster_host_group.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
subcategory: "Host and Cluster Management"
3-
layout: "vsphere"
43
page_title: "VMware vSphere: vsphere_compute_cluster_host_group"
54
sidebar_current: "docs-vsphere-data-source-compute-cluster-host-group"
65
description: |-
76
Provides a vSphere cluster host group data source. Returns attributes of a
87
vSphere cluster host group.
98
---
109

11-
# vsphere\_compute\_cluster\_host\_group
10+
# vsphere_compute_cluster_host_group
1211

1312
The `vsphere_compute_cluster_host_group` data source can be used to discover
1413
the IDs ESXi hosts in a host group and return host group attributes to other
@@ -48,9 +47,9 @@ The following arguments are supported:
4847
[managed object reference ID][docs-about-morefs] of the compute cluster for
4948
the host group.
5049

51-
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
52-
5350
## Attribute Reference
5451

5552
* `host_system_ids`: The [managed object reference ID][docs-about-morefs] of
5653
the ESXi hosts in the host group.
54+
55+
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider

0 commit comments

Comments
 (0)