Keycloak v5.1.0, Mar 14 23
Keycloak v5.1.0, Mar 14 23
keycloak.openid.ClientDefaultScopes
Explore with Pulumi AI
Import
This resource does not support import. Instead of importing, feel free to create this resource as if it did not already exist on the server.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Keycloak = Pulumi.Keycloak;
return await Deployment.RunAsync(() =>
{
var realm = new Keycloak.Realm("realm", new()
{
RealmName = "my-realm",
Enabled = true,
});
var client = new Keycloak.OpenId.Client("client", new()
{
RealmId = realm.Id,
ClientId = "test-client",
AccessType = "CONFIDENTIAL",
});
var clientScope = new Keycloak.OpenId.ClientScope("clientScope", new()
{
RealmId = realm.Id,
});
var clientDefaultScopes = new Keycloak.OpenId.ClientDefaultScopes("clientDefaultScopes", new()
{
RealmId = realm.Id,
ClientId = client.Id,
DefaultScopes = new[]
{
"profile",
"email",
"roles",
"web-origins",
clientScope.Name,
},
});
});
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak/openid"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
Realm: pulumi.String("my-realm"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
client, err := openid.NewClient(ctx, "client", &openid.ClientArgs{
RealmId: realm.ID(),
ClientId: pulumi.String("test-client"),
AccessType: pulumi.String("CONFIDENTIAL"),
})
if err != nil {
return err
}
clientScope, err := openid.NewClientScope(ctx, "clientScope", &openid.ClientScopeArgs{
RealmId: realm.ID(),
})
if err != nil {
return err
}
_, err = openid.NewClientDefaultScopes(ctx, "clientDefaultScopes", &openid.ClientDefaultScopesArgs{
RealmId: realm.ID(),
ClientId: client.ID(),
DefaultScopes: pulumi.StringArray{
pulumi.String("profile"),
pulumi.String("email"),
pulumi.String("roles"),
pulumi.String("web-origins"),
clientScope.Name,
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.keycloak.Realm;
import com.pulumi.keycloak.RealmArgs;
import com.pulumi.keycloak.openid.Client;
import com.pulumi.keycloak.openid.ClientArgs;
import com.pulumi.keycloak.openid.ClientScope;
import com.pulumi.keycloak.openid.ClientScopeArgs;
import com.pulumi.keycloak.openid.ClientDefaultScopes;
import com.pulumi.keycloak.openid.ClientDefaultScopesArgs;
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 realm = new Realm("realm", RealmArgs.builder()
.realm("my-realm")
.enabled(true)
.build());
var client = new Client("client", ClientArgs.builder()
.realmId(realm.id())
.clientId("test-client")
.accessType("CONFIDENTIAL")
.build());
var clientScope = new ClientScope("clientScope", ClientScopeArgs.builder()
.realmId(realm.id())
.build());
var clientDefaultScopes = new ClientDefaultScopes("clientDefaultScopes", ClientDefaultScopesArgs.builder()
.realmId(realm.id())
.clientId(client.id())
.defaultScopes(
"profile",
"email",
"roles",
"web-origins",
clientScope.name())
.build());
}
}
import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.Realm("realm",
realm="my-realm",
enabled=True)
client = keycloak.openid.Client("client",
realm_id=realm.id,
client_id="test-client",
access_type="CONFIDENTIAL")
client_scope = keycloak.openid.ClientScope("clientScope", realm_id=realm.id)
client_default_scopes = keycloak.openid.ClientDefaultScopes("clientDefaultScopes",
realm_id=realm.id,
client_id=client.id,
default_scopes=[
"profile",
"email",
"roles",
"web-origins",
client_scope.name,
])
import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const realm = new keycloak.Realm("realm", {
realm: "my-realm",
enabled: true,
});
const client = new keycloak.openid.Client("client", {
realmId: realm.id,
clientId: "test-client",
accessType: "CONFIDENTIAL",
});
const clientScope = new keycloak.openid.ClientScope("clientScope", {realmId: realm.id});
const clientDefaultScopes = new keycloak.openid.ClientDefaultScopes("clientDefaultScopes", {
realmId: realm.id,
clientId: client.id,
defaultScopes: [
"profile",
"email",
"roles",
"web-origins",
clientScope.name,
],
});
resources:
realm:
type: keycloak:Realm
properties:
realm: my-realm
enabled: true
client:
type: keycloak:openid:Client
properties:
realmId: ${realm.id}
clientId: test-client
accessType: CONFIDENTIAL
clientScope:
type: keycloak:openid:ClientScope
properties:
realmId: ${realm.id}
clientDefaultScopes:
type: keycloak:openid:ClientDefaultScopes
properties:
realmId: ${realm.id}
clientId: ${client.id}
defaultScopes:
- profile
- email
- roles
- web-origins
- ${clientScope.name}
Create ClientDefaultScopes Resource
new ClientDefaultScopes(name: string, args: ClientDefaultScopesArgs, opts?: CustomResourceOptions);
@overload
def ClientDefaultScopes(resource_name: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
default_scopes: Optional[Sequence[str]] = None,
realm_id: Optional[str] = None)
@overload
def ClientDefaultScopes(resource_name: str,
args: ClientDefaultScopesArgs,
opts: Optional[ResourceOptions] = None)
func NewClientDefaultScopes(ctx *Context, name string, args ClientDefaultScopesArgs, opts ...ResourceOption) (*ClientDefaultScopes, error)
public ClientDefaultScopes(string name, ClientDefaultScopesArgs args, CustomResourceOptions? opts = null)
public ClientDefaultScopes(String name, ClientDefaultScopesArgs args)
public ClientDefaultScopes(String name, ClientDefaultScopesArgs args, CustomResourceOptions options)
type: keycloak:openid:ClientDefaultScopes
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClientDefaultScopesArgs
- 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 ClientDefaultScopesArgs
- 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 ClientDefaultScopesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClientDefaultScopesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClientDefaultScopesArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClientDefaultScopes Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ClientDefaultScopes resource accepts the following input properties:
- Client
Id string The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- Default
Scopes List<string> An array of client scope names to attach to this client.
- Realm
Id string The realm this client and scopes exists in.
- Client
Id string The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- Default
Scopes []string An array of client scope names to attach to this client.
- Realm
Id string The realm this client and scopes exists in.
- client
Id String The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default
Scopes List<String> An array of client scope names to attach to this client.
- realm
Id String The realm this client and scopes exists in.
- client
Id string The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default
Scopes string[] An array of client scope names to attach to this client.
- realm
Id string The realm this client and scopes exists in.
- client_
id str The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default_
scopes Sequence[str] An array of client scope names to attach to this client.
- realm_
id str The realm this client and scopes exists in.
- client
Id String The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default
Scopes List<String> An array of client scope names to attach to this client.
- realm
Id String The realm this client and scopes exists in.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClientDefaultScopes 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 ClientDefaultScopes Resource
Get an existing ClientDefaultScopes 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?: ClientDefaultScopesState, opts?: CustomResourceOptions): ClientDefaultScopes
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
client_id: Optional[str] = None,
default_scopes: Optional[Sequence[str]] = None,
realm_id: Optional[str] = None) -> ClientDefaultScopes
func GetClientDefaultScopes(ctx *Context, name string, id IDInput, state *ClientDefaultScopesState, opts ...ResourceOption) (*ClientDefaultScopes, error)
public static ClientDefaultScopes Get(string name, Input<string> id, ClientDefaultScopesState? state, CustomResourceOptions? opts = null)
public static ClientDefaultScopes get(String name, Output<String> id, ClientDefaultScopesState 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.
- Client
Id string The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- Default
Scopes List<string> An array of client scope names to attach to this client.
- Realm
Id string The realm this client and scopes exists in.
- Client
Id string The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- Default
Scopes []string An array of client scope names to attach to this client.
- Realm
Id string The realm this client and scopes exists in.
- client
Id String The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default
Scopes List<String> An array of client scope names to attach to this client.
- realm
Id String The realm this client and scopes exists in.
- client
Id string The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default
Scopes string[] An array of client scope names to attach to this client.
- realm
Id string The realm this client and scopes exists in.
- client_
id str The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default_
scopes Sequence[str] An array of client scope names to attach to this client.
- realm_
id str The realm this client and scopes exists in.
- client
Id String The ID of the client to attach default scopes to. Note that this is the unique ID of the client generated by Keycloak.
- default
Scopes List<String> An array of client scope names to attach to this client.
- realm
Id String The realm this client and scopes exists in.
Package Details
- Repository
- Keycloak pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
keycloak
Terraform Provider.