diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 0c69079..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @bigcommerce/infra-platform diff --git a/Makefile b/Makefile index b607e58..e9c22ce 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ HOSTNAME=github.com -NAMESPACE=bigcommerce +NAMESPACE=cortexapps NAME=cortex BINARY=terraform-provider-${NAME} -VERSION=0.2.2-dev +VERSION=0.2.3-dev -GOOS?=$(shell go tool dist env | grep GOOS | grep -o '".*"' | sed 's/"//g') -GOARCH?=$(shell go tool dist env | grep GOARCH | grep -o '".*"' | sed 's/"//g') +GOOS?=$(shell go env | grep GOOS | cut -d '=' -f2 | tr -d "'") +GOARCH?=$(shell go env | grep GOARCH | cut -d '=' -f2 | tr -d "'") OS_ARCH?=$(GOOS)_$(GOARCH) TF_LOG ?= WARN diff --git a/README.md b/README.md index e70c2a7..c820ffc 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ make testacc This provider uses [Go modules](https://github.com/golang/go/wiki/Modules). Please see the Go documentation for the most up to date information about using Go modules. -To add a new dependency `github.com/bigcommerce/dependency` to your Terraform provider: +To add a new dependency `github.com/author/dependency` to your Terraform provider: ```shell go get github.com/author/dependency diff --git a/go.mod b/go.mod index d7e1f63..ffcdbce 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/bigcommerce/terraform-provider-cortex +module github.com/cortexapps/terraform-provider-cortex go 1.20 diff --git a/internal/cortex/api_error_test.go b/internal/cortex/api_error_test.go index f30b9d2..f0bd056 100644 --- a/internal/cortex/api_error_test.go +++ b/internal/cortex/api_error_test.go @@ -1,7 +1,7 @@ package cortex_test import ( - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/cortex/catalog_entities.go b/internal/cortex/catalog_entities.go index 98fe299..bbfbc1b 100644 --- a/internal/cortex/catalog_entities.go +++ b/internal/cortex/catalog_entities.go @@ -220,7 +220,7 @@ func (c *CatalogEntitiesClient) Upsert(ctx context.Context, req UpsertCatalogEnt } // coerce violations into an error - if len(upsertResponse.Violations) > 0 { + if !upsertResponse.Ok && len(upsertResponse.Violations) > 0 { o := "" for _, v := range upsertResponse.Violations { o += v.String() + "\n" @@ -236,13 +236,10 @@ func (c *CatalogEntitiesClient) Upsert(ctx context.Context, req UpsertCatalogEnt * DELETE /api/v1/catalog/:tag - Delete a catalog entity **********************************************************************************************************************/ -type DeleteCatalogEntityResponse struct{} - func (c *CatalogEntitiesClient) Delete(ctx context.Context, tag string) error { - entityResponse := &DeleteCatalogEntityResponse{} apiError := &ApiError{} - response, err := c.Client().Delete(Route("catalog_entities", tag)).Receive(entityResponse, apiError) + response, err := c.Client().Delete(Route("catalog_entities", tag)).Receive(nil, apiError) if err != nil { return errors.New("could not delete catalog entity: " + err.Error()) } diff --git a/internal/cortex/catalog_entities_test.go b/internal/cortex/catalog_entities_test.go index aa9aa3e..23990fb 100644 --- a/internal/cortex/catalog_entities_test.go +++ b/internal/cortex/catalog_entities_test.go @@ -2,7 +2,7 @@ package cortex_test import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/cortex/catalog_entity_custom_data_test.go b/internal/cortex/catalog_entity_custom_data_test.go index 46786de..f5ed467 100644 --- a/internal/cortex/catalog_entity_custom_data_test.go +++ b/internal/cortex/catalog_entity_custom_data_test.go @@ -2,7 +2,7 @@ package cortex_test import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/cortex/departments_test.go b/internal/cortex/departments_test.go index 90e7bfe..c6b01ba 100644 --- a/internal/cortex/departments_test.go +++ b/internal/cortex/departments_test.go @@ -2,7 +2,7 @@ package cortex_test import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/cortex/http_client_test.go b/internal/cortex/http_client_test.go index c2c04b2..6d41596 100644 --- a/internal/cortex/http_client_test.go +++ b/internal/cortex/http_client_test.go @@ -5,7 +5,7 @@ import ( "context" "encoding/json" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "gopkg.in/yaml.v3" "io" diff --git a/internal/cortex/resource_definitions_test.go b/internal/cortex/resource_definitions_test.go index 584242b..4ecc9cf 100644 --- a/internal/cortex/resource_definitions_test.go +++ b/internal/cortex/resource_definitions_test.go @@ -2,7 +2,7 @@ package cortex_test import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/cortex/scorecards_test.go b/internal/cortex/scorecards_test.go index ec43094..0ed4276 100644 --- a/internal/cortex/scorecards_test.go +++ b/internal/cortex/scorecards_test.go @@ -2,7 +2,7 @@ package cortex_test import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/cortex/teams_test.go b/internal/cortex/teams_test.go index cd38b8e..0b658f0 100644 --- a/internal/cortex/teams_test.go +++ b/internal/cortex/teams_test.go @@ -2,7 +2,7 @@ package cortex_test import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/stretchr/testify/assert" "testing" ) diff --git a/internal/provider/catalog_entity_custom_data_data_source.go b/internal/provider/catalog_entity_custom_data_data_source.go index 437e730..b6d82e4 100644 --- a/internal/provider/catalog_entity_custom_data_data_source.go +++ b/internal/provider/catalog_entity_custom_data_data_source.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" ) diff --git a/internal/provider/catalog_entity_custom_data_data_source_models.go b/internal/provider/catalog_entity_custom_data_data_source_models.go index 26ba642..fbe94d5 100644 --- a/internal/provider/catalog_entity_custom_data_data_source_models.go +++ b/internal/provider/catalog_entity_custom_data_data_source_models.go @@ -2,7 +2,7 @@ package provider import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/internal/provider/catalog_entity_custom_data_models.go b/internal/provider/catalog_entity_custom_data_models.go index 71044ed..4ccb144 100644 --- a/internal/provider/catalog_entity_custom_data_models.go +++ b/internal/provider/catalog_entity_custom_data_models.go @@ -2,7 +2,7 @@ package provider import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/internal/provider/catalog_entity_custom_data_resource.go b/internal/provider/catalog_entity_custom_data_resource.go index 76ff5ac..9b3afc2 100644 --- a/internal/provider/catalog_entity_custom_data_resource.go +++ b/internal/provider/catalog_entity_custom_data_resource.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/internal/provider/catalog_entity_custom_data_test.go b/internal/provider/catalog_entity_custom_data_test.go index 2a761d0..bf4d59d 100644 --- a/internal/provider/catalog_entity_custom_data_test.go +++ b/internal/provider/catalog_entity_custom_data_test.go @@ -2,7 +2,7 @@ package provider_test import ( "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "testing" ) diff --git a/internal/provider/catalog_entity_data_source.go b/internal/provider/catalog_entity_data_source.go index 42ea014..ace463b 100644 --- a/internal/provider/catalog_entity_data_source.go +++ b/internal/provider/catalog_entity_data_source.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/internal/provider/catalog_entity_resource.go b/internal/provider/catalog_entity_resource.go index 056cf72..06bf150 100644 --- a/internal/provider/catalog_entity_resource.go +++ b/internal/provider/catalog_entity_resource.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/path" diff --git a/internal/provider/catalog_entity_resource_models.go b/internal/provider/catalog_entity_resource_models.go index 87bf9ed..3b98fca 100644 --- a/internal/provider/catalog_entity_resource_models.go +++ b/internal/provider/catalog_entity_resource_models.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/internal/provider/catalog_entity_resource_team_models.go b/internal/provider/catalog_entity_resource_team_models.go index d6491e6..479630a 100644 --- a/internal/provider/catalog_entity_resource_team_models.go +++ b/internal/provider/catalog_entity_resource_team_models.go @@ -2,7 +2,7 @@ package provider import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/internal/provider/department_data_source.go b/internal/provider/department_data_source.go index 8d4880a..c98708d 100644 --- a/internal/provider/department_data_source.go +++ b/internal/provider/department_data_source.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" ) diff --git a/internal/provider/department_resource.go b/internal/provider/department_resource.go index f39a111..281a5cd 100644 --- a/internal/provider/department_resource.go +++ b/internal/provider/department_resource.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/internal/provider/department_resource_models.go b/internal/provider/department_resource_models.go index bee3b47..e53cb68 100644 --- a/internal/provider/department_resource_models.go +++ b/internal/provider/department_resource_models.go @@ -1,7 +1,7 @@ package provider import ( - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/internal/provider/provider.go b/internal/provider/provider.go index d8556c7..797839e 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/provider" diff --git a/internal/provider/provider_test.go b/internal/provider/provider_test.go index f8e326c..154df44 100644 --- a/internal/provider/provider_test.go +++ b/internal/provider/provider_test.go @@ -1,7 +1,7 @@ package provider_test import ( - "github.com/bigcommerce/terraform-provider-cortex/internal/provider" + "github.com/cortexapps/terraform-provider-cortex/internal/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "os" diff --git a/internal/provider/resource_definition_data_source.go b/internal/provider/resource_definition_data_source.go index c88d6c2..21fd7e6 100644 --- a/internal/provider/resource_definition_data_source.go +++ b/internal/provider/resource_definition_data_source.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" ) diff --git a/internal/provider/resource_definition_data_source_models.go b/internal/provider/resource_definition_data_source_models.go index 1a2844a..edd4872 100644 --- a/internal/provider/resource_definition_data_source_models.go +++ b/internal/provider/resource_definition_data_source_models.go @@ -2,7 +2,7 @@ package provider import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/internal/provider/resource_definition_models.go b/internal/provider/resource_definition_models.go index aa62c83..b4228f6 100644 --- a/internal/provider/resource_definition_models.go +++ b/internal/provider/resource_definition_models.go @@ -3,7 +3,7 @@ package provider import ( "context" "encoding/json" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/internal/provider/resource_definition_resource.go b/internal/provider/resource_definition_resource.go index 85c343c..4cbfe17 100644 --- a/internal/provider/resource_definition_resource.go +++ b/internal/provider/resource_definition_resource.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/internal/provider/scorecard_data_source.go b/internal/provider/scorecard_data_source.go index 74f8120..3a44ff6 100644 --- a/internal/provider/scorecard_data_source.go +++ b/internal/provider/scorecard_data_source.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" ) diff --git a/internal/provider/scorecard_data_source_models.go b/internal/provider/scorecard_data_source_models.go index 3a08e00..67b53a6 100644 --- a/internal/provider/scorecard_data_source_models.go +++ b/internal/provider/scorecard_data_source_models.go @@ -2,7 +2,7 @@ package provider import ( "context" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) diff --git a/internal/provider/scorecard_resource.go b/internal/provider/scorecard_resource.go index c7a2e77..8a9f009 100644 --- a/internal/provider/scorecard_resource.go +++ b/internal/provider/scorecard_resource.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" diff --git a/internal/provider/scorecard_resource_models.go b/internal/provider/scorecard_resource_models.go index b0fe4a1..0eebcd9 100644 --- a/internal/provider/scorecard_resource_models.go +++ b/internal/provider/scorecard_resource_models.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/internal/provider/team_data_source.go b/internal/provider/team_data_source.go index db1b07b..85fee60 100644 --- a/internal/provider/team_data_source.go +++ b/internal/provider/team_data_source.go @@ -3,7 +3,7 @@ package provider import ( "context" "fmt" - "github.com/bigcommerce/terraform-provider-cortex/internal/cortex" + "github.com/cortexapps/terraform-provider-cortex/internal/cortex" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/types" diff --git a/main.go b/main.go index d82fa9a..7b01d3b 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "flag" "log" - "github.com/bigcommerce/terraform-provider-cortex/internal/provider" + "github.com/cortexapps/terraform-provider-cortex/internal/provider" "github.com/hashicorp/terraform-plugin-framework/providerserver" ) @@ -35,7 +35,7 @@ func main() { flag.Parse() err := providerserver.Serve(context.Background(), provider.New(version), providerserver.ServeOpts{ - Address: "github.com/bigcommerce/cortex", + Address: "github.com/cortexapps/cortex", Debug: debug, })