1. Packages
  2. Zitadel
  3. API Docs
  4. OrgIdpGithub
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

zitadel.OrgIdpGithub

Explore with Pulumi AI

Resource representing a GitHub IdP on the organization.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;

return await Deployment.RunAsync(() => 
{
    var @default = new Zitadel.OrgIdpGithub("default", new()
    {
        OrgId = defaultZitadelOrg.Id,
        Name = "GitHub",
        ClientId = "86a165...",
        ClientSecret = "*****afdbac18",
        Scopes = new[]
        {
            "openid",
            "profile",
            "email",
        },
        IsLinkingAllowed = false,
        IsCreationAllowed = true,
        IsAutoCreation = false,
        IsAutoUpdate = true,
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zitadel.NewOrgIdpGithub(ctx, "default", &zitadel.OrgIdpGithubArgs{
			OrgId:        pulumi.Any(defaultZitadelOrg.Id),
			Name:         pulumi.String("GitHub"),
			ClientId:     pulumi.String("86a165..."),
			ClientSecret: pulumi.String("*****afdbac18"),
			Scopes: pulumi.StringArray{
				pulumi.String("openid"),
				pulumi.String("profile"),
				pulumi.String("email"),
			},
			IsLinkingAllowed:  pulumi.Bool(false),
			IsCreationAllowed: pulumi.Bool(true),
			IsAutoCreation:    pulumi.Bool(false),
			IsAutoUpdate:      pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.OrgIdpGithub;
import com.pulumi.zitadel.OrgIdpGithubArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new OrgIdpGithub("default", OrgIdpGithubArgs.builder()        
            .orgId(defaultZitadelOrg.id())
            .name("GitHub")
            .clientId("86a165...")
            .clientSecret("*****afdbac18")
            .scopes(            
                "openid",
                "profile",
                "email")
            .isLinkingAllowed(false)
            .isCreationAllowed(true)
            .isAutoCreation(false)
            .isAutoUpdate(true)
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";

const _default = new zitadel.OrgIdpGithub("default", {
    orgId: defaultZitadelOrg.id,
    name: "GitHub",
    clientId: "86a165...",
    clientSecret: "*****afdbac18",
    scopes: [
        "openid",
        "profile",
        "email",
    ],
    isLinkingAllowed: false,
    isCreationAllowed: true,
    isAutoCreation: false,
    isAutoUpdate: true,
});
Copy
import pulumi
import pulumiverse_zitadel as zitadel

default = zitadel.OrgIdpGithub("default",
    org_id=default_zitadel_org["id"],
    name="GitHub",
    client_id="86a165...",
    client_secret="*****afdbac18",
    scopes=[
        "openid",
        "profile",
        "email",
    ],
    is_linking_allowed=False,
    is_creation_allowed=True,
    is_auto_creation=False,
    is_auto_update=True)
Copy
resources:
  default:
    type: zitadel:OrgIdpGithub
    properties:
      orgId: ${defaultZitadelOrg.id}
      name: GitHub
      clientId: 86a165...
      clientSecret: '*****afdbac18'
      scopes:
        - openid
        - profile
        - email
      isLinkingAllowed: false
      isCreationAllowed: true
      isAutoCreation: false
      isAutoUpdate: true
Copy

Create OrgIdpGithub Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new OrgIdpGithub(name: string, args: OrgIdpGithubArgs, opts?: CustomResourceOptions);
@overload
def OrgIdpGithub(resource_name: str,
                 args: OrgIdpGithubArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def OrgIdpGithub(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 client_id: Optional[str] = None,
                 client_secret: Optional[str] = None,
                 is_auto_creation: Optional[bool] = None,
                 is_auto_update: Optional[bool] = None,
                 is_creation_allowed: Optional[bool] = None,
                 is_linking_allowed: Optional[bool] = None,
                 name: Optional[str] = None,
                 org_id: Optional[str] = None,
                 scopes: Optional[Sequence[str]] = None)
func NewOrgIdpGithub(ctx *Context, name string, args OrgIdpGithubArgs, opts ...ResourceOption) (*OrgIdpGithub, error)
public OrgIdpGithub(string name, OrgIdpGithubArgs args, CustomResourceOptions? opts = null)
public OrgIdpGithub(String name, OrgIdpGithubArgs args)
public OrgIdpGithub(String name, OrgIdpGithubArgs args, CustomResourceOptions options)
type: zitadel:OrgIdpGithub
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. OrgIdpGithubArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. OrgIdpGithubArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. OrgIdpGithubArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. OrgIdpGithubArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. OrgIdpGithubArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var orgIdpGithubResource = new Zitadel.OrgIdpGithub("orgIdpGithubResource", new()
{
    ClientId = "string",
    ClientSecret = "string",
    IsAutoCreation = false,
    IsAutoUpdate = false,
    IsCreationAllowed = false,
    IsLinkingAllowed = false,
    Name = "string",
    OrgId = "string",
    Scopes = new[]
    {
        "string",
    },
});
Copy
example, err := zitadel.NewOrgIdpGithub(ctx, "orgIdpGithubResource", &zitadel.OrgIdpGithubArgs{
	ClientId:          pulumi.String("string"),
	ClientSecret:      pulumi.String("string"),
	IsAutoCreation:    pulumi.Bool(false),
	IsAutoUpdate:      pulumi.Bool(false),
	IsCreationAllowed: pulumi.Bool(false),
	IsLinkingAllowed:  pulumi.Bool(false),
	Name:              pulumi.String("string"),
	OrgId:             pulumi.String("string"),
	Scopes: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var orgIdpGithubResource = new OrgIdpGithub("orgIdpGithubResource", OrgIdpGithubArgs.builder()
    .clientId("string")
    .clientSecret("string")
    .isAutoCreation(false)
    .isAutoUpdate(false)
    .isCreationAllowed(false)
    .isLinkingAllowed(false)
    .name("string")
    .orgId("string")
    .scopes("string")
    .build());
Copy
org_idp_github_resource = zitadel.OrgIdpGithub("orgIdpGithubResource",
    client_id="string",
    client_secret="string",
    is_auto_creation=False,
    is_auto_update=False,
    is_creation_allowed=False,
    is_linking_allowed=False,
    name="string",
    org_id="string",
    scopes=["string"])
Copy
const orgIdpGithubResource = new zitadel.OrgIdpGithub("orgIdpGithubResource", {
    clientId: "string",
    clientSecret: "string",
    isAutoCreation: false,
    isAutoUpdate: false,
    isCreationAllowed: false,
    isLinkingAllowed: false,
    name: "string",
    orgId: "string",
    scopes: ["string"],
});
Copy
type: zitadel:OrgIdpGithub
properties:
    clientId: string
    clientSecret: string
    isAutoCreation: false
    isAutoUpdate: false
    isCreationAllowed: false
    isLinkingAllowed: false
    name: string
    orgId: string
    scopes:
        - string
Copy

OrgIdpGithub Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The OrgIdpGithub resource accepts the following input properties:

ClientId This property is required. string
client id generated by the identity provider
ClientSecret This property is required. string
client secret generated by the identity provider
IsAutoCreation This property is required. bool
enable if a new account in ZITADEL should be created automatically on login with an external account
IsAutoUpdate This property is required. bool
enable if a the ZITADEL account fields should be updated automatically on each login
IsCreationAllowed This property is required. bool
enable if users should be able to create a new account in ZITADEL when using an external account
IsLinkingAllowed This property is required. bool
enable if users should be able to link an existing ZITADEL user with an external account
Name string
Name of the IDP
OrgId Changes to this property will trigger replacement. string
ID of the organization
Scopes List<string>
the scopes requested by ZITADEL during the request on the identity provider
ClientId This property is required. string
client id generated by the identity provider
ClientSecret This property is required. string
client secret generated by the identity provider
IsAutoCreation This property is required. bool
enable if a new account in ZITADEL should be created automatically on login with an external account
IsAutoUpdate This property is required. bool
enable if a the ZITADEL account fields should be updated automatically on each login
IsCreationAllowed This property is required. bool
enable if users should be able to create a new account in ZITADEL when using an external account
IsLinkingAllowed This property is required. bool
enable if users should be able to link an existing ZITADEL user with an external account
Name string
Name of the IDP
OrgId Changes to this property will trigger replacement. string
ID of the organization
Scopes []string
the scopes requested by ZITADEL during the request on the identity provider
clientId This property is required. String
client id generated by the identity provider
clientSecret This property is required. String
client secret generated by the identity provider
isAutoCreation This property is required. Boolean
enable if a new account in ZITADEL should be created automatically on login with an external account
isAutoUpdate This property is required. Boolean
enable if a the ZITADEL account fields should be updated automatically on each login
isCreationAllowed This property is required. Boolean
enable if users should be able to create a new account in ZITADEL when using an external account
isLinkingAllowed This property is required. Boolean
enable if users should be able to link an existing ZITADEL user with an external account
name String
Name of the IDP
orgId Changes to this property will trigger replacement. String
ID of the organization
scopes List<String>
the scopes requested by ZITADEL during the request on the identity provider
clientId This property is required. string
client id generated by the identity provider
clientSecret This property is required. string
client secret generated by the identity provider
isAutoCreation This property is required. boolean
enable if a new account in ZITADEL should be created automatically on login with an external account
isAutoUpdate This property is required. boolean
enable if a the ZITADEL account fields should be updated automatically on each login
isCreationAllowed This property is required. boolean
enable if users should be able to create a new account in ZITADEL when using an external account
isLinkingAllowed This property is required. boolean
enable if users should be able to link an existing ZITADEL user with an external account
name string
Name of the IDP
orgId Changes to this property will trigger replacement. string
ID of the organization
scopes string[]
the scopes requested by ZITADEL during the request on the identity provider
client_id This property is required. str
client id generated by the identity provider
client_secret This property is required. str
client secret generated by the identity provider
is_auto_creation This property is required. bool
enable if a new account in ZITADEL should be created automatically on login with an external account
is_auto_update This property is required. bool
enable if a the ZITADEL account fields should be updated automatically on each login
is_creation_allowed This property is required. bool
enable if users should be able to create a new account in ZITADEL when using an external account
is_linking_allowed This property is required. bool
enable if users should be able to link an existing ZITADEL user with an external account
name str
Name of the IDP
org_id Changes to this property will trigger replacement. str
ID of the organization
scopes Sequence[str]
the scopes requested by ZITADEL during the request on the identity provider
clientId This property is required. String
client id generated by the identity provider
clientSecret This property is required. String
client secret generated by the identity provider
isAutoCreation This property is required. Boolean
enable if a new account in ZITADEL should be created automatically on login with an external account
isAutoUpdate This property is required. Boolean
enable if a the ZITADEL account fields should be updated automatically on each login
isCreationAllowed This property is required. Boolean
enable if users should be able to create a new account in ZITADEL when using an external account
isLinkingAllowed This property is required. Boolean
enable if users should be able to link an existing ZITADEL user with an external account
name String
Name of the IDP
orgId Changes to this property will trigger replacement. String
ID of the organization
scopes List<String>
the scopes requested by ZITADEL during the request on the identity provider

Outputs

All input properties are implicitly available as output properties. Additionally, the OrgIdpGithub resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing OrgIdpGithub Resource

Get an existing OrgIdpGithub resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: OrgIdpGithubState, opts?: CustomResourceOptions): OrgIdpGithub
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        client_id: Optional[str] = None,
        client_secret: Optional[str] = None,
        is_auto_creation: Optional[bool] = None,
        is_auto_update: Optional[bool] = None,
        is_creation_allowed: Optional[bool] = None,
        is_linking_allowed: Optional[bool] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        scopes: Optional[Sequence[str]] = None) -> OrgIdpGithub
func GetOrgIdpGithub(ctx *Context, name string, id IDInput, state *OrgIdpGithubState, opts ...ResourceOption) (*OrgIdpGithub, error)
public static OrgIdpGithub Get(string name, Input<string> id, OrgIdpGithubState? state, CustomResourceOptions? opts = null)
public static OrgIdpGithub get(String name, Output<String> id, OrgIdpGithubState state, CustomResourceOptions options)
resources:  _:    type: zitadel:OrgIdpGithub    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ClientId string
client id generated by the identity provider
ClientSecret string
client secret generated by the identity provider
IsAutoCreation bool
enable if a new account in ZITADEL should be created automatically on login with an external account
IsAutoUpdate bool
enable if a the ZITADEL account fields should be updated automatically on each login
IsCreationAllowed bool
enable if users should be able to create a new account in ZITADEL when using an external account
IsLinkingAllowed bool
enable if users should be able to link an existing ZITADEL user with an external account
Name string
Name of the IDP
OrgId Changes to this property will trigger replacement. string
ID of the organization
Scopes List<string>
the scopes requested by ZITADEL during the request on the identity provider
ClientId string
client id generated by the identity provider
ClientSecret string
client secret generated by the identity provider
IsAutoCreation bool
enable if a new account in ZITADEL should be created automatically on login with an external account
IsAutoUpdate bool
enable if a the ZITADEL account fields should be updated automatically on each login
IsCreationAllowed bool
enable if users should be able to create a new account in ZITADEL when using an external account
IsLinkingAllowed bool
enable if users should be able to link an existing ZITADEL user with an external account
Name string
Name of the IDP
OrgId Changes to this property will trigger replacement. string
ID of the organization
Scopes []string
the scopes requested by ZITADEL during the request on the identity provider
clientId String
client id generated by the identity provider
clientSecret String
client secret generated by the identity provider
isAutoCreation Boolean
enable if a new account in ZITADEL should be created automatically on login with an external account
isAutoUpdate Boolean
enable if a the ZITADEL account fields should be updated automatically on each login
isCreationAllowed Boolean
enable if users should be able to create a new account in ZITADEL when using an external account
isLinkingAllowed Boolean
enable if users should be able to link an existing ZITADEL user with an external account
name String
Name of the IDP
orgId Changes to this property will trigger replacement. String
ID of the organization
scopes List<String>
the scopes requested by ZITADEL during the request on the identity provider
clientId string
client id generated by the identity provider
clientSecret string
client secret generated by the identity provider
isAutoCreation boolean
enable if a new account in ZITADEL should be created automatically on login with an external account
isAutoUpdate boolean
enable if a the ZITADEL account fields should be updated automatically on each login
isCreationAllowed boolean
enable if users should be able to create a new account in ZITADEL when using an external account
isLinkingAllowed boolean
enable if users should be able to link an existing ZITADEL user with an external account
name string
Name of the IDP
orgId Changes to this property will trigger replacement. string
ID of the organization
scopes string[]
the scopes requested by ZITADEL during the request on the identity provider
client_id str
client id generated by the identity provider
client_secret str
client secret generated by the identity provider
is_auto_creation bool
enable if a new account in ZITADEL should be created automatically on login with an external account
is_auto_update bool
enable if a the ZITADEL account fields should be updated automatically on each login
is_creation_allowed bool
enable if users should be able to create a new account in ZITADEL when using an external account
is_linking_allowed bool
enable if users should be able to link an existing ZITADEL user with an external account
name str
Name of the IDP
org_id Changes to this property will trigger replacement. str
ID of the organization
scopes Sequence[str]
the scopes requested by ZITADEL during the request on the identity provider
clientId String
client id generated by the identity provider
clientSecret String
client secret generated by the identity provider
isAutoCreation Boolean
enable if a new account in ZITADEL should be created automatically on login with an external account
isAutoUpdate Boolean
enable if a the ZITADEL account fields should be updated automatically on each login
isCreationAllowed Boolean
enable if users should be able to create a new account in ZITADEL when using an external account
isLinkingAllowed Boolean
enable if users should be able to link an existing ZITADEL user with an external account
name String
Name of the IDP
orgId Changes to this property will trigger replacement. String
ID of the organization
scopes List<String>
the scopes requested by ZITADEL during the request on the identity provider

Import

bash The resource can be imported using the ID format <id[:org_id][:client_secret]>, e.g.

 $ pulumi import zitadel:index/orgIdpGithub:OrgIdpGithub imported '123456789012345678:123456789012345678:1234567890123456781234567890123456787890'
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
zitadel pulumiverse/pulumi-zitadel
License
Apache-2.0
Notes
This Pulumi package is based on the zitadel Terraform Provider.