Skip to content

Commit

Permalink
Merge branch 'thamdub:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
a0s authored Jul 13, 2021
2 parents 6d3dd8a + b92d9ae commit b3e6c63
Show file tree
Hide file tree
Showing 2,138 changed files with 207,815 additions and 245,958 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
-
name: Unshallow
run: git fetch --prune --unshallow
Expand All @@ -23,7 +23,7 @@ jobs:
run: make test
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v2.5.0
with:
version: latest
args: release --rm-dist --skip-sign --skip-publish
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4
-
name: Unshallow
run: git fetch --prune --unshallow
Expand All @@ -32,16 +32,14 @@ jobs:
-
name: Import GPG key
id: import_gpg
# TODO: move this to HashiCorp namespace or find alternative that is just simple gpg commands
# see https://github.com/hashicorp/terraform-provider-scaffolding/issues/22
uses: paultyng/ghaction-import-gpg@v2.1.0
uses: hashicorp/ghaction-import-gpg@v2.1.0
env:
# These secrets will need to be configured for the repository:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v2.5.0
with:
version: latest
args: release --rm-dist
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Terraform Provider
Requirements
------------

- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
- [Terraform](https://www.terraform.io/downloads.html) 0.12.x
- [Go](https://golang.org/doc/install) 1.11 (to build the provider plugin)

Building The Provider
Expand Down
2 changes: 1 addition & 1 deletion bitbucket/data_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/http"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

type apiUser struct {
Expand Down
5 changes: 2 additions & 3 deletions bitbucket/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package bitbucket
import (
"net/http"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

// Provider will create the necessary terraform provider to talk to the Bitbucket APIs you should
// specify a USERNAME and PASSWORD
func Provider() terraform.ResourceProvider {
func Provider() *schema.Provider {
return &schema.Provider{
Schema: map[string]*schema.Schema{
"username": {
Expand Down
13 changes: 6 additions & 7 deletions bitbucket/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
package bitbucket

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"os"
"testing"
)

const testRepo string = "test-repo"

var testAccProviders map[string]terraform.ResourceProvider
var testAccProviders map[string]*schema.Provider
var testAccProvider *schema.Provider

func init() {
testAccProvider = Provider().(*schema.Provider)
testAccProviders = map[string]terraform.ResourceProvider{
testAccProvider = Provider()
testAccProviders = map[string]*schema.Provider{
"bitbucket": testAccProvider,
}
}

func TestProvider(t *testing.T) {
if err := Provider().(*schema.Provider).InternalValidate(); err != nil {
if err := Provider().InternalValidate(); err != nil {
t.Fatalf("err: %s", err)
}
}

func TestProvider_impl(t *testing.T) {
var _ terraform.ResourceProvider = Provider()
var _ *schema.Provider = Provider()
}

func testAccPreCheck(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_branch_restriction.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"io/ioutil"
"log"
"net/url"
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_branch_restriction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package bitbucket

import (
"fmt"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"net/url"
"os"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion bitbucket/resource_default_reviewers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

// Reviewer is teh default reviewer you want
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_default_reviewers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func TestAccBitbucketDefaultReviewers_basic(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/helper/validation"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"io/ioutil"
"log"
"net/url"
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func TestAccBitbucketDeployment_basic(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions bitbucket/resource_deployment_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"io/ioutil"
"log"
"net/url"
"strings"
"time"

"github.com/hashicorp/terraform/helper/schema"
)

// DeploymentVariable structure for handling key info
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_deployment_variable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package bitbucket

import (
"fmt"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"os"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion bitbucket/resource_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"log"
"net/url"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

// Hook is the hook you want to add to a bitbucket repository
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
uuid "github.com/satori/go.uuid"
)

Expand Down
2 changes: 1 addition & 1 deletion bitbucket/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"io/ioutil"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"strings"
)

Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func TestAccBitbucketProject_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion bitbucket/resource_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"strings"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

// CloneURL is the internal struct we use to represent urls
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func TestAccBitbucketRepository_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion bitbucket/resource_repository_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"log"
"net/url"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func hashValue(v string) string {
Expand Down
4 changes: 2 additions & 2 deletions bitbucket/resource_repository_variable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)

func TestAccBitbucketRepositoryVariable_basic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/terraform-providers/terraform-provider-bitbucket

require (
github.com/hashicorp/terraform v0.12.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.3
github.com/satori/go.uuid v1.2.0
)

Expand Down
Loading

0 comments on commit b3e6c63

Please sign in to comment.