diff --git a/go.mod b/go.mod index 5e0800f2..e8b3356f 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/hashicorp/terraform-plugin-log v0.8.0 github.com/hashicorp/terraform-plugin-mux v0.9.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 + github.com/hashicorp/terraform-plugin-testing v1.2.0 github.com/joho/godotenv v1.5.1 github.com/kr/pretty v0.3.1 github.com/mitchellh/mapstructure v1.5.0 diff --git a/go.sum b/go.sum index 5997887c..0456f3b8 100644 --- a/go.sum +++ b/go.sum @@ -119,6 +119,8 @@ github.com/hashicorp/terraform-plugin-mux v0.9.0 h1:a2Xh63cunDB/1GZECrV02cGA74Ah github.com/hashicorp/terraform-plugin-mux v0.9.0/go.mod h1:8NUFbgeMigms7Tma/r2Vgi5Jv5mPv4xcJ05pJtIOhwc= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= +github.com/hashicorp/terraform-plugin-testing v1.2.0 h1:pASRAe6BOZFO4xSGQr9WzitXit0nrQAYDk8ziuRfn9E= +github.com/hashicorp/terraform-plugin-testing v1.2.0/go.mod h1:+8bp3O7xUb1UtBcdknrGdVRIuTw4b62TYSIgXHqlyew= github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index cd3476e1..4325aeb0 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -78,7 +78,7 @@ func configure(version string, p *schema.Provider) func(context.Context, *schema ba_bearer_token := schema.Get("ba_bearer_token").(string) ba_api_uri := schema.Get("ba_api_uri").(string) // set our meta to be a new api.API - // this can be turned into concrete cba_api_uri := schema.Get("ba_api_uri").(string)lients + // this can be turned into concrete clients // by // api.BuildAPI(meta).ClusterClient() // or @@ -94,8 +94,8 @@ func configure(version string, p *schema.Provider) func(context.Context, *schema if ba_bearer_token == "" { diags = append(diags, diagv2.Diagnostic{ Severity: diagv2.Error, - Summary: "Unable to find ba_nearer_token", - Detail: "ba_nearer_token cannot be an empty string"}) + Summary: "Unable to find ba_bearer_token", + Detail: "ba_bearer_token cannot be an empty string"}) return nil, diags } diff --git a/pkg/provider/provider_test.go b/pkg/provider/provider_test.go index 072dd694..813a83be 100644 --- a/pkg/provider/provider_test.go +++ b/pkg/provider/provider_test.go @@ -1,10 +1,10 @@ package provider import ( + "fmt" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "fmt" "os" "testing" ) diff --git a/pkg/provider/resource_proejct.go b/pkg/provider/resource_project.go similarity index 100% rename from pkg/provider/resource_proejct.go rename to pkg/provider/resource_project.go diff --git a/pkg/provider/resource_proejct_test.go b/pkg/provider/resource_project_test.go similarity index 100% rename from pkg/provider/resource_proejct_test.go rename to pkg/provider/resource_project_test.go