Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #188 from muvaf/change-mod
Browse files Browse the repository at this point in the history
go.mod: rename go module to adopt new org in github
  • Loading branch information
muvaf authored Jan 3, 2022
2 parents b93ec8a + 9b7dd2f commit 2c54e84
Show file tree
Hide file tree
Showing 40 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/crossplane-contrib/terrajet
local-prefixes: github.com/crossplane/terrajet

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Setup Project

PROJECT_NAME := terrajet
PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME)
PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)

PLATFORMS ?= linux_amd64 linux_arm64
# -include will silently skip missing files, which allows us
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ to generate a Crossplane provider based on an existing Terraform provider.
## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/crossplane-contrib/terrajet/issues).
open an [issue](https://github.com/crossplane/terrajet/issues).

## Contact

Expand Down
16 changes: 8 additions & 8 deletions docs/configuring-a-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ you will want/need to customize late-initialization behaviour. Thus,
Terrajet provides an extensible [late-initialization customization API]
that controls late-initialization behaviour.
The associated resource struct is defined [here](https://github.com/crossplane-contrib/terrajet/blob/c9e21387298d8ed59fcd71c7f753ec401a3383a5/pkg/config/resource.go#L91) as follows:
The associated resource struct is defined [here](https://github.com/crossplane/terrajet/blob/c9e21387298d8ed59fcd71c7f753ec401a3383a5/pkg/config/resource.go#L91) as follows:
```go
// LateInitializer represents configurations that control
// late-initialization behaviour
Expand Down Expand Up @@ -378,32 +378,32 @@ during late-initialization.
[comment]: <> (References)
[Terrajet]: https://github.com/crossplane-contrib/terrajet
[Terrajet]: https://github.com/crossplane/terrajet
[External name]: #external-name
[Cross Resource Referencing]: #cross-resource-referencing
[Additional Sensitive Fields and Custom Connection Details]: #additional-sensitive-fields-and-custom-connection-details
[Late Initialization Behavior]: #late-initialization-behavior
[the external name documentation]: https://crossplane.io/docs/v1.4/concepts/managed-resources.html#external-name
[import section]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key#import
[the struct that holds the External Name configuration]: https://github.com/crossplane-contrib/terrajet/blob/08e5e93f8a93c6628a4302fb520cd4be4b6cab07/pkg/config/resource.go#L50
[the struct that holds the External Name configuration]: https://github.com/crossplane/terrajet/blob/08e5e93f8a93c6628a4302fb520cd4be4b6cab07/pkg/config/resource.go#L50
[aws_vpc]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc
[import section of aws_vpc]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc#import
[arguments list]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc#argument-reference
[example usages]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc#example-usage
[IdentifierFromProvider]: https://github.com/crossplane-contrib/terrajet/blob/08e5e93f8a93c6628a4302fb520cd4be4b6cab07/pkg/config/defaults.go#L43
[IdentifierFromProvider]: https://github.com/crossplane/terrajet/blob/08e5e93f8a93c6628a4302fb520cd4be4b6cab07/pkg/config/defaults.go#L43
[aws_s3_bucket]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket
[import section of s3 bucket]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#import
[bucket]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket
[handle dependencies]: https://crossplane.io/docs/v1.4/concepts/managed-resources.html#dependencies
[user]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key#user
[generate reference resolution methods]: https://github.com/crossplane/crossplane-tools/pull/35
[configuration]: https://github.com/crossplane-contrib/terrajet/blob/874bb6ad5cff9741241fb790a3a5d71166900860/pkg/config/resource.go#L77
[configuration]: https://github.com/crossplane/terrajet/blob/874bb6ad5cff9741241fb790a3a5d71166900860/pkg/config/resource.go#L77
[iam_access_key]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key#argument-reference
[kms key]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume#kms_key_id
[connection details]: https://crossplane.io/docs/v1.4/concepts/managed-resources.html#connection-details
[handle sensitive fields]: https://github.com/crossplane-contrib/terrajet/pull/77
[handle sensitive fields]: https://github.com/crossplane/terrajet/pull/77
[id]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key#id
[secret]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key#secret
[`external.Observe`]: https://github.com/crossplane-contrib/terrajet/blob/874bb6ad5cff9741241fb790a3a5d71166900860/pkg/controller/external.go#L149
[late-initialization customization API]: https://github.com/crossplane-contrib/terrajet/blob/874bb6ad5cff9741241fb790a3a5d71166900860/pkg/resource/lateinit.go#L86
[`external.Observe`]: https://github.com/crossplane/terrajet/blob/874bb6ad5cff9741241fb790a3a5d71166900860/pkg/controller/external.go#L149
[late-initialization customization API]: https://github.com/crossplane/terrajet/blob/874bb6ad5cff9741241fb790a3a5d71166900860/pkg/resource/lateinit.go#L86
[`address_prefix`]: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet#address_prefix
10 changes: 5 additions & 5 deletions docs/generating-a-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ be quite similar for any other Terraform provider.

```go
import (
"github.com/crossplane-contrib/terrajet/pkg/types/conversion"
"github.com/crossplane/terrajet/pkg/types/conversion"
)
func main() {
Expand Down Expand Up @@ -165,7 +165,7 @@ be quite similar for any other Terraform provider.
cat <<EOF > config/repository/config.go
package repository
import "github.com/crossplane-contrib/terrajet/pkg/config"
import "github.com/crossplane/terrajet/pkg/config"
// Configure configures individual resources by adding custom ResourceConfigurators.
func Customize(p *config.Provider) {
Expand All @@ -183,7 +183,7 @@ be quite similar for any other Terraform provider.
cat <<EOF > config/branch/config.go
package branch
import "github.com/crossplane-contrib/terrajet/pkg/config"
import "github.com/crossplane/terrajet/pkg/config"
func Customize(p *config.Provider) {
p.AddResourceConfigurator("github_branch", func(r *config.Resource) {
Expand Down Expand Up @@ -212,8 +212,8 @@ be quite similar for any other Terraform provider.
```diff
import (
tjconfig "github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/types/conversion"
tjconfig "github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/types/conversion"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
tf "github.com/turkenh/terraform-provider-github/v4/github"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/crossplane-contrib/terrajet
module github.com/crossplane/terrajet

go 1.16

Expand All @@ -21,7 +21,7 @@ require (
sigs.k8s.io/controller-runtime v0.9.6
)

// This is a temporary workaround until https://github.com/crossplane-contrib/terrajet/issues/131
// This is a temporary workaround until https://github.com/crossplane/terrajet/issues/131
// is resolved. We basically need this just to be able to import both v1 and v2
// versions of terraform plugin sdk in order to do a schema conversion for
// Terraform providers still using v1 sdk.
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

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

tjname "github.com/crossplane-contrib/terrajet/pkg/types/name"
tjname "github.com/crossplane/terrajet/pkg/types/name"
)

// Commonly used resource configurations.
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
ctrl "sigs.k8s.io/controller-runtime/pkg/manager"

"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/terraform"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/terraform"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
xpfake "github.com/crossplane/crossplane-runtime/pkg/resource/fake"
"github.com/crossplane/crossplane-runtime/pkg/test"

"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/resource/fake"
tjerrors "github.com/crossplane-contrib/terrajet/pkg/terraform/errors"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/resource/fake"
tjerrors "github.com/crossplane/terrajet/pkg/terraform/errors"
)

func TestAPICallbacks_Apply(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/resource/json"
"github.com/crossplane-contrib/terrajet/pkg/terraform"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/resource/json"
"github.com/crossplane/terrajet/pkg/terraform"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/resource/fake"
"github.com/crossplane-contrib/terrajet/pkg/resource/json"
"github.com/crossplane-contrib/terrajet/pkg/terraform"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/resource/fake"
"github.com/crossplane/terrajet/pkg/resource/json"
"github.com/crossplane/terrajet/pkg/terraform"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package controller
import (
"context"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/terraform"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/terraform"
)

// TODO(muvaf): It's a bit weird that the functions return the struct of a
Expand Down
4 changes: 2 additions & 2 deletions pkg/pipeline/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/muvaf/typewriter/pkg/wrapper"
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/pipeline/templates"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/pipeline/templates"
)

// NewControllerGenerator returns a new ControllerGenerator.
Expand Down
6 changes: 3 additions & 3 deletions pkg/pipeline/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"github.com/muvaf/typewriter/pkg/wrapper"
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/pipeline/templates"
tjtypes "github.com/crossplane-contrib/terrajet/pkg/types"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/pipeline/templates"
tjtypes "github.com/crossplane/terrajet/pkg/types"
)

// GenStatement is printed on every generated file.
Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/muvaf/typewriter/pkg/wrapper"
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/pipeline/templates"
"github.com/crossplane/terrajet/pkg/pipeline/templates"
)

// NewRegisterGenerator returns a new RegisterGenerator.
Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"sort"
"strings"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/config"

"github.com/crossplane/crossplane-runtime/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/muvaf/typewriter/pkg/wrapper"
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/pipeline/templates"
"github.com/crossplane/terrajet/pkg/pipeline/templates"
)

// NewSetupGenerator returns a new SetupGenerator.
Expand Down
6 changes: 3 additions & 3 deletions pkg/pipeline/templates/controller.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
"sigs.k8s.io/controller-runtime/pkg/controller"

"github.com/crossplane-contrib/terrajet/pkg/terraform"
tjconfig "github.com/crossplane-contrib/terrajet/pkg/config"
tjcontroller "github.com/crossplane-contrib/terrajet/pkg/controller"
"github.com/crossplane/terrajet/pkg/terraform"
tjconfig "github.com/crossplane/terrajet/pkg/config"
tjcontroller "github.com/crossplane/terrajet/pkg/controller"

{{ .Imports }}
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/pipeline/templates/setup.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"github.com/crossplane/crossplane-runtime/pkg/logging"

tjconfig "github.com/crossplane-contrib/terrajet/pkg/config"
tjcontroller "github.com/crossplane-contrib/terrajet/pkg/controller"
"github.com/crossplane-contrib/terrajet/pkg/terraform"
tjconfig "github.com/crossplane/terrajet/pkg/config"
tjcontroller "github.com/crossplane/terrajet/pkg/controller"
"github.com/crossplane/terrajet/pkg/terraform"

{{ .Imports }}
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/pipeline/templates/terraformed.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package {{ .CRD.APIVersion }}
import (
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/resource/json"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/resource/json"
{{ .Imports }}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/pipeline/terraformed.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"github.com/muvaf/typewriter/pkg/wrapper"
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/pipeline/templates"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/pipeline/templates"
)

// NewTerraformedGenerator returns a new TerraformedGenerator.
Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/muvaf/typewriter/pkg/wrapper"
"github.com/pkg/errors"

"github.com/crossplane-contrib/terrajet/pkg/pipeline/templates"
"github.com/crossplane/terrajet/pkg/pipeline/templates"
)

// NewVersionGenerator returns a new VersionGenerator.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

tferrors "github.com/crossplane-contrib/terrajet/pkg/terraform/errors"
tferrors "github.com/crossplane/terrajet/pkg/terraform/errors"
)

// Condition constants.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/fake/mocks/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/resource/lateinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/config"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/resource/sensitive.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/config"
)

const (
Expand Down Expand Up @@ -60,7 +60,7 @@ func init() {
}

// SecretClient is the client to get sensitive data from kubernetes secrets
//go:generate go run github.com/golang/mock/mockgen -copyright_file ../../hack/boilerplate.txt -destination ./fake/mocks/mock.go -package mocks github.com/crossplane-contrib/terrajet/pkg/resource SecretClient
//go:generate go run github.com/golang/mock/mockgen -copyright_file ../../hack/boilerplate.txt -destination ./fake/mocks/mock.go -package mocks github.com/crossplane/terrajet/pkg/resource SecretClient
type SecretClient interface {
GetSecretData(ctx context.Context, ref *v1.SecretReference) (map[string][]byte, error)
GetSecretValue(ctx context.Context, sel v1.SecretKeySelector) ([]byte, error)
Expand Down Expand Up @@ -131,7 +131,7 @@ func GetSensitiveAttributes(from map[string]interface{}, mapping map[string]stri
// Note(turkenh): k8s secrets uses a strict regex to validate secret
// keys which does not allow having brackets inside. So, we need to
// do a conversion to be able to store as connection secret keys.
// See https://github.com/crossplane-contrib/terrajet/pull/94 for
// See https://github.com/crossplane/terrajet/pull/94 for
// more details.
k, err := fieldPathToSecretKey(fp)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions pkg/resource/sensitive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/resource/fake"
"github.com/crossplane-contrib/terrajet/pkg/resource/fake/mocks"
"github.com/crossplane-contrib/terrajet/pkg/resource/json"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/resource/fake"
"github.com/crossplane/terrajet/pkg/resource/fake/mocks"
"github.com/crossplane/terrajet/pkg/resource/json"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/terraform/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"github.com/pkg/errors"
"github.com/spf13/afero"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/resource"
"github.com/crossplane-contrib/terrajet/pkg/resource/json"
"github.com/crossplane/terrajet/pkg/config"
"github.com/crossplane/terrajet/pkg/resource"
"github.com/crossplane/terrajet/pkg/resource/json"
)

// FileProducerOption allows you to configure FileProducer
Expand Down
Loading

0 comments on commit 2c54e84

Please sign in to comment.