keycloak.AttributeImporterIdentityProviderMapper
Explore with Pulumi AI
# keycloak.AttributeImporterIdentityProviderMapper
Allows to create and manage identity provider mappers within Keycloak.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const testMapper = new keycloak.AttributeImporterIdentityProviderMapper("test_mapper", {
realm: "my-realm",
name: "my-mapper",
identityProviderAlias: "idp_alias",
attributeName: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
userAttribute: "lastName",
});
import pulumi
import pulumi_keycloak as keycloak
test_mapper = keycloak.AttributeImporterIdentityProviderMapper("test_mapper",
realm="my-realm",
name="my-mapper",
identity_provider_alias="idp_alias",
attribute_name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
user_attribute="lastName")
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := keycloak.NewAttributeImporterIdentityProviderMapper(ctx, "test_mapper", &keycloak.AttributeImporterIdentityProviderMapperArgs{
Realm: pulumi.String("my-realm"),
Name: pulumi.String("my-mapper"),
IdentityProviderAlias: pulumi.String("idp_alias"),
AttributeName: pulumi.String("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"),
UserAttribute: pulumi.String("lastName"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Keycloak = Pulumi.Keycloak;
return await Deployment.RunAsync(() =>
{
var testMapper = new Keycloak.AttributeImporterIdentityProviderMapper("test_mapper", new()
{
Realm = "my-realm",
Name = "my-mapper",
IdentityProviderAlias = "idp_alias",
AttributeName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
UserAttribute = "lastName",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.keycloak.AttributeImporterIdentityProviderMapper;
import com.pulumi.keycloak.AttributeImporterIdentityProviderMapperArgs;
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 testMapper = new AttributeImporterIdentityProviderMapper("testMapper", AttributeImporterIdentityProviderMapperArgs.builder()
.realm("my-realm")
.name("my-mapper")
.identityProviderAlias("idp_alias")
.attributeName("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname")
.userAttribute("lastName")
.build());
}
}
resources:
testMapper:
type: keycloak:AttributeImporterIdentityProviderMapper
name: test_mapper
properties:
realm: my-realm
name: my-mapper
identityProviderAlias: idp_alias
attributeName: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
userAttribute: lastName
Argument Reference
The following arguments are supported:
realm
- (Required) The name of the realm.name
- (Required) The name of the mapper.identity_provider_alias
- (Required) The alias of the associated identity provider.user_attribute
- (Required) The user attribute name to store SAML attribute.attribute_name
- (Optional) The Name of attribute to search for in assertion. You can leave this blank and specify a friendly name instead.attribute_friendly_name
- (Optional) The friendly name of attribute to search for in assertion. You can leave this blank and specify an attribute name instead.claim_name
- (Optional) The claim name.
Import
Identity provider mapper can be imported using the format {{realm_id}}/{{idp_alias}}/{{idp_mapper_id}}
, where idp_alias
is the identity provider alias, and idp_mapper_id
is the unique ID that Keycloak
assigns to the mapper upon creation. This value can be found in the URI when editing this mapper in the GUI, and is typically a GUID.
Example:
$ terraform import keycloak_attribute_importer_identity_provider_mapper.test_mapper my-realm/my-mapper/f446db98-7133-4e30-b18a-3d28fde7ca1b
Create AttributeImporterIdentityProviderMapper Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AttributeImporterIdentityProviderMapper(name: string, args: AttributeImporterIdentityProviderMapperArgs, opts?: CustomResourceOptions);
@overload
def AttributeImporterIdentityProviderMapper(resource_name: str,
args: AttributeImporterIdentityProviderMapperArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AttributeImporterIdentityProviderMapper(resource_name: str,
opts: Optional[ResourceOptions] = None,
identity_provider_alias: Optional[str] = None,
realm: Optional[str] = None,
user_attribute: Optional[str] = None,
attribute_friendly_name: Optional[str] = None,
attribute_name: Optional[str] = None,
claim_name: Optional[str] = None,
extra_config: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)
func NewAttributeImporterIdentityProviderMapper(ctx *Context, name string, args AttributeImporterIdentityProviderMapperArgs, opts ...ResourceOption) (*AttributeImporterIdentityProviderMapper, error)
public AttributeImporterIdentityProviderMapper(string name, AttributeImporterIdentityProviderMapperArgs args, CustomResourceOptions? opts = null)
public AttributeImporterIdentityProviderMapper(String name, AttributeImporterIdentityProviderMapperArgs args)
public AttributeImporterIdentityProviderMapper(String name, AttributeImporterIdentityProviderMapperArgs args, CustomResourceOptions options)
type: keycloak:AttributeImporterIdentityProviderMapper
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 AttributeImporterIdentityProviderMapperArgs
- 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 AttributeImporterIdentityProviderMapperArgs
- 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 AttributeImporterIdentityProviderMapperArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AttributeImporterIdentityProviderMapperArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AttributeImporterIdentityProviderMapperArgs
- 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 attributeImporterIdentityProviderMapperResource = new Keycloak.AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource", new()
{
IdentityProviderAlias = "string",
Realm = "string",
UserAttribute = "string",
AttributeFriendlyName = "string",
AttributeName = "string",
ClaimName = "string",
ExtraConfig =
{
{ "string", "string" },
},
Name = "string",
});
example, err := keycloak.NewAttributeImporterIdentityProviderMapper(ctx, "attributeImporterIdentityProviderMapperResource", &keycloak.AttributeImporterIdentityProviderMapperArgs{
IdentityProviderAlias: pulumi.String("string"),
Realm: pulumi.String("string"),
UserAttribute: pulumi.String("string"),
AttributeFriendlyName: pulumi.String("string"),
AttributeName: pulumi.String("string"),
ClaimName: pulumi.String("string"),
ExtraConfig: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var attributeImporterIdentityProviderMapperResource = new AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource", AttributeImporterIdentityProviderMapperArgs.builder()
.identityProviderAlias("string")
.realm("string")
.userAttribute("string")
.attributeFriendlyName("string")
.attributeName("string")
.claimName("string")
.extraConfig(Map.of("string", "string"))
.name("string")
.build());
attribute_importer_identity_provider_mapper_resource = keycloak.AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource",
identity_provider_alias="string",
realm="string",
user_attribute="string",
attribute_friendly_name="string",
attribute_name="string",
claim_name="string",
extra_config={
"string": "string",
},
name="string")
const attributeImporterIdentityProviderMapperResource = new keycloak.AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource", {
identityProviderAlias: "string",
realm: "string",
userAttribute: "string",
attributeFriendlyName: "string",
attributeName: "string",
claimName: "string",
extraConfig: {
string: "string",
},
name: "string",
});
type: keycloak:AttributeImporterIdentityProviderMapper
properties:
attributeFriendlyName: string
attributeName: string
claimName: string
extraConfig:
string: string
identityProviderAlias: string
name: string
realm: string
userAttribute: string
AttributeImporterIdentityProviderMapper 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 AttributeImporterIdentityProviderMapper resource accepts the following input properties:
- Identity
Provider stringAlias - IDP Alias
- Realm string
- Realm Name
- User
Attribute string - User Attribute
- Attribute
Friendly stringName - Attribute Friendly Name
- Attribute
Name string - Attribute Name
- Claim
Name string - Claim Name
- Extra
Config Dictionary<string, string> - Name string
- IDP Mapper Name
- Identity
Provider stringAlias - IDP Alias
- Realm string
- Realm Name
- User
Attribute string - User Attribute
- Attribute
Friendly stringName - Attribute Friendly Name
- Attribute
Name string - Attribute Name
- Claim
Name string - Claim Name
- Extra
Config map[string]string - Name string
- IDP Mapper Name
- identity
Provider StringAlias - IDP Alias
- realm String
- Realm Name
- user
Attribute String - User Attribute
- attribute
Friendly StringName - Attribute Friendly Name
- attribute
Name String - Attribute Name
- claim
Name String - Claim Name
- extra
Config Map<String,String> - name String
- IDP Mapper Name
- identity
Provider stringAlias - IDP Alias
- realm string
- Realm Name
- user
Attribute string - User Attribute
- attribute
Friendly stringName - Attribute Friendly Name
- attribute
Name string - Attribute Name
- claim
Name string - Claim Name
- extra
Config {[key: string]: string} - name string
- IDP Mapper Name
- identity_
provider_ stralias - IDP Alias
- realm str
- Realm Name
- user_
attribute str - User Attribute
- attribute_
friendly_ strname - Attribute Friendly Name
- attribute_
name str - Attribute Name
- claim_
name str - Claim Name
- extra_
config Mapping[str, str] - name str
- IDP Mapper Name
- identity
Provider StringAlias - IDP Alias
- realm String
- Realm Name
- user
Attribute String - User Attribute
- attribute
Friendly StringName - Attribute Friendly Name
- attribute
Name String - Attribute Name
- claim
Name String - Claim Name
- extra
Config Map<String> - name String
- IDP Mapper Name
Outputs
All input properties are implicitly available as output properties. Additionally, the AttributeImporterIdentityProviderMapper 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 AttributeImporterIdentityProviderMapper Resource
Get an existing AttributeImporterIdentityProviderMapper 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?: AttributeImporterIdentityProviderMapperState, opts?: CustomResourceOptions): AttributeImporterIdentityProviderMapper
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
attribute_friendly_name: Optional[str] = None,
attribute_name: Optional[str] = None,
claim_name: Optional[str] = None,
extra_config: Optional[Mapping[str, str]] = None,
identity_provider_alias: Optional[str] = None,
name: Optional[str] = None,
realm: Optional[str] = None,
user_attribute: Optional[str] = None) -> AttributeImporterIdentityProviderMapper
func GetAttributeImporterIdentityProviderMapper(ctx *Context, name string, id IDInput, state *AttributeImporterIdentityProviderMapperState, opts ...ResourceOption) (*AttributeImporterIdentityProviderMapper, error)
public static AttributeImporterIdentityProviderMapper Get(string name, Input<string> id, AttributeImporterIdentityProviderMapperState? state, CustomResourceOptions? opts = null)
public static AttributeImporterIdentityProviderMapper get(String name, Output<String> id, AttributeImporterIdentityProviderMapperState 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.
- Attribute
Friendly stringName - Attribute Friendly Name
- Attribute
Name string - Attribute Name
- Claim
Name string - Claim Name
- Extra
Config Dictionary<string, string> - Identity
Provider stringAlias - IDP Alias
- Name string
- IDP Mapper Name
- Realm string
- Realm Name
- User
Attribute string - User Attribute
- Attribute
Friendly stringName - Attribute Friendly Name
- Attribute
Name string - Attribute Name
- Claim
Name string - Claim Name
- Extra
Config map[string]string - Identity
Provider stringAlias - IDP Alias
- Name string
- IDP Mapper Name
- Realm string
- Realm Name
- User
Attribute string - User Attribute
- attribute
Friendly StringName - Attribute Friendly Name
- attribute
Name String - Attribute Name
- claim
Name String - Claim Name
- extra
Config Map<String,String> - identity
Provider StringAlias - IDP Alias
- name String
- IDP Mapper Name
- realm String
- Realm Name
- user
Attribute String - User Attribute
- attribute
Friendly stringName - Attribute Friendly Name
- attribute
Name string - Attribute Name
- claim
Name string - Claim Name
- extra
Config {[key: string]: string} - identity
Provider stringAlias - IDP Alias
- name string
- IDP Mapper Name
- realm string
- Realm Name
- user
Attribute string - User Attribute
- attribute_
friendly_ strname - Attribute Friendly Name
- attribute_
name str - Attribute Name
- claim_
name str - Claim Name
- extra_
config Mapping[str, str] - identity_
provider_ stralias - IDP Alias
- name str
- IDP Mapper Name
- realm str
- Realm Name
- user_
attribute str - User Attribute
- attribute
Friendly StringName - Attribute Friendly Name
- attribute
Name String - Attribute Name
- claim
Name String - Claim Name
- extra
Config Map<String> - identity
Provider StringAlias - IDP Alias
- name String
- IDP Mapper Name
- realm String
- Realm Name
- user
Attribute String - User Attribute
Package Details
- Repository
- Keycloak pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloak
Terraform Provider.