Credential User Managed Identity Args
data class CredentialUserManagedIdentityArgs(val annotations: Output<List<String>>? = null, val dataFactoryId: Output<String>? = null, val description: Output<String>? = null, val identityId: Output<String>? = null, val name: Output<String>? = null) : ConvertibleToJava<CredentialUserManagedIdentityArgs>
Manage a Data Factory User Assigned Managed Identity credential resource. These resources are used by Data Factory to access data sources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "westus",
});
const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
location: example.location,
name: "my-user",
resourceGroupName: example.name,
});
const exampleFactory = new azure.datafactory.Factory("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
identity: {
type: "UserAssigned",
identityIds: [exampleUserAssignedIdentity.id],
},
});
const test = new azure.datafactory.CredentialUserManagedIdentity("test", {
name: exampleUserAssignedIdentity.name,
description: "Short description of this credential",
dataFactoryId: exampleFactory.id,
identityId: exampleUserAssignedIdentity.id,
annotations: [
"example",
"example2",
],
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="westus")
example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
location=example.location,
name="my-user",
resource_group_name=example.name)
example_factory = azure.datafactory.Factory("example",
name="example",
location=example.location,
resource_group_name=example.name,
identity={
"type": "UserAssigned",
"identity_ids": [example_user_assigned_identity.id],
})
test = azure.datafactory.CredentialUserManagedIdentity("test",
name=example_user_assigned_identity.name,
description="Short description of this credential",
data_factory_id=example_factory.id,
identity_id=example_user_assigned_identity.id,
annotations=[
"example",
"example2",
])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "westus",
});
var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
{
Location = example.Location,
Name = "my-user",
ResourceGroupName = example.Name,
});
var exampleFactory = new Azure.DataFactory.Factory("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
Identity = new Azure.DataFactory.Inputs.FactoryIdentityArgs
{
Type = "UserAssigned",
IdentityIds = new[]
{
exampleUserAssignedIdentity.Id,
},
},
});
var test = new Azure.DataFactory.CredentialUserManagedIdentity("test", new()
{
Name = exampleUserAssignedIdentity.Name,
Description = "Short description of this credential",
DataFactoryId = exampleFactory.Id,
IdentityId = exampleUserAssignedIdentity.Id,
Annotations = new[]
{
"example",
"example2",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datafactory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("westus"),
})
if err != nil {
return err
}
exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
Location: example.Location,
Name: pulumi.String("my-user"),
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleFactory, err := datafactory.NewFactory(ctx, "example", &datafactory.FactoryArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
Identity: &datafactory.FactoryIdentityArgs{
Type: pulumi.String("UserAssigned"),
IdentityIds: pulumi.StringArray{
exampleUserAssignedIdentity.ID(),
},
},
})
if err != nil {
return err
}
_, err = datafactory.NewCredentialUserManagedIdentity(ctx, "test", &datafactory.CredentialUserManagedIdentityArgs{
Name: exampleUserAssignedIdentity.Name,
Description: pulumi.String("Short description of this credential"),
DataFactoryId: exampleFactory.ID(),
IdentityId: exampleUserAssignedIdentity.ID(),
Annotations: pulumi.StringArray{
pulumi.String("example"),
pulumi.String("example2"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
import com.pulumi.azure.datafactory.Factory;
import com.pulumi.azure.datafactory.FactoryArgs;
import com.pulumi.azure.datafactory.inputs.FactoryIdentityArgs;
import com.pulumi.azure.datafactory.CredentialUserManagedIdentity;
import com.pulumi.azure.datafactory.CredentialUserManagedIdentityArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("westus")
.build());
var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
.location(example.location())
.name("my-user")
.resourceGroupName(example.name())
.build());
var exampleFactory = new Factory("exampleFactory", FactoryArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.identity(FactoryIdentityArgs.builder()
.type("UserAssigned")
.identityIds(exampleUserAssignedIdentity.id())
.build())
.build());
var test = new CredentialUserManagedIdentity("test", CredentialUserManagedIdentityArgs.builder()
.name(exampleUserAssignedIdentity.name())
.description("Short description of this credential")
.dataFactoryId(exampleFactory.id())
.identityId(exampleUserAssignedIdentity.id())
.annotations(
"example",
"example2")
.build());
}
}
Content copied to clipboard
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: westus
exampleFactory:
type: azure:datafactory:Factory
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
identity:
type: UserAssigned
identityIds:
- ${exampleUserAssignedIdentity.id}
exampleUserAssignedIdentity:
type: azure:authorization:UserAssignedIdentity
name: example
properties:
location: ${example.location}
name: my-user
resourceGroupName: ${example.name}
test:
type: azure:datafactory:CredentialUserManagedIdentity
properties:
name: ${exampleUserAssignedIdentity.name}
description: Short description of this credential
dataFactoryId: ${exampleFactory.id}
identityId: ${exampleUserAssignedIdentity.id}
annotations:
- example
- example2
Content copied to clipboard
API Providers
This resource uses the following Azure API Providers:
Microsoft.DataFactory
: 2018-06-01
Import
Data Factory Credentials can be imported using the resource id
, e.g.
$ pulumi import azure:datafactory/credentialUserManagedIdentity:CredentialUserManagedIdentity example /subscriptions/1f3d6e58-feed-4bb6-87e5-a52305ad3375/resourceGroups/example-resources/providers/Microsoft.DataFactory/factories/example/credentials/credential1
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
List of tags that can be used for describing the Data Factory Credential.
Link copied to clipboard
The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
Link copied to clipboard
The description for the Data Factory Credential.
Link copied to clipboard
The Resouce ID of an existing User Assigned Managed Identity. This can be changed without recreating the resource. Changing this forces a new resource to be created.