Skip to content

Commit 39a59f8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pulumi-master
2 parents a54d0e1 + 4807673 commit 39a59f8

File tree

232 files changed

+7777
-5711
lines changed

Some content is hidden

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

232 files changed

+7777
-5711
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Let us know about an unexpected error, a crash, or an incorrect behavior.
4+
labels: bug
5+
---
6+
7+
### SDK version
8+
<!---
9+
Inspect your go.mod as below to find the version, and paste the result between the ``` marks below.
10+
11+
go mod edit -json | jq '.Require[] | select(.Path=="github.com/hashicorp/terraform-plugin-sdk")'
12+
13+
If you are not running the latest version of the SDK, please try upgrading
14+
because your bug may have already been fixed.
15+
16+
If the command above doesn't yield any results, it means you may not have migrated
17+
to the standalone SDK yet. See https://www.terraform.io/docs/extend/plugin-sdk.html for more.
18+
-->
19+
20+
```
21+
...
22+
```
23+
24+
### Relevant provider source code
25+
26+
<!--
27+
Paste any Go code that you believe to be relevant to the bug
28+
e.g. schema or implementation of CRUD for a given resource or data source
29+
-->
30+
```go
31+
...
32+
```
33+
34+
### Terraform Configuration Files
35+
<!--
36+
Paste the relevant parts of your Terraform configuration between the ``` marks below.
37+
38+
For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file. For security, you can also encrypt the files using our GPG public key.
39+
-->
40+
41+
```hcl
42+
...
43+
```
44+
45+
### Debug Output
46+
<!--
47+
Full debug output can be obtained by running Terraform with the environment variable `TF_LOG=trace`. Please create a GitHub Gist containing the debug output. Please do _not_ paste the debug output in the issue, since debug output is long.
48+
49+
Debug output may contain sensitive information. Please review it before posting publicly, and if you are concerned feel free to encrypt the files using the HashiCorp security public key.
50+
-->
51+
52+
53+
### Expected Behavior
54+
<!--
55+
What should have happened?
56+
-->
57+
58+
### Actual Behavior
59+
<!--
60+
What actually happened?
61+
-->
62+
63+
### Steps to Reproduce
64+
<!--
65+
Please list the full steps required to reproduce the issue, for example:
66+
1. `terraform init`
67+
2. `terraform apply`
68+
-->
69+
70+
### References
71+
<!--
72+
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
73+
74+
- #6017
75+
-->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Provider-related Feedback and Questions
4+
url: https://github.com/terraform-providers
5+
about: Each provider (e.g. AWS, Azure, GCP, Oracle, K8S, etc.) has its own repository, any provider related issues or questions should be directed to appropriate provider repository.
6+
- name: Terraform Language or Workflow Feedback and Questions
7+
url: https://github.com/hashicorp/terraform/issues/new/choose
8+
about: Terraform Core has its own repository, any language (HCL) or workflow related issues or questions should be directed there.
9+
- name: ❓ Plugin SDK Questions
10+
url: https://discuss.hashicorp.com/c/terraform-providers/tf-plugin-sdk
11+
about: Please ask and answer SDK related questions through the Plugin SDK Community Forum.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature or other enhancement.
4+
labels: enhancement
5+
---
6+
7+
### SDK version
8+
<!--
9+
Inspect your go.mod as below to find the version, and paste the result between the ``` marks below.
10+
11+
go mod edit -json | jq '.Require[] | select(.Path=="github.com/hashicorp/terraform-plugin-sdk")'
12+
13+
If you are not running the latest version of the SDK, please try upgrading
14+
because your feature may have already been implemented.
15+
16+
If the command above doesn't yield any results, it means you may not have migrated
17+
to the standalone SDK yet. See https://www.terraform.io/docs/extend/plugin-sdk.html for more.
18+
-->
19+
```
20+
...
21+
```
22+
23+
### Use-cases
24+
<!---
25+
In order to properly evaluate a feature request, it is necessary to understand the use-cases for it.
26+
Please describe below the _end goal_ you are trying to achieve that has led you to request this feature.
27+
Please keep this section focused on the problem and not on the suggested solution. We'll get to that in a moment, below!
28+
-->
29+
30+
### Attempted Solutions
31+
<!---
32+
If you've already tried to solve the problem within SDK's existing features and found a limitation that prevented you from succeeding, please describe it below in as much detail as possible.
33+
34+
Ideally, this would include real HCL configuration that you tried, real Terraform command lines you ran, relevant snippet of code from your provider codebase and what results you got in each case.
35+
36+
Please remove any sensitive information such as passwords before sharing configuration snippets and command lines.
37+
--->
38+
39+
### Proposal
40+
<!---
41+
If you have an idea for a way to address the problem via a change to SDK features, please describe it below.
42+
43+
In this section, it's helpful to include specific examples of how what you are suggesting might look in configuration files, or on the command line, since that allows us to understand the full picture of what you are proposing.
44+
45+
If you're not sure of some details, don't worry! When we evaluate the feature request we may suggest modifications as necessary to work within the design constraints of the SDK and Terraform Core.
46+
-->
47+
48+
### References
49+
<!--
50+
Are there any other GitHub issues, whether open or closed, that are related to the problem you've described above or to the suggested solution? If so, please create a list below that mentions each of them. For example:
51+
52+
- #6017
53+
-->

.hashibot.hcl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ behavior "remove_labels_on_reply" "remove_stale" {
33
only_non_maintainers = true
44
}
55

6+
poll "label_issue_migrater" "provider_migrater" {
7+
schedule = "0 40 * * * *"
8+
new_owner = env.PROVIDERS_OWNER
9+
repo_prefix = "terraform-provider-"
10+
label_prefix = "provider/"
11+
issue_header = <<-EOF
12+
_This issue was originally opened by @${var.user} as ${var.repository}#${var.issue_number}. The original body of the issue is below._
13+
14+
<hr>
15+
16+
EOF
17+
migrated_comment = "This issue has been automatically migrated to ${var.repository}#${var.issue_number} because it looks like an issue with that provider. If you believe this is _not_ an issue with the provider, please reply to ${var.repository}#${var.issue_number}."
18+
}
19+
620
poll "closed_issue_locker" "locker" {
721
schedule = "0 50 1 * * *"
822
closed_for = "720h" # 30 days

CHANGELOG.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,102 @@
1+
# 1.7.0 (February 12, 2020)
2+
3+
FEATURES:
4+
* Binary acceptance test driver ([#262](https://github.com/hashicorp/terraform-plugin-sdk/issues/262))
5+
6+
DEPRECATED:
7+
8+
* helper/schema: `ResourceData.Partial` ([#317](https://github.com/hashicorp/terraform-plugin-sdk/issues/317))
9+
* helper/schema: `ResourceData.SetPartial` ([#317](https://github.com/hashicorp/terraform-plugin-sdk/issues/317))
10+
11+
# 1.6.0 (January 29, 2020)
12+
13+
DEPRECATED:
14+
15+
* helper/validation: `ValidateListUniqueStrings` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
16+
* helper/validation: `SingleIP` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
17+
* helper/validation: `IPRange` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
18+
* helper/validation: `CIDRNetwork` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
19+
* helper/validation: `ValidateJsonString` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
20+
* helper/validation: `ValidateRegexp` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
21+
* helper/validation: `ValidateRFC3339TimeString` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
22+
23+
FEATURES:
24+
25+
* helper/validation: `IntDivisibleBy` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
26+
* helper/validation: `IntNotInSlice` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
27+
* helper/validation: `IsIPv6Address` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
28+
* helper/validation: `IsIPv4Address` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
29+
* helper/validation: `IsCIDR` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
30+
* helper/validation: `IsMACAddress` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
31+
* helper/validation: `IsPortNumber` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
32+
* helper/validation: `IsPortNumberOrZero` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
33+
* helper/validation: `IsDayOfTheWeek` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
34+
* helper/validation: `IsMonth` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
35+
* helper/validation: `IsRFC3339Time` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
36+
* helper/validation: `IsURLWithHTTPS` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
37+
* helper/validation: `IsURLWithHTTPorHTTPS` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
38+
* helper/validation: `IsURLWithScheme` ([#296](https://github.com/hashicorp/terraform-plugin-sdk/issues/296))
39+
* helper/validation: `ListOfUniqueStrings` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
40+
* helper/validation: `IsIPAddress` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
41+
* helper/validation: `IsIPv4Range` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
42+
* helper/validation: `IsCIDRNetwork` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
43+
* helper/validation: `StringIsJSON` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
44+
* helper/validation: `StringIsValidRegExp` ([#301](https://github.com/hashicorp/terraform-plugin-sdk/issues/301))
45+
46+
# 1.5.0 (January 16, 2020)
47+
48+
FEATURES:
49+
50+
* helper/validation: `StringIsEmpty` ([#294](https://github.com/hashicorp/terraform-plugin-sdk/issues/294))
51+
* helper/validation: `StringIsNotEmpty` ([#294](https://github.com/hashicorp/terraform-plugin-sdk/issues/294))
52+
* helper/validation: `StringIsWhiteSpace` ([#294](https://github.com/hashicorp/terraform-plugin-sdk/issues/294))
53+
* helper/validation: `StringIsNotWhiteSpace` ([#294](https://github.com/hashicorp/terraform-plugin-sdk/issues/294))
54+
* helper/validation: `IsUUID` ([#294](https://github.com/hashicorp/terraform-plugin-sdk/issues/294)) ([#297](https://github.com/hashicorp/terraform-plugin-sdk/issues/297))
55+
56+
BUG FIXES:
57+
58+
* schema/ExactlyOneOf: Fix handling of unknowns in complex types ([#287](https://github.com/hashicorp/terraform-plugin-sdk/issues/287))
59+
60+
# 1.4.1 (December 18, 2019)
61+
62+
BUG FIXES:
63+
64+
* helper/resource: Don't crash when dependent test sweeper is missing ([#279](https://github.com/hashicorp/terraform-plugin-sdk/issues/279))
65+
66+
# 1.4.0 (November 20, 2019)
67+
68+
NOTES:
69+
70+
* pruned dead code from internal pkg ([#251](https://github.com/hashicorp/terraform-plugin-sdk/issues/251))
71+
* bumped dependency of `terraform-config-inspect` to remove transitive dependency ([#252](https://github.com/hashicorp/terraform-plugin-sdk/issues/252))
72+
73+
FEATURES:
74+
75+
* helper/validation: Add `FloatAtLeast` and `FloatAtMost` validation functions ([#239](https://github.com/hashicorp/terraform-plugin-sdk/issues/239))
76+
* helper/validation: Add `StringDoesNotMatch` validation function ([#240](https://github.com/hashicorp/terraform-plugin-sdk/issues/240))
77+
* ResourceData: Add `HasChanges` variadic method ([#241](https://github.com/hashicorp/terraform-plugin-sdk/issues/241))
78+
79+
# 1.3.0 (November 06, 2019)
80+
81+
NOTES:
82+
83+
* The internalized version of Terraform that exists for the acceptance test framework has received several cherry picks in an effort to keep it in sync with how Terraform behaves. This process is performed on a best effort basis.
84+
85+
FEATURES:
86+
87+
* helper/validation: Add `StringDoesNotContainAny` validation function ([#212](https://github.com/hashicorp/terraform-plugin-sdk/issues/212))
88+
* helper/schema: Introduce `ExactlyOneOf` and `AtLeastOneOf` validation checks against schema attributes ([#225](https://github.com/hashicorp/terraform-plugin-sdk/issues/225))
89+
90+
BUG FIXES:
91+
92+
* helper/resource: Ensure dependent sweepers are all added. ([#213](https://github.com/hashicorp/terraform-plugin-sdk/issues/213))
93+
94+
# 1.2.0 (October 25, 2019)
95+
96+
FEATURES:
97+
98+
* helper/resource: Introduce sweeper flag `-sweep-allow-failures` to continue other sweepers after failures ([#198](https://github.com/hashicorp/terraform-plugin-sdk/issues/198))
99+
1100
# 1.1.1 (October 03, 2019)
2101

3102
BUG FIXES:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ See [Extending Terraform](https://www.terraform.io/docs/extend/index.html) secti
3131
- (Create, Read, Update, Delete, Import, Validate) a Resource
3232
- Read a Data Source
3333
- tests domain-specific logic via provided acceptance test framework
34-
- providers **Core** updated state of a resource or data source and/or appropriate feedback in the form of validation or other errors
34+
- provides **Core** updated state of a resource or data source and/or appropriate feedback in the form of validation or other errors
3535

3636
## Migrating to SDK v1 from built-in SDK
3737

acctest/helper.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package acctest
2+
3+
import (
4+
"os"
5+
6+
"github.com/hashicorp/terraform-plugin-sdk/plugin"
7+
tftest "github.com/hashicorp/terraform-plugin-test"
8+
)
9+
10+
var TestHelper *tftest.Helper
11+
12+
func UseBinaryDriver(name string, providerFunc plugin.ProviderFunc) {
13+
sourceDir, err := os.Getwd()
14+
if err != nil {
15+
panic(err)
16+
}
17+
18+
if tftest.RunningAsPlugin() {
19+
plugin.Serve(&plugin.ServeOpts{
20+
ProviderFunc: providerFunc,
21+
})
22+
os.Exit(0)
23+
} else {
24+
TestHelper = tftest.AutoInitProviderHelper(name, sourceDir)
25+
}
26+
}

go.mod

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ require (
66
github.com/agext/levenshtein v1.2.2
77
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
88
github.com/apparentlymart/go-cidr v1.0.1
9-
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3
9+
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0
1010
github.com/armon/go-radix v1.0.0 // indirect
11-
github.com/aws/aws-sdk-go v1.19.39 // indirect
11+
github.com/aws/aws-sdk-go v1.25.3 // indirect
1212
github.com/davecgh/go-spew v1.1.1
1313
github.com/go-test/deep v1.0.3
1414
github.com/golang/mock v1.3.1
1515
github.com/golang/protobuf v1.3.2
1616
github.com/golang/snappy v0.0.1
17-
github.com/google/go-cmp v0.3.0
17+
github.com/google/go-cmp v0.3.1
1818
github.com/google/uuid v1.1.1
1919
github.com/hashicorp/errwrap v1.0.0
2020
github.com/hashicorp/go-cleanhttp v0.5.1
@@ -24,12 +24,15 @@ require (
2424
github.com/hashicorp/go-plugin v1.0.1
2525
github.com/hashicorp/go-uuid v1.0.1
2626
github.com/hashicorp/go-version v1.2.0
27-
github.com/hashicorp/hcl2 v0.0.0-20190821123243-0c888d1241f6
28-
github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590
27+
github.com/hashicorp/hcl/v2 v2.0.0
2928
github.com/hashicorp/logutils v1.0.0
30-
github.com/hashicorp/terraform-config-inspect v0.0.0-20190821133035-82a99dc22ef4
29+
github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8
30+
github.com/hashicorp/terraform-json v0.4.0
31+
github.com/hashicorp/terraform-plugin-test v1.2.0
32+
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596
3133
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
3234
github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba
35+
github.com/mattn/go-colorable v0.1.1 // indirect
3336
github.com/mitchellh/cli v1.0.0
3437
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
3538
github.com/mitchellh/copystructure v1.0.0
@@ -40,10 +43,12 @@ require (
4043
github.com/pierrec/lz4 v2.0.5+incompatible
4144
github.com/posener/complete v1.2.1 // indirect
4245
github.com/spf13/afero v1.2.2
43-
github.com/zclconf/go-cty v1.1.0
46+
github.com/vmihailenco/msgpack v4.0.1+incompatible // indirect
47+
github.com/zclconf/go-cty v1.2.1
4448
github.com/zclconf/go-cty-yaml v1.0.1
4549
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
46-
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
50+
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb
51+
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa // indirect
4752
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0
4853
google.golang.org/grpc v1.23.0
4954
)

0 commit comments

Comments
 (0)