rancher2.AuthConfigGithub
Explore with Pulumi AI
Provides a Rancher v2 Auth Config Github resource. This can be used to configure and enable Auth Config Github for Rancher v2 RKE clusters and retrieve their information.
In addition to the built-in local auth, only one external auth config provider can be enabled at a time.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 Auth Config Github
const github = new rancher2.AuthConfigGithub("github", {
clientId: "<GITHUB_CLIENT_ID>",
clientSecret: "<GITHUB_CLIENT_SECRET>",
});
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 Auth Config Github
github = rancher2.AuthConfigGithub("github",
client_id="<GITHUB_CLIENT_ID>",
client_secret="<GITHUB_CLIENT_SECRET>")
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v8/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new rancher2 Auth Config Github
_, err := rancher2.NewAuthConfigGithub(ctx, "github", &rancher2.AuthConfigGithubArgs{
ClientId: pulumi.String("<GITHUB_CLIENT_ID>"),
ClientSecret: pulumi.String("<GITHUB_CLIENT_SECRET>"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new rancher2 Auth Config Github
var github = new Rancher2.AuthConfigGithub("github", new()
{
ClientId = "<GITHUB_CLIENT_ID>",
ClientSecret = "<GITHUB_CLIENT_SECRET>",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.AuthConfigGithub;
import com.pulumi.rancher2.AuthConfigGithubArgs;
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) {
// Create a new rancher2 Auth Config Github
var github = new AuthConfigGithub("github", AuthConfigGithubArgs.builder()
.clientId("<GITHUB_CLIENT_ID>")
.clientSecret("<GITHUB_CLIENT_SECRET>")
.build());
}
}
resources:
# Create a new rancher2 Auth Config Github
github:
type: rancher2:AuthConfigGithub
properties:
clientId: <GITHUB_CLIENT_ID>
clientSecret: <GITHUB_CLIENT_SECRET>
Create AuthConfigGithub Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AuthConfigGithub(name: string, args: AuthConfigGithubArgs, opts?: CustomResourceOptions);
@overload
def AuthConfigGithub(resource_name: str,
args: AuthConfigGithubArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AuthConfigGithub(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
access_mode: Optional[str] = None,
allowed_principal_ids: Optional[Sequence[str]] = None,
annotations: Optional[Mapping[str, str]] = None,
enabled: Optional[bool] = None,
hostname: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
tls: Optional[bool] = None)
func NewAuthConfigGithub(ctx *Context, name string, args AuthConfigGithubArgs, opts ...ResourceOption) (*AuthConfigGithub, error)
public AuthConfigGithub(string name, AuthConfigGithubArgs args, CustomResourceOptions? opts = null)
public AuthConfigGithub(String name, AuthConfigGithubArgs args)
public AuthConfigGithub(String name, AuthConfigGithubArgs args, CustomResourceOptions options)
type: rancher2:AuthConfigGithub
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AuthConfigGithubArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AuthConfigGithubArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AuthConfigGithubArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthConfigGithubArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthConfigGithubArgs
- 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 authConfigGithubResource = new Rancher2.AuthConfigGithub("authConfigGithubResource", new()
{
ClientId = "string",
ClientSecret = "string",
AccessMode = "string",
AllowedPrincipalIds = new[]
{
"string",
},
Annotations =
{
{ "string", "string" },
},
Enabled = false,
Hostname = "string",
Labels =
{
{ "string", "string" },
},
Tls = false,
});
example, err := rancher2.NewAuthConfigGithub(ctx, "authConfigGithubResource", &rancher2.AuthConfigGithubArgs{
ClientId: pulumi.String("string"),
ClientSecret: pulumi.String("string"),
AccessMode: pulumi.String("string"),
AllowedPrincipalIds: pulumi.StringArray{
pulumi.String("string"),
},
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
Hostname: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tls: pulumi.Bool(false),
})
var authConfigGithubResource = new AuthConfigGithub("authConfigGithubResource", AuthConfigGithubArgs.builder()
.clientId("string")
.clientSecret("string")
.accessMode("string")
.allowedPrincipalIds("string")
.annotations(Map.of("string", "string"))
.enabled(false)
.hostname("string")
.labels(Map.of("string", "string"))
.tls(false)
.build());
auth_config_github_resource = rancher2.AuthConfigGithub("authConfigGithubResource",
client_id="string",
client_secret="string",
access_mode="string",
allowed_principal_ids=["string"],
annotations={
"string": "string",
},
enabled=False,
hostname="string",
labels={
"string": "string",
},
tls=False)
const authConfigGithubResource = new rancher2.AuthConfigGithub("authConfigGithubResource", {
clientId: "string",
clientSecret: "string",
accessMode: "string",
allowedPrincipalIds: ["string"],
annotations: {
string: "string",
},
enabled: false,
hostname: "string",
labels: {
string: "string",
},
tls: false,
});
type: rancher2:AuthConfigGithub
properties:
accessMode: string
allowedPrincipalIds:
- string
annotations:
string: string
clientId: string
clientSecret: string
enabled: false
hostname: string
labels:
string: string
tls: false
AuthConfigGithub 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 AuthConfigGithub resource accepts the following input properties:
- Client
Id string - Github auth Client ID (string)
- Client
Secret string - Github auth Client secret (string)
- Access
Mode string - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - Allowed
Principal List<string>Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - Annotations Dictionary<string, string>
- Annotations of the resource (map)
- Enabled bool
- Enable auth config provider. Default
true
(bool) - Hostname string
- Github hostname to connect. Default
github.com
(string) - Labels Dictionary<string, string>
- Labels of the resource (map)
- Tls bool
- Enable TLS connection. Default
true
(bool)
- Client
Id string - Github auth Client ID (string)
- Client
Secret string - Github auth Client secret (string)
- Access
Mode string - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - Allowed
Principal []stringIds - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - Annotations map[string]string
- Annotations of the resource (map)
- Enabled bool
- Enable auth config provider. Default
true
(bool) - Hostname string
- Github hostname to connect. Default
github.com
(string) - Labels map[string]string
- Labels of the resource (map)
- Tls bool
- Enable TLS connection. Default
true
(bool)
- client
Id String - Github auth Client ID (string)
- client
Secret String - Github auth Client secret (string)
- access
Mode String - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed
Principal List<String>Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations Map<String,String>
- Annotations of the resource (map)
- enabled Boolean
- Enable auth config provider. Default
true
(bool) - hostname String
- Github hostname to connect. Default
github.com
(string) - labels Map<String,String>
- Labels of the resource (map)
- tls Boolean
- Enable TLS connection. Default
true
(bool)
- client
Id string - Github auth Client ID (string)
- client
Secret string - Github auth Client secret (string)
- access
Mode string - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed
Principal string[]Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations {[key: string]: string}
- Annotations of the resource (map)
- enabled boolean
- Enable auth config provider. Default
true
(bool) - hostname string
- Github hostname to connect. Default
github.com
(string) - labels {[key: string]: string}
- Labels of the resource (map)
- tls boolean
- Enable TLS connection. Default
true
(bool)
- client_
id str - Github auth Client ID (string)
- client_
secret str - Github auth Client secret (string)
- access_
mode str - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed_
principal_ Sequence[str]ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations Mapping[str, str]
- Annotations of the resource (map)
- enabled bool
- Enable auth config provider. Default
true
(bool) - hostname str
- Github hostname to connect. Default
github.com
(string) - labels Mapping[str, str]
- Labels of the resource (map)
- tls bool
- Enable TLS connection. Default
true
(bool)
- client
Id String - Github auth Client ID (string)
- client
Secret String - Github auth Client secret (string)
- access
Mode String - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed
Principal List<String>Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations Map<String>
- Annotations of the resource (map)
- enabled Boolean
- Enable auth config provider. Default
true
(bool) - hostname String
- Github hostname to connect. Default
github.com
(string) - labels Map<String>
- Labels of the resource (map)
- tls Boolean
- Enable TLS connection. Default
true
(bool)
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthConfigGithub resource produces the following output properties:
Look up Existing AuthConfigGithub Resource
Get an existing AuthConfigGithub 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?: AuthConfigGithubState, opts?: CustomResourceOptions): AuthConfigGithub
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_mode: Optional[str] = None,
allowed_principal_ids: Optional[Sequence[str]] = None,
annotations: Optional[Mapping[str, str]] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
enabled: Optional[bool] = None,
hostname: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
tls: Optional[bool] = None,
type: Optional[str] = None) -> AuthConfigGithub
func GetAuthConfigGithub(ctx *Context, name string, id IDInput, state *AuthConfigGithubState, opts ...ResourceOption) (*AuthConfigGithub, error)
public static AuthConfigGithub Get(string name, Input<string> id, AuthConfigGithubState? state, CustomResourceOptions? opts = null)
public static AuthConfigGithub get(String name, Output<String> id, AuthConfigGithubState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Access
Mode string - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - Allowed
Principal List<string>Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - Annotations Dictionary<string, string>
- Annotations of the resource (map)
- Client
Id string - Github auth Client ID (string)
- Client
Secret string - Github auth Client secret (string)
- Enabled bool
- Enable auth config provider. Default
true
(bool) - Hostname string
- Github hostname to connect. Default
github.com
(string) - Labels Dictionary<string, string>
- Labels of the resource (map)
- Name string
- (Computed) The name of the resource (string)
- Tls bool
- Enable TLS connection. Default
true
(bool) - Type string
- (Computed) The type of the resource (string)
- Access
Mode string - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - Allowed
Principal []stringIds - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - Annotations map[string]string
- Annotations of the resource (map)
- Client
Id string - Github auth Client ID (string)
- Client
Secret string - Github auth Client secret (string)
- Enabled bool
- Enable auth config provider. Default
true
(bool) - Hostname string
- Github hostname to connect. Default
github.com
(string) - Labels map[string]string
- Labels of the resource (map)
- Name string
- (Computed) The name of the resource (string)
- Tls bool
- Enable TLS connection. Default
true
(bool) - Type string
- (Computed) The type of the resource (string)
- access
Mode String - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed
Principal List<String>Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations Map<String,String>
- Annotations of the resource (map)
- client
Id String - Github auth Client ID (string)
- client
Secret String - Github auth Client secret (string)
- enabled Boolean
- Enable auth config provider. Default
true
(bool) - hostname String
- Github hostname to connect. Default
github.com
(string) - labels Map<String,String>
- Labels of the resource (map)
- name String
- (Computed) The name of the resource (string)
- tls Boolean
- Enable TLS connection. Default
true
(bool) - type String
- (Computed) The type of the resource (string)
- access
Mode string - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed
Principal string[]Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations {[key: string]: string}
- Annotations of the resource (map)
- client
Id string - Github auth Client ID (string)
- client
Secret string - Github auth Client secret (string)
- enabled boolean
- Enable auth config provider. Default
true
(bool) - hostname string
- Github hostname to connect. Default
github.com
(string) - labels {[key: string]: string}
- Labels of the resource (map)
- name string
- (Computed) The name of the resource (string)
- tls boolean
- Enable TLS connection. Default
true
(bool) - type string
- (Computed) The type of the resource (string)
- access_
mode str - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed_
principal_ Sequence[str]ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations Mapping[str, str]
- Annotations of the resource (map)
- client_
id str - Github auth Client ID (string)
- client_
secret str - Github auth Client secret (string)
- enabled bool
- Enable auth config provider. Default
true
(bool) - hostname str
- Github hostname to connect. Default
github.com
(string) - labels Mapping[str, str]
- Labels of the resource (map)
- name str
- (Computed) The name of the resource (string)
- tls bool
- Enable TLS connection. Default
true
(bool) - type str
- (Computed) The type of the resource (string)
- access
Mode String - Access mode for auth.
required
,restricted
,unrestricted
are supported. Defaultunrestricted
(string) - allowed
Principal List<String>Ids - Allowed principal ids for auth. Required if
access_mode
isrequired
orrestricted
. Ex:github_user://<USER_ID>
github_team://<GROUP_ID>
github_org://<ORG_ID>
(list) - annotations Map<String>
- Annotations of the resource (map)
- client
Id String - Github auth Client ID (string)
- client
Secret String - Github auth Client secret (string)
- enabled Boolean
- Enable auth config provider. Default
true
(bool) - hostname String
- Github hostname to connect. Default
github.com
(string) - labels Map<String>
- Labels of the resource (map)
- name String
- (Computed) The name of the resource (string)
- tls Boolean
- Enable TLS connection. Default
true
(bool) - type String
- (Computed) The type of the resource (string)
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.