coopnorge / provider-github

Apache License 2.0
23 stars 13 forks source link

How to configure to create repo in an org? #27

Closed patrickleet closed 1 year ago

patrickleet commented 1 year ago

I can't seem to figure out how to create the repo in an org instead of the token owner's account.

Looks like it's a provider config option in TF: https://registry.terraform.io/providers/integrations/github/latest/docs#owner

patrickleet commented 1 year ago

GITHUB_OWNER can be passed in via a ControllerConfig

apiVersion: pkg.crossplane.io/v1alpha1
kind: ControllerConfig
metadata:
  name: crossplane-provider-github
spec:
  env:
  - name: GITHUB_OWNER
    value: the-org-name

apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: crossplane-provider-github
spec:
  package: xpkg.upbound.io/coopnorge/provider-github:v0.3.2
  controllerConfigRef:
    name: crossplane-provider-github