Skip to content

Commit

Permalink
Cortex-ify project (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilunni authored Dec 8, 2023
1 parent 7f23bb0 commit 616ec6d
Show file tree
Hide file tree
Showing 37 changed files with 41 additions and 45 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/bigcommerce/terraform-provider-cortex
module github.com/cortexapps/terraform-provider-cortex

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/api_error_test.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
7 changes: 2 additions & 5 deletions internal/cortex/catalog_entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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())
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/catalog_entities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/catalog_entity_custom_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/departments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/http_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/resource_definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/scorecards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cortex/teams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_custom_data_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_custom_data_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_custom_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_resource_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/catalog_entity_resource_team_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/department_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/department_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/department_resource_models.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/provider_test.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_definition_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_definition_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_definition_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/scorecard_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/scorecard_data_source_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/scorecard_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/scorecard_resource_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/team_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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,
})

Expand Down

0 comments on commit 616ec6d

Please sign in to comment.