1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. SynchronizationSecret
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

azuread.SynchronizationSecret

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

    Manages synchronization secrets associated with a service principal (enterprise application) within Azure Active Directory.

    API Permissions

    The following API permissions are required in order to use this resource.

    When authenticated with a service principal, this resource requires one of the following application roles: Application.ReadWrite.All or Directory.ReadWrite.All

    Example Usage

    Basic example

    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = azuread.getApplicationTemplate({
        displayName: "Azure Databricks SCIM Provisioning Connector",
    });
    const exampleApplication = new azuread.Application("example", {
        displayName: "example",
        templateId: example.then(example => example.templateId),
        featureTags: [{
            enterprise: true,
            gallery: true,
        }],
    });
    const exampleServicePrincipal = new azuread.ServicePrincipal("example", {
        applicationId: exampleApplication.applicationId,
        useExisting: true,
    });
    const exampleSynchronizationSecret = new azuread.SynchronizationSecret("example", {
        servicePrincipalId: exampleServicePrincipal.id,
        credentials: [
            {
                key: "BaseAddress",
                value: "abc",
            },
            {
                key: "SecretToken",
                value: "some-token",
            },
        ],
    });
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.get_application_template(display_name="Azure Databricks SCIM Provisioning Connector")
    example_application = azuread.Application("example",
        display_name="example",
        template_id=example.template_id,
        feature_tags=[azuread.ApplicationFeatureTagArgs(
            enterprise=True,
            gallery=True,
        )])
    example_service_principal = azuread.ServicePrincipal("example",
        application_id=example_application.application_id,
        use_existing=True)
    example_synchronization_secret = azuread.SynchronizationSecret("example",
        service_principal_id=example_service_principal.id,
        credentials=[
            azuread.SynchronizationSecretCredentialArgs(
                key="BaseAddress",
                value="abc",
            ),
            azuread.SynchronizationSecretCredentialArgs(
                key="SecretToken",
                value="some-token",
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuread.GetApplicationTemplate(ctx, &azuread.GetApplicationTemplateArgs{
    			DisplayName: pulumi.StringRef("Azure Databricks SCIM Provisioning Connector"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleApplication, err := azuread.NewApplication(ctx, "example", &azuread.ApplicationArgs{
    			DisplayName: pulumi.String("example"),
    			TemplateId:  pulumi.String(example.TemplateId),
    			FeatureTags: azuread.ApplicationFeatureTagArray{
    				&azuread.ApplicationFeatureTagArgs{
    					Enterprise: pulumi.Bool(true),
    					Gallery:    pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleServicePrincipal, err := azuread.NewServicePrincipal(ctx, "example", &azuread.ServicePrincipalArgs{
    			ApplicationId: exampleApplication.ApplicationId,
    			UseExisting:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewSynchronizationSecret(ctx, "example", &azuread.SynchronizationSecretArgs{
    			ServicePrincipalId: exampleServicePrincipal.ID(),
    			Credentials: azuread.SynchronizationSecretCredentialArray{
    				&azuread.SynchronizationSecretCredentialArgs{
    					Key:   pulumi.String("BaseAddress"),
    					Value: pulumi.String("abc"),
    				},
    				&azuread.SynchronizationSecretCredentialArgs{
    					Key:   pulumi.String("SecretToken"),
    					Value: pulumi.String("some-token"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AzureAD.GetApplicationTemplate.Invoke(new()
        {
            DisplayName = "Azure Databricks SCIM Provisioning Connector",
        });
    
        var exampleApplication = new AzureAD.Application("example", new()
        {
            DisplayName = "example",
            TemplateId = example.Apply(getApplicationTemplateResult => getApplicationTemplateResult.TemplateId),
            FeatureTags = new[]
            {
                new AzureAD.Inputs.ApplicationFeatureTagArgs
                {
                    Enterprise = true,
                    Gallery = true,
                },
            },
        });
    
        var exampleServicePrincipal = new AzureAD.ServicePrincipal("example", new()
        {
            ApplicationId = exampleApplication.ApplicationId,
            UseExisting = true,
        });
    
        var exampleSynchronizationSecret = new AzureAD.SynchronizationSecret("example", new()
        {
            ServicePrincipalId = exampleServicePrincipal.Id,
            Credentials = new[]
            {
                new AzureAD.Inputs.SynchronizationSecretCredentialArgs
                {
                    Key = "BaseAddress",
                    Value = "abc",
                },
                new AzureAD.Inputs.SynchronizationSecretCredentialArgs
                {
                    Key = "SecretToken",
                    Value = "some-token",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuread.AzureadFunctions;
    import com.pulumi.azuread.inputs.GetApplicationTemplateArgs;
    import com.pulumi.azuread.Application;
    import com.pulumi.azuread.ApplicationArgs;
    import com.pulumi.azuread.inputs.ApplicationFeatureTagArgs;
    import com.pulumi.azuread.ServicePrincipal;
    import com.pulumi.azuread.ServicePrincipalArgs;
    import com.pulumi.azuread.SynchronizationSecret;
    import com.pulumi.azuread.SynchronizationSecretArgs;
    import com.pulumi.azuread.inputs.SynchronizationSecretCredentialArgs;
    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) {
            final var example = AzureadFunctions.getApplicationTemplate(GetApplicationTemplateArgs.builder()
                .displayName("Azure Databricks SCIM Provisioning Connector")
                .build());
    
            var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()        
                .displayName("example")
                .templateId(example.applyValue(getApplicationTemplateResult -> getApplicationTemplateResult.templateId()))
                .featureTags(ApplicationFeatureTagArgs.builder()
                    .enterprise(true)
                    .gallery(true)
                    .build())
                .build());
    
            var exampleServicePrincipal = new ServicePrincipal("exampleServicePrincipal", ServicePrincipalArgs.builder()        
                .applicationId(exampleApplication.applicationId())
                .useExisting(true)
                .build());
    
            var exampleSynchronizationSecret = new SynchronizationSecret("exampleSynchronizationSecret", SynchronizationSecretArgs.builder()        
                .servicePrincipalId(exampleServicePrincipal.id())
                .credentials(            
                    SynchronizationSecretCredentialArgs.builder()
                        .key("BaseAddress")
                        .value("abc")
                        .build(),
                    SynchronizationSecretCredentialArgs.builder()
                        .key("SecretToken")
                        .value("some-token")
                        .build())
                .build());
    
        }
    }
    
    resources:
      exampleApplication:
        type: azuread:Application
        name: example
        properties:
          displayName: example
          templateId: ${example.templateId}
          featureTags:
            - enterprise: true
              gallery: true
      exampleServicePrincipal:
        type: azuread:ServicePrincipal
        name: example
        properties:
          applicationId: ${exampleApplication.applicationId}
          useExisting: true
      exampleSynchronizationSecret:
        type: azuread:SynchronizationSecret
        name: example
        properties:
          servicePrincipalId: ${exampleServicePrincipal.id}
          credentials:
            - key: BaseAddress
              value: abc
            - key: SecretToken
              value: some-token
    variables:
      example:
        fn::invoke:
          Function: azuread:getApplicationTemplate
          Arguments:
            displayName: Azure Databricks SCIM Provisioning Connector
    

    Create SynchronizationSecret Resource

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

    Constructor syntax

    new SynchronizationSecret(name: string, args: SynchronizationSecretArgs, opts?: CustomResourceOptions);
    @overload
    def SynchronizationSecret(resource_name: str,
                              args: SynchronizationSecretArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def SynchronizationSecret(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              service_principal_id: Optional[str] = None,
                              credentials: Optional[Sequence[SynchronizationSecretCredentialArgs]] = None)
    func NewSynchronizationSecret(ctx *Context, name string, args SynchronizationSecretArgs, opts ...ResourceOption) (*SynchronizationSecret, error)
    public SynchronizationSecret(string name, SynchronizationSecretArgs args, CustomResourceOptions? opts = null)
    public SynchronizationSecret(String name, SynchronizationSecretArgs args)
    public SynchronizationSecret(String name, SynchronizationSecretArgs args, CustomResourceOptions options)
    
    type: azuread:SynchronizationSecret
    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 SynchronizationSecretArgs
    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 SynchronizationSecretArgs
    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 SynchronizationSecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SynchronizationSecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SynchronizationSecretArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var synchronizationSecretResource = new AzureAD.SynchronizationSecret("synchronizationSecretResource", new()
    {
        ServicePrincipalId = "string",
        Credentials = new[]
        {
            new AzureAD.Inputs.SynchronizationSecretCredentialArgs
            {
                Key = "string",
                Value = "string",
            },
        },
    });
    
    example, err := azuread.NewSynchronizationSecret(ctx, "synchronizationSecretResource", &azuread.SynchronizationSecretArgs{
    	ServicePrincipalId: pulumi.String("string"),
    	Credentials: azuread.SynchronizationSecretCredentialArray{
    		&azuread.SynchronizationSecretCredentialArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    })
    
    var synchronizationSecretResource = new SynchronizationSecret("synchronizationSecretResource", SynchronizationSecretArgs.builder()        
        .servicePrincipalId("string")
        .credentials(SynchronizationSecretCredentialArgs.builder()
            .key("string")
            .value("string")
            .build())
        .build());
    
    synchronization_secret_resource = azuread.SynchronizationSecret("synchronizationSecretResource",
        service_principal_id="string",
        credentials=[azuread.SynchronizationSecretCredentialArgs(
            key="string",
            value="string",
        )])
    
    const synchronizationSecretResource = new azuread.SynchronizationSecret("synchronizationSecretResource", {
        servicePrincipalId: "string",
        credentials: [{
            key: "string",
            value: "string",
        }],
    });
    
    type: azuread:SynchronizationSecret
    properties:
        credentials:
            - key: string
              value: string
        servicePrincipalId: string
    

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

    ServicePrincipalId string
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    Credentials List<Pulumi.AzureAD.Inputs.SynchronizationSecretCredential>
    One or more credential blocks as documented below.
    ServicePrincipalId string
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    Credentials []SynchronizationSecretCredentialArgs
    One or more credential blocks as documented below.
    servicePrincipalId String
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials List<SynchronizationSecretCredential>
    One or more credential blocks as documented below.
    servicePrincipalId string
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials SynchronizationSecretCredential[]
    One or more credential blocks as documented below.
    service_principal_id str
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials Sequence[SynchronizationSecretCredentialArgs]
    One or more credential blocks as documented below.
    servicePrincipalId String
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials List<Property Map>
    One or more credential blocks as documented below.

    Outputs

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

    Get an existing SynchronizationSecret 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?: SynchronizationSecretState, opts?: CustomResourceOptions): SynchronizationSecret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            credentials: Optional[Sequence[SynchronizationSecretCredentialArgs]] = None,
            service_principal_id: Optional[str] = None) -> SynchronizationSecret
    func GetSynchronizationSecret(ctx *Context, name string, id IDInput, state *SynchronizationSecretState, opts ...ResourceOption) (*SynchronizationSecret, error)
    public static SynchronizationSecret Get(string name, Input<string> id, SynchronizationSecretState? state, CustomResourceOptions? opts = null)
    public static SynchronizationSecret get(String name, Output<String> id, SynchronizationSecretState 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.
    The following state arguments are supported:
    Credentials List<Pulumi.AzureAD.Inputs.SynchronizationSecretCredential>
    One or more credential blocks as documented below.
    ServicePrincipalId string
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    Credentials []SynchronizationSecretCredentialArgs
    One or more credential blocks as documented below.
    ServicePrincipalId string
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials List<SynchronizationSecretCredential>
    One or more credential blocks as documented below.
    servicePrincipalId String
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials SynchronizationSecretCredential[]
    One or more credential blocks as documented below.
    servicePrincipalId string
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials Sequence[SynchronizationSecretCredentialArgs]
    One or more credential blocks as documented below.
    service_principal_id str
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.
    credentials List<Property Map>
    One or more credential blocks as documented below.
    servicePrincipalId String
    The object ID of the service principal for which this synchronization secrets should be stored. Changing this field forces a new resource to be created.

    Supporting Types

    SynchronizationSecretCredential, SynchronizationSecretCredentialArgs

    Key string
    The key of the secret.
    Value string
    The value of the secret.
    Key string
    The key of the secret.
    Value string
    The value of the secret.
    key String
    The key of the secret.
    value String
    The value of the secret.
    key string
    The key of the secret.
    value string
    The value of the secret.
    key str
    The key of the secret.
    value str
    The value of the secret.
    key String
    The key of the secret.
    value String
    The value of the secret.

    Import

    This resource does not support importing.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Active Directory (Azure AD) pulumi/pulumi-azuread
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuread Terraform Provider.
    azuread logo
    Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi