Skip to content

Commit

Permalink
feat: migrate to terraform-sdk v2 (#102)
Browse files Browse the repository at this point in the history
* chore: runs v2 upgrade cmd
* chore: moves all files into the internal provider dir
* feat: migrates main and provider
* fix: migrates tests to provider factories
* fix: replace import state passthrough ctx func
* chore: bump tf-sdk to v2.4.4
* fix: acc test by adding stop grace period
* fix: move to validate diag functions
* test: switch from ctx TODO to Background
* feat: add state upgrade for restart_policy and auth

Co-authored-by: Shunsuke Suzuki <[email protected]>
  • Loading branch information
mavogel and suzuki-shunsuke authored Mar 18, 2021
1 parent f774e64 commit ad3e56d
Show file tree
Hide file tree
Showing 55 changed files with 4,884 additions and 3,434 deletions.
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
linters-settings:
errcheck:
# https://github.com/hashicorp/terraform-provider-aws/blob/9c9a116a857fb838a0e7d1cfbf420c2524f0abe1/.golangci.yml#L37-L39
ignore: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,fmt:.*,io:Close


run:
timeout: 10m
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ make test
make testacc_setup

## run a single test
TF_LOG=INFO TF_ACC=1 go test -v ./docker -run ^TestAccDockerImage_data_private_config_file$ -timeout 360s
TF_LOG=INFO TF_ACC=1 go test -v ./internal/provider -run ^TestAccDockerImage_data_private_config_file$ -timeout 360s

## cleanup the local testing resources
make testacc_cleanup
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
PKG_NAME=docker
PKG_NAME=internal/provider

default: build

Expand Down
268 changes: 0 additions & 268 deletions docker/provider.go

This file was deleted.

81 changes: 0 additions & 81 deletions docker/provider_test.go

This file was deleted.

Loading

0 comments on commit ad3e56d

Please sign in to comment.