Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mariadb-corporation/terraform-provi…
Browse files Browse the repository at this point in the history
…der-skysql-beta
  • Loading branch information
mariadb-vadymfedorov committed Feb 17, 2023
2 parents 4920c8e + 7a11401 commit d43a0f8
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 6 deletions.
12 changes: 12 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@ default: testacc
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

install-alpha:
go build -o terraform-provider-skysql-alpha .
mv terraform-provider-skysql-alpha $(GOBIN)/terraform-provider-skysql-alpha

install-beta:
go build -o terraform-provider-skysql-beta .
mv terraform-provider-skysql-beta $(GOBIN)/terraform-provider-skysql-beta

install:
go build -o terraform-provider-skysql .
mv terraform-provider-skysql $(GOBIN)/terraform-provider-skysql
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
github.com/hashicorp/terraform-plugin-log v0.7.0
github.com/hashicorp/terraform-plugin-sdk v1.17.2
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
github.com/mariadb-corporation/skysql-api-go v0.0.26
github.com/matryer/resync v0.0.0-20161211202428-d39c09a11215
github.com/stretchr/testify v1.7.2
)
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package provider
import (
"context"
"errors"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/matryer/resync"
"os"

"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/service_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ import (
sdkresource "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"reflect"
"regexp"
"time"
)

const defaultCreateTimeout = 60 * time.Minute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ package provider
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"github.com/stretchr/testify/require"
"net/http"
"os"
"testing"
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/service_resource_privatlink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ package provider
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"github.com/stretchr/testify/require"
"net/http"
"os"
"testing"
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/service_resource_sa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ package provider
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"github.com/stretchr/testify/require"
"net/http"
"os"
"regexp"
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/service_resource_scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ package provider
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"github.com/stretchr/testify/require"
"net/http"
"os"
"testing"
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/service_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ package provider

import (
"encoding/json"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"github.com/stretchr/testify/require"
"log"
"net/http"
"net/http/httptest"
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/service_resource_update_allowlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ package provider
import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"github.com/stretchr/testify/require"
"net/http"
"os"
"testing"
Expand Down
1 change: 1 addition & 0 deletions internal/provider/versions_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql"
"net/url"
)

// Ensure provider defined types fully satisfy framework interfaces
Expand Down
4 changes: 4 additions & 0 deletions internal/skysql/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package skysql
import (
"context"
"errors"
"github.com/go-resty/resty/v2"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/organization"
"github.com/mariadb-corporation/terraform-provider-skysql/internal/skysql/provisioning"
"net/http"
"net/url"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
flag.Parse()

opts := providerserver.ServeOpts{
Address: "registry.terraform.io/mariadb-corporation/skysql-beta",
Address: "registry.terraform.io/mariadb-corporation/skysql",
Debug: debug,
}

Expand Down

0 comments on commit d43a0f8

Please sign in to comment.