Skip to content

Commit 260922d

Browse files
committed
Merge v2.7.0
1 parent 53f910a commit 260922d

Some content is hidden

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

42 files changed

+1628
-1222
lines changed

.circleci/config.yml

Lines changed: 93 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ commands:
1414
- "/go/pkg/mod"
1515

1616
jobs:
17-
"docker-go114 build":
17+
"docker-go115 build":
1818
docker:
19-
- image: docker.mirror.hashicorp.services/circleci/golang:1.14
19+
- image: docker.mirror.hashicorp.services/circleci/golang:1.15
2020
steps:
2121
- get_dependencies
2222
- run: go build ./...
23-
"docker-go114 test":
23+
"docker-go115 test":
2424
docker:
25-
- image: docker.mirror.hashicorp.services/circleci/golang:1.14
25+
- image: docker.mirror.hashicorp.services/circleci/golang:1.15
2626
environment:
2727
TF_ACC_TERRAFORM_VERSION: "0.12.26"
2828
parameters:
@@ -42,67 +42,130 @@ jobs:
4242
destination: raw-test-output
4343
- store_test_results:
4444
path: << parameters.test_results >>
45-
"docker-go114 vet":
45+
"docker-go115 vet":
4646
docker:
47-
- image: docker.mirror.hashicorp.services/circleci/golang:1.14
47+
- image: docker.mirror.hashicorp.services/circleci/golang:1.15
4848
steps:
4949
- get_dependencies
5050
- run: go vet ./...
51-
"docker-go114 gofmt":
51+
"docker-go115 gofmt":
5252
docker:
53-
- image: docker.mirror.hashicorp.services/circleci/golang:1.14
53+
- image: docker.mirror.hashicorp.services/circleci/golang:1.15
5454
steps:
5555
- get_dependencies
5656
- run: ./scripts/gofmtcheck.sh
57-
"docker-go114 release":
57+
"docker-go115 release":
5858
docker:
59-
- image: docker.mirror.hashicorp.services/circleci/golang:1.14
59+
- image: docker.mirror.hashicorp.services/circleci/golang:1.15
6060
steps:
6161
- add_ssh_keys:
6262
fingerprints:
6363
- "3b:ec:3f:f1:0d:1a:a9:2c:a6:6f:03:cb:46:37:11:50"
6464
- get_dependencies
6565
- run: ./scripts/release/release.sh
66+
"docker-go116 build":
67+
docker:
68+
- image: docker.mirror.hashicorp.services/circleci/golang:1.16
69+
steps:
70+
- get_dependencies
71+
- run: go build ./...
72+
"docker-go116 test":
73+
docker:
74+
- image: docker.mirror.hashicorp.services/circleci/golang:1.16
75+
environment:
76+
TF_ACC_TERRAFORM_VERSION: "0.12.26"
77+
parameters:
78+
test_results:
79+
type: string
80+
default: /tmp/test-results
81+
steps:
82+
- get_dependencies
83+
- run: mkdir -p << parameters.test_results >>/report
84+
- run:
85+
command: |
86+
gotestsum --junitfile << parameters.test_results >>/report/gotestsum-report.xml -- -coverprofile=cover.out ./...
87+
go tool cover -html=cover.out -o coverage.html
88+
mv coverage.html << parameters.test_results >>
89+
- store_artifacts:
90+
path: << parameters.test_results >>
91+
destination: raw-test-output
92+
- store_test_results:
93+
path: << parameters.test_results >>
94+
"docker-go116 vet":
95+
docker:
96+
- image: docker.mirror.hashicorp.services/circleci/golang:1.16
97+
steps:
98+
- get_dependencies
99+
- run: go vet ./...
100+
"docker-go116 gofmt":
101+
docker:
102+
- image: docker.mirror.hashicorp.services/circleci/golang:1.16
103+
steps:
104+
- get_dependencies
105+
- run: ./scripts/gofmtcheck.sh
66106

67107
workflows:
68108
version: 2
69109
pr:
70110
jobs:
71-
- "docker-go114 build"
72-
- "docker-go114 test":
111+
- "docker-go115 build"
112+
- "docker-go115 test":
113+
requires:
114+
- "docker-go115 build"
115+
- "docker-go115 vet":
116+
requires:
117+
- "docker-go115 build"
118+
- "docker-go115 gofmt":
73119
requires:
74-
- "docker-go114 build"
75-
- "docker-go114 vet":
120+
- "docker-go115 build"
121+
- "docker-go116 build"
122+
- "docker-go116 test":
76123
requires:
77-
- "docker-go114 build"
78-
- "docker-go114 gofmt":
124+
- "docker-go116 build"
125+
- "docker-go116 vet":
79126
requires:
80-
- "docker-go114 build"
127+
- "docker-go116 build"
128+
- "docker-go116 gofmt":
129+
requires:
130+
- "docker-go116 build"
81131
release:
82132
jobs:
83-
- "docker-go114 build"
84-
- "docker-go114 test":
133+
- "docker-go115 build"
134+
- "docker-go115 test":
135+
requires:
136+
- "docker-go115 build"
137+
- "docker-go115 vet":
138+
requires:
139+
- "docker-go115 build"
140+
- "docker-go115 gofmt":
141+
requires:
142+
- "docker-go115 build"
143+
- "docker-go116 build"
144+
- "docker-go116 test":
85145
requires:
86-
- "docker-go114 build"
87-
- "docker-go114 vet":
146+
- "docker-go116 build"
147+
- "docker-go116 vet":
88148
requires:
89-
- "docker-go114 build"
90-
- "docker-go114 gofmt":
149+
- "docker-go116 build"
150+
- "docker-go116 gofmt":
91151
requires:
92-
- "docker-go114 build"
152+
- "docker-go116 build"
93153
- trigger-release:
94154
filters:
95155
branches:
96156
only:
97-
- master
157+
- main
98158
type: approval
99-
- "docker-go114 release":
159+
- "docker-go115 release":
100160
filters:
101161
branches:
102162
only:
103-
- master
163+
- main
104164
requires:
105165
- trigger-release
106-
- "docker-go114 test"
107-
- "docker-go114 vet"
108-
- "docker-go114 gofmt"
166+
- "docker-go115 test"
167+
- "docker-go115 vet"
168+
- "docker-go115 gofmt"
169+
- "docker-go116 test"
170+
- "docker-go116 vet"
171+
- "docker-go116 gofmt"

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ This section describes the scope of notable repositories, which may help you
4141
ensure you're in the right place when reporting bugs and feature requests,
4242
or submitting a patch.
4343

44-
- `hashicorp/terraform` - Terraform **Core** which implements all the low-level functionality which isn't domain specific (that's covered by providers). Read more about [distinction between core & providers in the Readme](https://github.com/hashicorp/terraform-plugin-sdk/blob/master/README.md#scope-providers-vs-core).
44+
- `hashicorp/terraform` - Terraform **Core** which implements all the low-level functionality which isn't domain specific (that's covered by providers). Read more about [distinction between core & providers in the Readme](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/README.md#scope-providers-vs-core).
4545
- `terraform-providers/*` - This organization contains all official Terraform **Providers** built on top of the Plugin SDK
4646
- `hashicorp/terraform-plugin-sdk` - Terraform **Plugin SDK** used to build Providers
47-
- `hashicorp/terraform-website` - Source code of **documentation** published on [terraform.io](https://www.terraform.io), including [Extend section](https://www.terraform.io/docs/extend/index.html) which has source in [the `extend` folder](https://github.com/hashicorp/terraform-website/tree/master/content/source/docs/extend).
47+
- `hashicorp/terraform-website` - Source code of **documentation** published on [terraform.io](https://www.terraform.io), including [Extend section](https://www.terraform.io/docs/extend/index.html) which has source in [the `extend` folder](https://github.com/hashicorp/terraform-website/tree/main/content/source/docs/extend).
4848
- `hashicorp/hcl2` - **HCL** (HashiCorp Config Language) is the language used by users of Terraform (Core) to describe infrastructure. The parser and other features concerning the language (such as builtin functions) are found here.
4949
- `zclconf/go-cty` - **cty**, the type system used by both Terraform (Core) and SDK (therefore providers too) to represent data in state before and after gRPC encoding/decoding
5050

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ labels: bug
88
<!---
99
Inspect your go.mod as below to find the version, and paste the result between the ``` marks below.
1010
11-
go mod edit -json | jq '.Require[] | select(.Path=="github.com/hashicorp/terraform-plugin-sdk/v2")'
11+
go list -m github.com/hashicorp/terraform-plugin-sdk/...
1212
1313
If you are not running the latest version of the SDK, please try upgrading
1414
because your bug may have already been fixed.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ labels: enhancement
88
<!--
99
Inspect your go.mod as below to find the version, and paste the result between the ``` marks below.
1010
11-
go mod edit -json | jq '.Require[] | select(.Path=="github.com/hashicorp/terraform-plugin-sdk/v2")'
11+
go list -m github.com/hashicorp/terraform-plugin-sdk/...
1212
1313
If you are not running the latest version of the SDK, please try upgrading
1414
because your feature may have already been implemented.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Issue Comment Created Triage
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
issue_comment_triage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions-ecosystem/action-remove-labels@v1
12+
with:
13+
labels: |
14+
stale
15+
waiting-reply

.github/workflows/lock.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Lock Threads'
2+
3+
on:
4+
schedule:
5+
- cron: '50 1 * * *'
6+
7+
jobs:
8+
lock:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/lock-threads@v2
12+
with:
13+
github-token: ${{ github.token }}
14+
issue-lock-comment: >
15+
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
16+
17+
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
18+
issue-lock-inactive-days: '30'
19+
pr-lock-comment: >
20+
I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active contributions.
21+
22+
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
23+
pr-lock-inactive-days: '30'

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.14.9
1+
1.15.8

.hashibot.hcl

Lines changed: 0 additions & 31 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,76 @@
1-
# 2.4.0 (Unreleased)
1+
# 2.7.0 (June 25, 2021)
2+
3+
ENHANCEMENTS:
4+
5+
* Added `ProtoV6ProviderFactories` to `TestCase`, so protocol version 6 providers can be used in acceptance tests ([#761](https://github.com/hashicorp/terraform-plugin-sdk/issues/761))
6+
* Made SDK-generated diagnostics clearer and more consistent ([#755](https://github.com/hashicorp/terraform-plugin-sdk/issues/755))
7+
* Upgraded to use terraform-exec v0.14.0, which is required for acceptance test compatibility with Terraform v1.0.1 ([#775](https://github.com/hashicorp/terraform-plugin-sdk/issues/775))
8+
9+
# 2.6.1 (April 23, 2021)
10+
11+
BUG FIXES:
12+
13+
* Updated the GPG key used to verify Terraform installs in response to the [Terraform GPG key rotation](https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512). ([#750](https://github.com/hashicorp/terraform-plugin-sdk/issues/750))
14+
15+
# 2.6.0 (April 21, 2021)
16+
17+
ENHANCEMENTS:
18+
19+
* Made TF_ACC_TERRAFORM_VERSION more permissive, accepting values in either vX.Y.Z or X.Y.Z formats. ([#731](https://github.com/hashicorp/terraform-plugin-sdk/issues/731))
20+
* Upgraded to use terraform-plugin-go v0.3.0 ([#739](https://github.com/hashicorp/terraform-plugin-sdk/issues/739))
21+
22+
# 2.5.0 (March 24, 2021)
23+
24+
ENHANCEMENTS
25+
26+
* Added the ability to opt out of context timeouts in CRUD functions ([#723](https://github.com/hashicorp/terraform-plugin-sdk/issues/723))
27+
28+
# 2.4.4 (February 24, 2021)
29+
30+
NOTES
31+
32+
As per our Go version support policy, we now require Go 1.15 or higher to use the SDK.
33+
34+
BUG FIXES
35+
36+
* Resolved bug where Diagnostics wouldn't get associated with their configuration context in user output. ([#696](https://github.com/hashicorp/terraform-plugin-sdk/issues/696))
37+
38+
# 2.4.3 (February 10, 2021)
39+
40+
BUG FIXES
41+
42+
* Make acceptance testing framework compatible with Terraform 0.15 ([#694](https://github.com/hashicorp/terraform-plugin-sdk/issues/694))
43+
44+
# 2.4.2 (January 27, 2021)
45+
46+
BUG FIXES
47+
48+
* Don't panic in very specific circumstances involving CustomizeDiff and empty strings in the config ([#686](https://github.com/hashicorp/terraform-plugin-sdk/issues/686))
49+
50+
# 2.4.1 (January 20, 2021)
51+
52+
BUG FIXES
53+
54+
* Don't panic during assertions when testing sets with varying levels of nesting ([#648](https://github.com/hashicorp/terraform-plugin-sdk/issues/648))
55+
* Prevent panics when sending Ctrl-C to Terraform ([#674](https://github.com/hashicorp/terraform-plugin-sdk/issues/674))
56+
* Make the error message when a "required" block is missing clearer, identifying the block in question ([#672](https://github.com/hashicorp/terraform-plugin-sdk/issues/672))
57+
58+
# 2.4.0 (December 19, 2020)
259

360
ENHANCEMENTS
461

5-
* Support `Unwrap` on SDK errors [GH-647]
6-
* Allow for `nil` errors in `diag.FromErr` [GH-623]
7-
* Added `validation.ToDiagFunc` helper to translate legacy validation functions into Diagnostics-aware validation functions. [GH-611]
8-
* Disable Checkpoint network connections during acceptance testing unless a Terraform binary needs to be installed. [GH-663]
62+
* Support `Unwrap` on SDK errors ([#647](https://github.com/hashicorp/terraform-plugin-sdk/issues/647))
63+
* Allow for `nil` errors in `diag.FromErr` ([#623](https://github.com/hashicorp/terraform-plugin-sdk/issues/623))
64+
* Added `validation.ToDiagFunc` helper to translate legacy validation functions into Diagnostics-aware validation functions. ([#611](https://github.com/hashicorp/terraform-plugin-sdk/issues/611))
65+
* Disable Checkpoint network connections during acceptance testing unless a Terraform binary needs to be installed. ([#663](https://github.com/hashicorp/terraform-plugin-sdk/issues/663))
966

1067
BUG FIXES
1168

12-
* Check for `nil` errors prior to invoking `ErrorCheck` [GH-646]
13-
* More reliable handling of logging [GH-639]
14-
* Modified error text to make golint and go vet happy when a non-empty plan is found in testing and an empty plan was expected [GH-596]
15-
* Add `UseJSONNumber` to `helper/schema.Resource` to make it possible to represent large numbers precisely. Setting to `true` will make numbers appear as `json.Number` in `StateUpgrader`s instead of as `float64`. [GH-662]
16-
* Fix logs sometimes appearing in test output when running acceptance tests. [GH-665]
69+
* Check for `nil` errors prior to invoking `ErrorCheck` ([#646](https://github.com/hashicorp/terraform-plugin-sdk/issues/646))
70+
* More reliable handling of logging ([#639](https://github.com/hashicorp/terraform-plugin-sdk/issues/639))
71+
* Modified error text to make golint and go vet happy when a non-empty plan is found in testing and an empty plan was expected ([#596](https://github.com/hashicorp/terraform-plugin-sdk/issues/596))
72+
* Add `UseJSONNumber` to `helper/schema.Resource` to make it possible to represent large numbers precisely. Setting to `true` will make numbers appear as `json.Number` in `StateUpgrader`s instead of as `float64`. ([#662](https://github.com/hashicorp/terraform-plugin-sdk/issues/662))
73+
* Fix logs sometimes appearing in test output when running acceptance tests. ([#665](https://github.com/hashicorp/terraform-plugin-sdk/issues/665))
1774

1875
NOTES
1976

0 commit comments

Comments
 (0)