IdentityProvider

Provides a Cognito User Identity Provider resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Cognito.UserPool("example", new Aws.Cognito.UserPoolArgs
        {
            AutoVerifiedAttributes = 
            {
                "email",
            },
        });
        var exampleProvider = new Aws.Cognito.IdentityProvider("exampleProvider", new Aws.Cognito.IdentityProviderArgs
        {
            AttributeMapping = 
            {
                { "email", "email" },
                { "username", "sub" },
            },
            ProviderDetails = 
            {
                { "authorize_scopes", "email" },
                { "client_id", "your client_id" },
                { "client_secret", "your client_secret" },
            },
            ProviderName = "Google",
            ProviderType = "Google",
            UserPoolId = example.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cognito"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := cognito.NewUserPool(ctx, "example", &cognito.UserPoolArgs{
            AutoVerifiedAttributes: pulumi.StringArray{
                pulumi.String("email"),
            },
        })
        if err != nil {
            return err
        }
        _, err = cognito.NewIdentityProvider(ctx, "exampleProvider", &cognito.IdentityProviderArgs{
            AttributeMapping: pulumi.StringMap{
                "email":    pulumi.String("email"),
                "username": pulumi.String("sub"),
            },
            ProviderDetails: pulumi.StringMap{
                "authorize_scopes": pulumi.String("email"),
                "client_id":        pulumi.String("your client_id"),
                "client_secret":    pulumi.String("your client_secret"),
            },
            ProviderName: pulumi.String("Google"),
            ProviderType: pulumi.String("Google"),
            UserPoolId:   example.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.cognito.UserPool("example", auto_verified_attributes=["email"])
example_provider = aws.cognito.IdentityProvider("exampleProvider",
    attribute_mapping={
        "email": "email",
        "username": "sub",
    },
    provider_details={
        "authorize_scopes": "email",
        "client_id": "your client_id",
        "client_secret": "your client_secret",
    },
    provider_name="Google",
    provider_type="Google",
    user_pool_id=example.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.cognito.UserPool("example", {
    autoVerifiedAttributes: ["email"],
});
const exampleProvider = new aws.cognito.IdentityProvider("example_provider", {
    attributeMapping: {
        email: "email",
        username: "sub",
    },
    providerDetails: {
        authorize_scopes: "email",
        client_id: "your client_id",
        client_secret: "your client_secret",
    },
    providerName: "Google",
    providerType: "Google",
    userPoolId: example.id,
});

Create a IdentityProvider Resource

def IdentityProvider(resource_name, opts=None, attribute_mapping=None, idp_identifiers=None, provider_details=None, provider_name=None, provider_type=None, user_pool_id=None, __props__=None);
name string
The unique name of the resource.
args IdentityProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args IdentityProviderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IdentityProviderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

IdentityProvider Resource Properties

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

Inputs

The IdentityProvider resource accepts the following input properties:

ProviderDetails Dictionary<string, string>

The map of identity details, such as access token

ProviderName string

The provider name

ProviderType string

The provider type. See AWS API for valid values

UserPoolId string

The user pool id

AttributeMapping Dictionary<string, string>

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

IdpIdentifiers List<string>

The list of identity providers.

ProviderDetails map[string]string

The map of identity details, such as access token

ProviderName string

The provider name

ProviderType string

The provider type. See AWS API for valid values

UserPoolId string

The user pool id

AttributeMapping map[string]string

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

IdpIdentifiers []string

The list of identity providers.

providerDetails {[key: string]: string}

The map of identity details, such as access token

providerName string

The provider name

providerType string

The provider type. See AWS API for valid values

userPoolId string

The user pool id

attributeMapping {[key: string]: string}

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

idpIdentifiers string[]

The list of identity providers.

provider_details Dict[str, str]

The map of identity details, such as access token

provider_name str

The provider name

provider_type str

The provider type. See AWS API for valid values

user_pool_id str

The user pool id

attribute_mapping Dict[str, str]

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

idp_identifiers List[str]

The list of identity providers.

Outputs

All input properties are implicitly available as output properties. Additionally, the IdentityProvider 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing IdentityProvider Resource

Get an existing IdentityProvider 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?: IdentityProviderState, opts?: CustomResourceOptions): IdentityProvider
static get(resource_name, id, opts=None, attribute_mapping=None, idp_identifiers=None, provider_details=None, provider_name=None, provider_type=None, user_pool_id=None, __props__=None);
func GetIdentityProvider(ctx *Context, name string, id IDInput, state *IdentityProviderState, opts ...ResourceOption) (*IdentityProvider, error)
public static IdentityProvider Get(string name, Input<string> id, IdentityProviderState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AttributeMapping Dictionary<string, string>

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

IdpIdentifiers List<string>

The list of identity providers.

ProviderDetails Dictionary<string, string>

The map of identity details, such as access token

ProviderName string

The provider name

ProviderType string

The provider type. See AWS API for valid values

UserPoolId string

The user pool id

AttributeMapping map[string]string

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

IdpIdentifiers []string

The list of identity providers.

ProviderDetails map[string]string

The map of identity details, such as access token

ProviderName string

The provider name

ProviderType string

The provider type. See AWS API for valid values

UserPoolId string

The user pool id

attributeMapping {[key: string]: string}

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

idpIdentifiers string[]

The list of identity providers.

providerDetails {[key: string]: string}

The map of identity details, such as access token

providerName string

The provider name

providerType string

The provider type. See AWS API for valid values

userPoolId string

The user pool id

attribute_mapping Dict[str, str]

The map of attribute mapping of user pool attributes. AttributeMapping in AWS API documentation

idp_identifiers List[str]

The list of identity providers.

provider_details Dict[str, str]

The map of identity details, such as access token

provider_name str

The provider name

provider_type str

The provider type. See AWS API for valid values

user_pool_id str

The user pool id

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.