We recommend using Azure Native.
azure.datafactory.CredentialUserManagedIdentity
Explore with Pulumi AI
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",
],
});
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",
])
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
})
}
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",
},
});
});
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());
}
}
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
API Providers
This resource uses the following Azure API Providers:
Microsoft.DataFactory
: 2018-06-01
Create CredentialUserManagedIdentity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CredentialUserManagedIdentity(name: string, args: CredentialUserManagedIdentityArgs, opts?: CustomResourceOptions);
@overload
def CredentialUserManagedIdentity(resource_name: str,
args: CredentialUserManagedIdentityArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CredentialUserManagedIdentity(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_factory_id: Optional[str] = None,
identity_id: Optional[str] = None,
annotations: Optional[Sequence[str]] = None,
description: Optional[str] = None,
name: Optional[str] = None)
func NewCredentialUserManagedIdentity(ctx *Context, name string, args CredentialUserManagedIdentityArgs, opts ...ResourceOption) (*CredentialUserManagedIdentity, error)
public CredentialUserManagedIdentity(string name, CredentialUserManagedIdentityArgs args, CustomResourceOptions? opts = null)
public CredentialUserManagedIdentity(String name, CredentialUserManagedIdentityArgs args)
public CredentialUserManagedIdentity(String name, CredentialUserManagedIdentityArgs args, CustomResourceOptions options)
type: azure:datafactory:CredentialUserManagedIdentity
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 CredentialUserManagedIdentityArgs
- 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 CredentialUserManagedIdentityArgs
- 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 CredentialUserManagedIdentityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CredentialUserManagedIdentityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CredentialUserManagedIdentityArgs
- 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 credentialUserManagedIdentityResource = new Azure.DataFactory.CredentialUserManagedIdentity("credentialUserManagedIdentityResource", new()
{
DataFactoryId = "string",
IdentityId = "string",
Annotations = new[]
{
"string",
},
Description = "string",
Name = "string",
});
example, err := datafactory.NewCredentialUserManagedIdentity(ctx, "credentialUserManagedIdentityResource", &datafactory.CredentialUserManagedIdentityArgs{
DataFactoryId: pulumi.String("string"),
IdentityId: pulumi.String("string"),
Annotations: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var credentialUserManagedIdentityResource = new CredentialUserManagedIdentity("credentialUserManagedIdentityResource", CredentialUserManagedIdentityArgs.builder()
.dataFactoryId("string")
.identityId("string")
.annotations("string")
.description("string")
.name("string")
.build());
credential_user_managed_identity_resource = azure.datafactory.CredentialUserManagedIdentity("credentialUserManagedIdentityResource",
data_factory_id="string",
identity_id="string",
annotations=["string"],
description="string",
name="string")
const credentialUserManagedIdentityResource = new azure.datafactory.CredentialUserManagedIdentity("credentialUserManagedIdentityResource", {
dataFactoryId: "string",
identityId: "string",
annotations: ["string"],
description: "string",
name: "string",
});
type: azure:datafactory:CredentialUserManagedIdentity
properties:
annotations:
- string
dataFactoryId: string
description: string
identityId: string
name: string
CredentialUserManagedIdentity 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 CredentialUserManagedIdentity resource accepts the following input properties:
- Data
Factory stringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- Identity
Id string 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- Annotations List<string>
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- Description string
- The description for the Data Factory Credential.
- Name string
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- Data
Factory stringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- Identity
Id string 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- Annotations []string
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- Description string
- The description for the Data Factory Credential.
- Name string
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- data
Factory StringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- identity
Id String 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- annotations List<String>
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- description String
- The description for the Data Factory Credential.
- name String
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- data
Factory stringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- identity
Id string 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- annotations string[]
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- description string
- The description for the Data Factory Credential.
- name string
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- data_
factory_ strid - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- identity_
id str 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- annotations Sequence[str]
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- description str
- The description for the Data Factory Credential.
- name str
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- data
Factory StringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- identity
Id String 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- annotations List<String>
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- description String
- The description for the Data Factory Credential.
- name String
- Specifies the name of the Credential. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the CredentialUserManagedIdentity 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 CredentialUserManagedIdentity Resource
Get an existing CredentialUserManagedIdentity 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?: CredentialUserManagedIdentityState, opts?: CustomResourceOptions): CredentialUserManagedIdentity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Sequence[str]] = None,
data_factory_id: Optional[str] = None,
description: Optional[str] = None,
identity_id: Optional[str] = None,
name: Optional[str] = None) -> CredentialUserManagedIdentity
func GetCredentialUserManagedIdentity(ctx *Context, name string, id IDInput, state *CredentialUserManagedIdentityState, opts ...ResourceOption) (*CredentialUserManagedIdentity, error)
public static CredentialUserManagedIdentity Get(string name, Input<string> id, CredentialUserManagedIdentityState? state, CustomResourceOptions? opts = null)
public static CredentialUserManagedIdentity get(String name, Output<String> id, CredentialUserManagedIdentityState state, CustomResourceOptions options)
resources: _: type: azure:datafactory:CredentialUserManagedIdentity 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.
- Annotations List<string>
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- Data
Factory stringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- Description string
- The description for the Data Factory Credential.
- Identity
Id string 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- Name string
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- Annotations []string
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- Data
Factory stringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- Description string
- The description for the Data Factory Credential.
- Identity
Id string 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- Name string
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- annotations List<String>
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- data
Factory StringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- description String
- The description for the Data Factory Credential.
- identity
Id String 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- name String
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- annotations string[]
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- data
Factory stringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- description string
- The description for the Data Factory Credential.
- identity
Id string 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- name string
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- annotations Sequence[str]
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- data_
factory_ strid - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- description str
- The description for the Data Factory Credential.
- identity_
id str 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- name str
- Specifies the name of the Credential. Changing this forces a new resource to be created.
- annotations List<String>
List of tags that can be used for describing the Data Factory Credential.
Note: Manually altering a Credential resource will cause annotations to be lost, resulting in a change being detected on the next run.
- data
Factory StringId - The Data Factory ID in which to associate the Credential with. Changing this forces a new resource.
- description String
- The description for the Data Factory Credential.
- identity
Id String 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.
Note: Attempting to create a Credential resource without first assigning the identity to the parent Data Factory will result in an Azure API error.
- name String
- Specifies the name of the Credential. Changing this forces a new resource to be created.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.