generated from pulumi/pulumi-tf-provider-boilerplate
/
getOrgIdpGithub.go
183 lines (158 loc) · 6.59 KB
/
getOrgIdpGithub.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package zitadel
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel/internal"
)
// Datasource representing a GitHub IdP of the organization.
//
// ## Example Usage
//
// ```go
// 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.LookupOrgIdpGithub(ctx, &zitadel.LookupOrgIdpGithubArgs{
// OrgId: pulumi.StringRef(data.Zitadel_org.Default.Id),
// Id: "123456789012345678",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupOrgIdpGithub(ctx *pulumi.Context, args *LookupOrgIdpGithubArgs, opts ...pulumi.InvokeOption) (*LookupOrgIdpGithubResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupOrgIdpGithubResult
err := ctx.Invoke("zitadel:index/getOrgIdpGithub:getOrgIdpGithub", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getOrgIdpGithub.
type LookupOrgIdpGithubArgs struct {
// The ID of this resource.
Id string `pulumi:"id"`
// ID of the organization
OrgId *string `pulumi:"orgId"`
}
// A collection of values returned by getOrgIdpGithub.
type LookupOrgIdpGithubResult struct {
// client id generated by the identity provider
ClientId string `pulumi:"clientId"`
// client secret generated by the identity provider
ClientSecret string `pulumi:"clientSecret"`
// The ID of this resource.
Id string `pulumi:"id"`
// enabled if a new account in ZITADEL are created automatically on login with an external account
IsAutoCreation bool `pulumi:"isAutoCreation"`
// enabled if a the ZITADEL account fields are updated automatically on each login
IsAutoUpdate bool `pulumi:"isAutoUpdate"`
// enabled if users are able to create a new account in ZITADEL when using an external account
IsCreationAllowed bool `pulumi:"isCreationAllowed"`
// enabled if users are able to link an existing ZITADEL user with an external account
IsLinkingAllowed bool `pulumi:"isLinkingAllowed"`
// Name of the IDP
Name string `pulumi:"name"`
// ID of the organization
OrgId *string `pulumi:"orgId"`
// the scopes requested by ZITADEL during the request on the identity provider
Scopes []string `pulumi:"scopes"`
}
func LookupOrgIdpGithubOutput(ctx *pulumi.Context, args LookupOrgIdpGithubOutputArgs, opts ...pulumi.InvokeOption) LookupOrgIdpGithubResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupOrgIdpGithubResult, error) {
args := v.(LookupOrgIdpGithubArgs)
r, err := LookupOrgIdpGithub(ctx, &args, opts...)
var s LookupOrgIdpGithubResult
if r != nil {
s = *r
}
return s, err
}).(LookupOrgIdpGithubResultOutput)
}
// A collection of arguments for invoking getOrgIdpGithub.
type LookupOrgIdpGithubOutputArgs struct {
// The ID of this resource.
Id pulumi.StringInput `pulumi:"id"`
// ID of the organization
OrgId pulumi.StringPtrInput `pulumi:"orgId"`
}
func (LookupOrgIdpGithubOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupOrgIdpGithubArgs)(nil)).Elem()
}
// A collection of values returned by getOrgIdpGithub.
type LookupOrgIdpGithubResultOutput struct{ *pulumi.OutputState }
func (LookupOrgIdpGithubResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupOrgIdpGithubResult)(nil)).Elem()
}
func (o LookupOrgIdpGithubResultOutput) ToLookupOrgIdpGithubResultOutput() LookupOrgIdpGithubResultOutput {
return o
}
func (o LookupOrgIdpGithubResultOutput) ToLookupOrgIdpGithubResultOutputWithContext(ctx context.Context) LookupOrgIdpGithubResultOutput {
return o
}
func (o LookupOrgIdpGithubResultOutput) ToOutput(ctx context.Context) pulumix.Output[LookupOrgIdpGithubResult] {
return pulumix.Output[LookupOrgIdpGithubResult]{
OutputState: o.OutputState,
}
}
// client id generated by the identity provider
func (o LookupOrgIdpGithubResultOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) string { return v.ClientId }).(pulumi.StringOutput)
}
// client secret generated by the identity provider
func (o LookupOrgIdpGithubResultOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) string { return v.ClientSecret }).(pulumi.StringOutput)
}
// The ID of this resource.
func (o LookupOrgIdpGithubResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) string { return v.Id }).(pulumi.StringOutput)
}
// enabled if a new account in ZITADEL are created automatically on login with an external account
func (o LookupOrgIdpGithubResultOutput) IsAutoCreation() pulumi.BoolOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) bool { return v.IsAutoCreation }).(pulumi.BoolOutput)
}
// enabled if a the ZITADEL account fields are updated automatically on each login
func (o LookupOrgIdpGithubResultOutput) IsAutoUpdate() pulumi.BoolOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) bool { return v.IsAutoUpdate }).(pulumi.BoolOutput)
}
// enabled if users are able to create a new account in ZITADEL when using an external account
func (o LookupOrgIdpGithubResultOutput) IsCreationAllowed() pulumi.BoolOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) bool { return v.IsCreationAllowed }).(pulumi.BoolOutput)
}
// enabled if users are able to link an existing ZITADEL user with an external account
func (o LookupOrgIdpGithubResultOutput) IsLinkingAllowed() pulumi.BoolOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) bool { return v.IsLinkingAllowed }).(pulumi.BoolOutput)
}
// Name of the IDP
func (o LookupOrgIdpGithubResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) string { return v.Name }).(pulumi.StringOutput)
}
// ID of the organization
func (o LookupOrgIdpGithubResultOutput) OrgId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) *string { return v.OrgId }).(pulumi.StringPtrOutput)
}
// the scopes requested by ZITADEL during the request on the identity provider
func (o LookupOrgIdpGithubResultOutput) Scopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupOrgIdpGithubResult) []string { return v.Scopes }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupOrgIdpGithubResultOutput{})
}