Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from SDKv2 => Framework #249

Merged
merged 104 commits into from Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 97 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e302d7b
Configuring muxing (#177)
bendbennett Apr 29, 2022
b8cc057
Migrating uuid resource to framework (#177)
bendbennett Apr 29, 2022
05aabad
Adding keepers into uuid resource schema (#177)
bendbennett May 3, 2022
5668eb6
Incorporating keepers for uuid resource (#177)
bendbennett May 3, 2022
1f6fcd9
Migrating id resource to framework (#177)
bendbennett May 3, 2022
f537277
Removing dead code (#177)
bendbennett May 3, 2022
de8217e
Migrate integer resource to framework (#177)
bendbennett May 4, 2022
bf645bd
Removing dead code and unnecessary type conversions (#177)
bendbennett May 4, 2022
0ea5717
Updating types and adding empty validators and plan modifiers (#177)
bendbennett May 4, 2022
69c2547
Migrating password and string resources from SDKv2 to Framework (#177)
bendbennett May 4, 2022
4c0a6cf
Fixing description (#177)
bendbennett May 4, 2022
ccc05d7
Adding UpgradeState to string resource (#177)
bendbennett May 5, 2022
1085fc6
go fmt (#177)
bendbennett May 5, 2022
9bb7055
Making defaults configurable (#177)
bendbennett May 5, 2022
d34a5f7
Renaming models (#177)
bendbennett May 5, 2022
16c842f
Migrating petname resource from SDKv2 to Framework (#177)
bendbennett May 5, 2022
c9eb988
Removing dead code (#177)
bendbennett May 5, 2022
cce21ae
Migrating shuffle resource from SDKv2 to Framework (#177)
bendbennett May 5, 2022
617a893
Removing SDKv2 provider (#177)
bendbennett May 5, 2022
4e7ae41
Using Protov5ProviderFactories in tests for compatibility with TF >= …
bendbennett May 6, 2022
5daecfe
Fixing docs (#177)
bendbennett May 6, 2022
1f1f133
Removing unneeded configuration check (#177)
bendbennett May 6, 2022
adae7c0
Camel-case config constants (#177)
bendbennett May 6, 2022
8ff422f
Returning interfaces from validators and plan modifiers (#177)
bendbennett May 6, 2022
7b84c58
UpgradeState is being removed as the minimum Terraform version
bendbennett May 6, 2022
1ee779a
Reinstating failing test (#177)
bendbennett May 6, 2022
3accd44
Rename package (#177)
bendbennett May 9, 2022
e338d91
Bumping framework version (#177)
bendbennett May 9, 2022
86ffa14
Skipping caching on golangci-lint action (#177)
bendbennett May 9, 2022
13760fa
Fixing import (#177)
bendbennett May 9, 2022
c540297
Removing unnecessary skip cache (#177)
bendbennett May 10, 2022
085d0f1
Removed unused configured field on provider struct (#177)
bendbennett May 10, 2022
369448e
Remove explicit calling of resp.State.RemoveResource (#177)
bendbennett May 10, 2022
c4f2c25
Adding comments for Read and Update operations (#177)
bendbennett May 10, 2022
5e87dd4
Moving validators to separate file (#177)
bendbennett May 10, 2022
2f0c672
Moving plan modifiers to a separate file (#177)
bendbennett May 10, 2022
b8dd3f3
Improving diagnostics summary and detail messages (#177)
bendbennett May 10, 2022
8f22fea
Removing usage of alias for std lib pkg (#177)
bendbennett May 10, 2022
cd576f2
Formatting imports (#177)
bendbennett May 10, 2022
c625a90
Fixing potentially unsafe type assertions (#177)
bendbennett May 10, 2022
a0daa23
Fixing test (#177)
bendbennett May 10, 2022
5072680
Bumping terraform-plugin-go v0.9.1 (#177)
bendbennett May 12, 2022
c1e1583
Removing muxing (#177)
bendbennett May 12, 2022
8b352f2
Bumping mod versions (#177)
bendbennett May 12, 2022
ff031c3
Removing muxing from tests (#177)
bendbennett May 12, 2022
6daa0cc
Removing 0.12 - 0.14 from tests (#177)
bendbennett May 12, 2022
fa824dc
Remove testing of TF v0.15 from test matrix for CI (#177)
bendbennett May 13, 2022
0801515
Adding UpgradeState for random password bcrypt_hash field
bendbennett May 13, 2022
abee8d5
Removing unused func
bendbennett May 13, 2022
56fe464
Adding suggestion to use terraform state show
bendbennett May 16, 2022
28233d0
Refactoring to use appropriate schema version name
bendbennett May 16, 2022
7a60d4e
Inlining config
bendbennett May 16, 2022
8346193
Fixing StateUpgrader
bendbennett May 17, 2022
186e0fe
Adding tests for StateUpgrader
bendbennett May 17, 2022
709a046
Switching to using StateUpgrader with PriorSchema
bendbennett May 19, 2022
3ca20b0
Merge pull request #255 from hashicorp/add_hash_to_random_password_fr…
bendbennett May 19, 2022
76d329e
Adding error context (#177)
bendbennett May 19, 2022
3cc8c44
Merge branch 'main' into bendbennett/issues-177
bendbennett May 20, 2022
278e511
Merge branch 'bendbennett/issues-177' of github.com:hashicorp/terrafo…
bendbennett May 20, 2022
6c0c143
Replacing ValidateConfig with AttributeValidator (#177)
bendbennett May 20, 2022
666c583
Adding test for IsAtLeastSumOf (#177)
bendbennett May 20, 2022
df3cd78
Refactoring validators (#177)
bendbennett May 22, 2022
59938bd
Checking req.AttribConfig type in validator (#177)
bendbennett May 23, 2022
ebc35b4
Checking req.AttribConfig type in int at least validator (#177)
bendbennett May 23, 2022
abff169
Refactoring default plan modifier (#177)
bendbennett May 26, 2022
353aae7
Refactoring validators and tests (#177)
bendbennett May 26, 2022
09450f2
Modifying state upgrader for V0 to V2
bendbennett May 27, 2022
522bef8
Adding state upgrader for V1 to V2
bendbennett May 27, 2022
5131e5e
Merge main (#177)
bendbennett Jun 8, 2022
95fdaf0
Reinstating test (#177)
bendbennett Jun 8, 2022
d737c19
Adding deprecation message to number and adding numeric attribute to …
bendbennett Jun 8, 2022
f38518a
Adding numeric to string model (#177)
bendbennett Jun 8, 2022
55ec3ef
Adding plan modifier for handling keeping number and numeric in-sync …
bendbennett Jun 8, 2022
af1d309
Altering plan modifiers used by random_string (#177)
bendbennett Jun 8, 2022
a5b86bf
Fix random_string import
bendbennett Jun 8, 2022
01fe789
Adding state upgrader to string (#177)
bendbennett Jun 9, 2022
cdc7b5a
Extracting full password schema to individual functions (#177)
bendbennett Jun 9, 2022
7b45bdc
Extracting full string schema to individual functions (#177)
bendbennett Jun 9, 2022
20533f1
Renaming password state upgrade functions (#177)
bendbennett Jun 9, 2022
5cf02df
Separating out state upgrade tests (#177)
bendbennett Jun 9, 2022
da82249
Lint (#177)
bendbennett Jun 9, 2022
6eb39fa
Refactoring tests to use helper functions (#177)
bendbennett Jun 13, 2022
74ec49f
Refactoring tests to use helper functions (#177)
bendbennett Jun 13, 2022
561a325
Refactoring tests to use helper functions (#177)
bendbennett Jun 13, 2022
a1aaabf
Using modified version of RequiresReplace (#177)
bendbennett Jun 16, 2022
1877941
Merge main (#177)
bendbennett Jun 16, 2022
01a1558
Using terraform-plugin-framework-validators (#177)
bendbennett Jun 16, 2022
1251d07
Fixing test (#177)
bendbennett Jun 16, 2022
818a27b
Porting setting default values during import password and string (#177)
bendbennett Jun 23, 2022
643151b
Removing deprecated number attribute (#177)
bendbennett Jun 24, 2022
8a35a9e
Updating CHANGELOG.md (#177)
bendbennett Jun 24, 2022
872d90e
Merge branch 'main' into bendbennett/issues-177
bendbennett Jun 24, 2022
aaeab93
Updating CHANGELOG.md (#177)
bendbennett Jun 24, 2022
d12f1ad
Updating docs (#177)
bendbennett Jun 24, 2022
f888917
Refactoring (#177)
bendbennett Jun 27, 2022
f29402f
Adding acceptance tests to verify upgrading to framework does not tri…
bendbennett Jun 27, 2022
6c94c96
Renaming files (#177)
bendbennett Jun 27, 2022
c75de56
Adding support for debug flag (#177)
bendbennett Jun 28, 2022
8565799
Bumping protocol version (#177)
bendbennett Jun 28, 2022
81c6699
Merge remote-tracking branch 'origin/main' into bendbennett/issues-177
bendbennett Jun 29, 2022
6272933
Refactoring (#177)
bendbennett Jun 30, 2022
20d678f
Merge remote-tracking branch 'origin/main' into bendbennett/issues-177
bendbennett Jun 30, 2022
a53a450
Updating tests to use NewProtocol6WithError (#177)
bendbennett Jun 30, 2022
dd331c5
Updates following code review (#177)
bendbennett Jul 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -59,10 +59,6 @@ jobs:
- windows-latest
- ubuntu-latest
terraform:
- '0.12.*'
- '0.13.*'
- '0.14.*'
- '0.15.*'
- '1.0.*'
- '1.1.*'
- '1.2.*'
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,16 @@
## 4.0.0-rc.1 (unreleased)

NOTES:

* Provider has been re-written using the new [`terraform-plugin-framework`](https://www.terraform.io/plugin/framework) ([#177](https://github.com/hashicorp/terraform-provider-random/pull/177)).

BREAKING CHANGES:

* [Terraform `>=1.0`](https://www.terraform.io/language/upgrade-guides/1-0) is now required to use this provider.

* resource/random_password: Deprecated attribute `number` has been removed ([266](https://github.com/hashicorp/terraform-provider-random/issues/266)).
* resource/random_string: Deprecated attribute `number` has been removed ([266](https://github.com/hashicorp/terraform-provider-random/issues/266)).

## 3.3.2 (June 23, 2022)

BUG FIXES:
Expand Down
1 change: 0 additions & 1 deletion docs/resources/password.md
Expand Up @@ -45,7 +45,6 @@ resource "aws_db_instance" "example" {
- `min_numeric` (Number) Minimum number of numeric characters in the result. Default value is `0`.
- `min_special` (Number) Minimum number of special characters in the result. Default value is `0`.
- `min_upper` (Number) Minimum number of uppercase alphabet characters in the result. Default value is `0`.
- `number` (Boolean, Deprecated) Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.
- `numeric` (Boolean) Include numeric characters in the result. Default value is `true`.
- `override_special` (String) Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
- `special` (Boolean) Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/pet.md
Expand Up @@ -52,6 +52,6 @@ resource "aws_instance" "server" {

### Read-Only

- `id` (String) The random pet name
- `id` (String) The random pet name.


1 change: 0 additions & 1 deletion docs/resources/string.md
Expand Up @@ -40,7 +40,6 @@ resource "random_string" "random" {
- `min_numeric` (Number) Minimum number of numeric characters in the result. Default value is `0`.
- `min_special` (Number) Minimum number of special characters in the result. Default value is `0`.
- `min_upper` (Number) Minimum number of uppercase alphabet characters in the result. Default value is `0`.
- `number` (Boolean, Deprecated) Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.
- `numeric` (Boolean) Include numeric characters in the result. Default value is `true`.
- `override_special` (String) Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.
- `special` (Boolean) Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`.
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/random_string/import.sh
@@ -1,2 +1,2 @@
# Random String can be imported by specifying the value of the string.
# Random String can be imported by specifying the value of the string.
terraform import random_string.test test
22 changes: 12 additions & 10 deletions go.mod
Expand Up @@ -7,6 +7,10 @@ require (
github.com/google/go-cmp v0.5.8
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/terraform-plugin-docs v0.10.1
github.com/hashicorp/terraform-plugin-framework v0.9.0
github.com/hashicorp/terraform-plugin-framework-validators v0.2.0
github.com/hashicorp/terraform-plugin-go v0.9.1
github.com/hashicorp/terraform-plugin-log v0.4.1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
)
Expand All @@ -27,7 +31,7 @@ require (
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.2.0 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/go-version v1.5.0 // indirect
Expand All @@ -36,11 +40,9 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.16.1 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.9.1 // indirect
github.com/hashicorp/terraform-plugin-log v0.4.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220422185603-6772e136ec01 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
Expand All @@ -51,20 +53,20 @@ require (
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // 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/vmihailenco/tagparser v0.1.2 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3 // indirect
google.golang.org/grpc v1.46.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)