Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config.Provider.RootGroup field docs #242

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/generating-a-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ Now let's test our generated resources.

```bash
NAME READY SYNCED EXTERNAL-NAME AGE
branch.branch.github.jet.crossplane.io/hello-upjet True True hello-crossplane:hello-upjet 89s
branch.branch.github.upbound.io/hello-upjet True True hello-crossplane:hello-upjet 89s

NAME READY SYNCED EXTERNAL-NAME AGE
repository.repository.github.jet.crossplane.io/hello-crossplane True True hello-crossplane 89s
repository.repository.github.upbound.io/hello-crossplane True True hello-crossplane 89s
```

Verify that repo `hello-crossplane` and branch `hello-upjet` created under
Expand Down
4 changes: 2 additions & 2 deletions docs/images/upjet-externalname.excalidraw
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@
"updated": 1640767155602,
"fontSize": 16,
"fontFamily": 3,
"text": "apiVersion: sql.azure.jet.crossplane.io/v1alpha1\nkind: Server\nmetadata:\n name: myserver\n annotations:\n crossplane.io/external-name: myserver\nspec:\n forProvider:\n ...\n resourceGroupNameRef:\n name: myresourcegroup\n providerConfigRef:\n name: example",
"text": "apiVersion: sql.azure.upbound.io/v1alpha1\nkind: Server\nmetadata:\n name: myserver\n annotations:\n crossplane.io/external-name: myserver\nspec:\n forProvider:\n ...\n resourceGroupNameRef:\n name: myresourcegroup\n providerConfigRef:\n name: example",
"baseline": 243,
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "apiVersion: sql.azure.jet.crossplane.io/v1alpha1\nkind: Server\nmetadata:\n name: myserver\n annotations:\n crossplane.io/external-name: myserver\nspec:\n forProvider:\n ...\n resourceGroupNameRef:\n name: myresourcegroup\n providerConfigRef:\n name: example"
"originalText": "apiVersion: sql.azure.upbound.io/v1alpha1\nkind: Server\nmetadata:\n name: myserver\n annotations:\n crossplane.io/external-name: myserver\nspec:\n forProvider:\n ...\n resourceGroupNameRef:\n name: myresourcegroup\n providerConfigRef:\n name: example"
},
{
"id": "5TV10V0jD_m7Ba68DZ2fG",
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ type Provider struct {
TerraformResourcePrefix string

// RootGroup is the root group that all CRDs groups in the provider are based
// on, e.g. "aws.jet.crossplane.io".
// Defaults to "<TerraformResourcePrefix>.jet.crossplane.io".
// on, e.g. "aws.upbound.io".
// Defaults to "<TerraformResourcePrefix>.upbound.io".
RootGroup string

// ShortName is the short name of the provider. Typically, added as a CRD
Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func Run(pc *config.Provider, rootDir string) { // nolint:gocyclo

// Group resources based on their Group and API Versions.
// An example entry in the tree would be:
// ec2.awsjet.crossplane.io -> v1alpha1 -> aws_vpc
// ec2.aws.upbound.io -> v1beta1 -> aws_vpc
resourcesGroups := map[string]map[string]map[string]*config.Resource{}
for name, resource := range pc.Resources {
group := pc.RootGroup
Expand Down
Loading