1. Packages
  2. Castai Provider
  3. API Docs
  4. SsoConnection
castai 7.44.0 published on Friday, Mar 21, 2025 by castai

castai.SsoConnection

Explore with Pulumi AI

castai logo
castai 7.44.0 published on Friday, Mar 21, 2025 by castai

    SSO Connection resource allows creating SSO trust relationship with CAST AI.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as castai from "@pulumi/castai";
    
    const sso = new castai.SsoConnection("sso", {
        emailDomain: "aad_connection@test.com",
        aad: {
            clientId: azuread_application.castai_sso.client_id,
            clientSecret: azuread_application_password.castai_sso.value,
            adDomain: azuread_application.castai_sso.publisher_domain,
        },
    });
    
    import pulumi
    import pulumi_castai as castai
    
    sso = castai.SsoConnection("sso",
        email_domain="aad_connection@test.com",
        aad={
            "client_id": azuread_application["castai_sso"]["client_id"],
            "client_secret": azuread_application_password["castai_sso"]["value"],
            "ad_domain": azuread_application["castai_sso"]["publisher_domain"],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/castai/v7/castai"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := castai.NewSsoConnection(ctx, "sso", &castai.SsoConnectionArgs{
    			EmailDomain: pulumi.String("aad_connection@test.com"),
    			Aad: &castai.SsoConnectionAadArgs{
    				ClientId:     pulumi.Any(azuread_application.Castai_sso.Client_id),
    				ClientSecret: pulumi.Any(azuread_application_password.Castai_sso.Value),
    				AdDomain:     pulumi.Any(azuread_application.Castai_sso.Publisher_domain),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Castai = Pulumi.Castai;
    
    return await Deployment.RunAsync(() => 
    {
        var sso = new Castai.SsoConnection("sso", new()
        {
            EmailDomain = "aad_connection@test.com",
            Aad = new Castai.Inputs.SsoConnectionAadArgs
            {
                ClientId = azuread_application.Castai_sso.Client_id,
                ClientSecret = azuread_application_password.Castai_sso.Value,
                AdDomain = azuread_application.Castai_sso.Publisher_domain,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.castai.SsoConnection;
    import com.pulumi.castai.SsoConnectionArgs;
    import com.pulumi.castai.inputs.SsoConnectionAadArgs;
    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 sso = new SsoConnection("sso", SsoConnectionArgs.builder()
                .emailDomain("aad_connection@test.com")
                .aad(SsoConnectionAadArgs.builder()
                    .clientId(azuread_application.castai_sso().client_id())
                    .clientSecret(azuread_application_password.castai_sso().value())
                    .adDomain(azuread_application.castai_sso().publisher_domain())
                    .build())
                .build());
    
        }
    }
    
    resources:
      sso:
        type: castai:SsoConnection
        properties:
          emailDomain: aad_connection@test.com
          aad:
            clientId: ${azuread_application.castai_sso.client_id}
            clientSecret: ${azuread_application_password.castai_sso.value}
            adDomain: ${azuread_application.castai_sso.publisher_domain}
    

    Create SsoConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SsoConnection(name: string, args: SsoConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def SsoConnection(resource_name: str,
                      args: SsoConnectionArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SsoConnection(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      email_domain: Optional[str] = None,
                      aad: Optional[SsoConnectionAadArgs] = None,
                      additional_email_domains: Optional[Sequence[str]] = None,
                      name: Optional[str] = None,
                      okta: Optional[SsoConnectionOktaArgs] = None,
                      sso_connection_id: Optional[str] = None,
                      timeouts: Optional[SsoConnectionTimeoutsArgs] = None)
    func NewSsoConnection(ctx *Context, name string, args SsoConnectionArgs, opts ...ResourceOption) (*SsoConnection, error)
    public SsoConnection(string name, SsoConnectionArgs args, CustomResourceOptions? opts = null)
    public SsoConnection(String name, SsoConnectionArgs args)
    public SsoConnection(String name, SsoConnectionArgs args, CustomResourceOptions options)
    
    type: castai:SsoConnection
    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 SsoConnectionArgs
    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 SsoConnectionArgs
    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 SsoConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SsoConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SsoConnectionArgs
    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 ssoConnectionResource = new Castai.SsoConnection("ssoConnectionResource", new()
    {
        EmailDomain = "string",
        Aad = new Castai.Inputs.SsoConnectionAadArgs
        {
            AdDomain = "string",
            ClientId = "string",
            ClientSecret = "string",
        },
        AdditionalEmailDomains = new[]
        {
            "string",
        },
        Name = "string",
        Okta = new Castai.Inputs.SsoConnectionOktaArgs
        {
            ClientId = "string",
            ClientSecret = "string",
            OktaDomain = "string",
        },
        SsoConnectionId = "string",
        Timeouts = new Castai.Inputs.SsoConnectionTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := castai.NewSsoConnection(ctx, "ssoConnectionResource", &castai.SsoConnectionArgs{
    EmailDomain: pulumi.String("string"),
    Aad: &.SsoConnectionAadArgs{
    AdDomain: pulumi.String("string"),
    ClientId: pulumi.String("string"),
    ClientSecret: pulumi.String("string"),
    },
    AdditionalEmailDomains: pulumi.StringArray{
    pulumi.String("string"),
    },
    Name: pulumi.String("string"),
    Okta: &.SsoConnectionOktaArgs{
    ClientId: pulumi.String("string"),
    ClientSecret: pulumi.String("string"),
    OktaDomain: pulumi.String("string"),
    },
    SsoConnectionId: pulumi.String("string"),
    Timeouts: &.SsoConnectionTimeoutsArgs{
    Create: pulumi.String("string"),
    Delete: pulumi.String("string"),
    Update: pulumi.String("string"),
    },
    })
    
    var ssoConnectionResource = new SsoConnection("ssoConnectionResource", SsoConnectionArgs.builder()
        .emailDomain("string")
        .aad(SsoConnectionAadArgs.builder()
            .adDomain("string")
            .clientId("string")
            .clientSecret("string")
            .build())
        .additionalEmailDomains("string")
        .name("string")
        .okta(SsoConnectionOktaArgs.builder()
            .clientId("string")
            .clientSecret("string")
            .oktaDomain("string")
            .build())
        .ssoConnectionId("string")
        .timeouts(SsoConnectionTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    sso_connection_resource = castai.SsoConnection("ssoConnectionResource",
        email_domain="string",
        aad={
            "ad_domain": "string",
            "client_id": "string",
            "client_secret": "string",
        },
        additional_email_domains=["string"],
        name="string",
        okta={
            "client_id": "string",
            "client_secret": "string",
            "okta_domain": "string",
        },
        sso_connection_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const ssoConnectionResource = new castai.SsoConnection("ssoConnectionResource", {
        emailDomain: "string",
        aad: {
            adDomain: "string",
            clientId: "string",
            clientSecret: "string",
        },
        additionalEmailDomains: ["string"],
        name: "string",
        okta: {
            clientId: "string",
            clientSecret: "string",
            oktaDomain: "string",
        },
        ssoConnectionId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: castai:SsoConnection
    properties:
        aad:
            adDomain: string
            clientId: string
            clientSecret: string
        additionalEmailDomains:
            - string
        emailDomain: string
        name: string
        okta:
            clientId: string
            clientSecret: string
            oktaDomain: string
        ssoConnectionId: string
        timeouts:
            create: string
            delete: string
            update: string
    

    SsoConnection 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 SsoConnection resource accepts the following input properties:

    EmailDomain string
    Email domain of the connection
    Aad SsoConnectionAad
    Azure AD connector
    AdditionalEmailDomains List<string>
    Additional email domains that will be allowed to sign in via the connection
    Name string
    Connection name
    Okta SsoConnectionOkta
    Okta connector
    SsoConnectionId string
    The ID of this resource.
    Timeouts SsoConnectionTimeouts
    EmailDomain string
    Email domain of the connection
    Aad SsoConnectionAadArgs
    Azure AD connector
    AdditionalEmailDomains []string
    Additional email domains that will be allowed to sign in via the connection
    Name string
    Connection name
    Okta SsoConnectionOktaArgs
    Okta connector
    SsoConnectionId string
    The ID of this resource.
    Timeouts SsoConnectionTimeoutsArgs
    emailDomain String
    Email domain of the connection
    aad SsoConnectionAad
    Azure AD connector
    additionalEmailDomains List<String>
    Additional email domains that will be allowed to sign in via the connection
    name String
    Connection name
    okta SsoConnectionOkta
    Okta connector
    ssoConnectionId String
    The ID of this resource.
    timeouts SsoConnectionTimeouts
    emailDomain string
    Email domain of the connection
    aad SsoConnectionAad
    Azure AD connector
    additionalEmailDomains string[]
    Additional email domains that will be allowed to sign in via the connection
    name string
    Connection name
    okta SsoConnectionOkta
    Okta connector
    ssoConnectionId string
    The ID of this resource.
    timeouts SsoConnectionTimeouts
    email_domain str
    Email domain of the connection
    aad SsoConnectionAadArgs
    Azure AD connector
    additional_email_domains Sequence[str]
    Additional email domains that will be allowed to sign in via the connection
    name str
    Connection name
    okta SsoConnectionOktaArgs
    Okta connector
    sso_connection_id str
    The ID of this resource.
    timeouts SsoConnectionTimeoutsArgs
    emailDomain String
    Email domain of the connection
    aad Property Map
    Azure AD connector
    additionalEmailDomains List<String>
    Additional email domains that will be allowed to sign in via the connection
    name String
    Connection name
    okta Property Map
    Okta connector
    ssoConnectionId String
    The ID of this resource.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SsoConnection 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 SsoConnection Resource

    Get an existing SsoConnection 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?: SsoConnectionState, opts?: CustomResourceOptions): SsoConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aad: Optional[SsoConnectionAadArgs] = None,
            additional_email_domains: Optional[Sequence[str]] = None,
            email_domain: Optional[str] = None,
            name: Optional[str] = None,
            okta: Optional[SsoConnectionOktaArgs] = None,
            sso_connection_id: Optional[str] = None,
            timeouts: Optional[SsoConnectionTimeoutsArgs] = None) -> SsoConnection
    func GetSsoConnection(ctx *Context, name string, id IDInput, state *SsoConnectionState, opts ...ResourceOption) (*SsoConnection, error)
    public static SsoConnection Get(string name, Input<string> id, SsoConnectionState? state, CustomResourceOptions? opts = null)
    public static SsoConnection get(String name, Output<String> id, SsoConnectionState state, CustomResourceOptions options)
    resources:  _:    type: castai:SsoConnection    get:      id: ${id}
    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.
    The following state arguments are supported:
    Aad SsoConnectionAad
    Azure AD connector
    AdditionalEmailDomains List<string>
    Additional email domains that will be allowed to sign in via the connection
    EmailDomain string
    Email domain of the connection
    Name string
    Connection name
    Okta SsoConnectionOkta
    Okta connector
    SsoConnectionId string
    The ID of this resource.
    Timeouts SsoConnectionTimeouts
    Aad SsoConnectionAadArgs
    Azure AD connector
    AdditionalEmailDomains []string
    Additional email domains that will be allowed to sign in via the connection
    EmailDomain string
    Email domain of the connection
    Name string
    Connection name
    Okta SsoConnectionOktaArgs
    Okta connector
    SsoConnectionId string
    The ID of this resource.
    Timeouts SsoConnectionTimeoutsArgs
    aad SsoConnectionAad
    Azure AD connector
    additionalEmailDomains List<String>
    Additional email domains that will be allowed to sign in via the connection
    emailDomain String
    Email domain of the connection
    name String
    Connection name
    okta SsoConnectionOkta
    Okta connector
    ssoConnectionId String
    The ID of this resource.
    timeouts SsoConnectionTimeouts
    aad SsoConnectionAad
    Azure AD connector
    additionalEmailDomains string[]
    Additional email domains that will be allowed to sign in via the connection
    emailDomain string
    Email domain of the connection
    name string
    Connection name
    okta SsoConnectionOkta
    Okta connector
    ssoConnectionId string
    The ID of this resource.
    timeouts SsoConnectionTimeouts
    aad SsoConnectionAadArgs
    Azure AD connector
    additional_email_domains Sequence[str]
    Additional email domains that will be allowed to sign in via the connection
    email_domain str
    Email domain of the connection
    name str
    Connection name
    okta SsoConnectionOktaArgs
    Okta connector
    sso_connection_id str
    The ID of this resource.
    timeouts SsoConnectionTimeoutsArgs
    aad Property Map
    Azure AD connector
    additionalEmailDomains List<String>
    Additional email domains that will be allowed to sign in via the connection
    emailDomain String
    Email domain of the connection
    name String
    Connection name
    okta Property Map
    Okta connector
    ssoConnectionId String
    The ID of this resource.
    timeouts Property Map

    Supporting Types

    SsoConnectionAad, SsoConnectionAadArgs

    AdDomain string
    Azure AD domain
    ClientId string
    Azure AD client ID
    ClientSecret string
    Azure AD client secret
    AdDomain string
    Azure AD domain
    ClientId string
    Azure AD client ID
    ClientSecret string
    Azure AD client secret
    adDomain String
    Azure AD domain
    clientId String
    Azure AD client ID
    clientSecret String
    Azure AD client secret
    adDomain string
    Azure AD domain
    clientId string
    Azure AD client ID
    clientSecret string
    Azure AD client secret
    ad_domain str
    Azure AD domain
    client_id str
    Azure AD client ID
    client_secret str
    Azure AD client secret
    adDomain String
    Azure AD domain
    clientId String
    Azure AD client ID
    clientSecret String
    Azure AD client secret

    SsoConnectionOkta, SsoConnectionOktaArgs

    ClientId string
    Okta client ID
    ClientSecret string
    Okta client secret
    OktaDomain string
    Okta domain
    ClientId string
    Okta client ID
    ClientSecret string
    Okta client secret
    OktaDomain string
    Okta domain
    clientId String
    Okta client ID
    clientSecret String
    Okta client secret
    oktaDomain String
    Okta domain
    clientId string
    Okta client ID
    clientSecret string
    Okta client secret
    oktaDomain string
    Okta domain
    client_id str
    Okta client ID
    client_secret str
    Okta client secret
    okta_domain str
    Okta domain
    clientId String
    Okta client ID
    clientSecret String
    Okta client secret
    oktaDomain String
    Okta domain

    SsoConnectionTimeouts, SsoConnectionTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Package Details

    Repository
    castai castai/terraform-provider-castai
    License
    Notes
    This Pulumi package is based on the castai Terraform Provider.
    castai logo
    castai 7.44.0 published on Friday, Mar 21, 2025 by castai