We recommend using Azure Native.
azure.kusto.ClusterPrincipalAssignment
Explore with Pulumi AI
Manages a Kusto Cluster Principal Assignment.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var current = Azure.Core.GetClientConfig.Invoke();
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleCluster = new Azure.Kusto.Cluster("exampleCluster", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
{
Name = "Standard_D13_v2",
Capacity = 2,
},
});
var exampleClusterPrincipalAssignment = new Azure.Kusto.ClusterPrincipalAssignment("exampleClusterPrincipalAssignment", new()
{
ResourceGroupName = exampleResourceGroup.Name,
ClusterName = exampleCluster.Name,
TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
PrincipalId = current.Apply(getClientConfigResult => getClientConfigResult.ClientId),
PrincipalType = "App",
Role = "AllDatabasesAdmin",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/kusto"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleCluster, err := kusto.NewCluster(ctx, "exampleCluster", &kusto.ClusterArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
Sku: &kusto.ClusterSkuArgs{
Name: pulumi.String("Standard_D13_v2"),
Capacity: pulumi.Int(2),
},
})
if err != nil {
return err
}
_, err = kusto.NewClusterPrincipalAssignment(ctx, "exampleClusterPrincipalAssignment", &kusto.ClusterPrincipalAssignmentArgs{
ResourceGroupName: exampleResourceGroup.Name,
ClusterName: exampleCluster.Name,
TenantId: *pulumi.String(current.TenantId),
PrincipalId: *pulumi.String(current.ClientId),
PrincipalType: pulumi.String("App"),
Role: pulumi.String("AllDatabasesAdmin"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.kusto.Cluster;
import com.pulumi.azure.kusto.ClusterArgs;
import com.pulumi.azure.kusto.inputs.ClusterSkuArgs;
import com.pulumi.azure.kusto.ClusterPrincipalAssignment;
import com.pulumi.azure.kusto.ClusterPrincipalAssignmentArgs;
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 current = CoreFunctions.getClientConfig();
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku(ClusterSkuArgs.builder()
.name("Standard_D13_v2")
.capacity(2)
.build())
.build());
var exampleClusterPrincipalAssignment = new ClusterPrincipalAssignment("exampleClusterPrincipalAssignment", ClusterPrincipalAssignmentArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.clusterName(exampleCluster.name())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.principalId(current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()))
.principalType("App")
.role("AllDatabasesAdmin")
.build());
}
}
import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_cluster = azure.kusto.Cluster("exampleCluster",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku=azure.kusto.ClusterSkuArgs(
name="Standard_D13_v2",
capacity=2,
))
example_cluster_principal_assignment = azure.kusto.ClusterPrincipalAssignment("exampleClusterPrincipalAssignment",
resource_group_name=example_resource_group.name,
cluster_name=example_cluster.name,
tenant_id=current.tenant_id,
principal_id=current.client_id,
principal_type="App",
role="AllDatabasesAdmin")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getClientConfig({});
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleCluster = new azure.kusto.Cluster("exampleCluster", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
sku: {
name: "Standard_D13_v2",
capacity: 2,
},
});
const exampleClusterPrincipalAssignment = new azure.kusto.ClusterPrincipalAssignment("exampleClusterPrincipalAssignment", {
resourceGroupName: exampleResourceGroup.name,
clusterName: exampleCluster.name,
tenantId: current.then(current => current.tenantId),
principalId: current.then(current => current.clientId),
principalType: "App",
role: "AllDatabasesAdmin",
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleCluster:
type: azure:kusto:Cluster
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
sku:
name: Standard_D13_v2
capacity: 2
exampleClusterPrincipalAssignment:
type: azure:kusto:ClusterPrincipalAssignment
properties:
resourceGroupName: ${exampleResourceGroup.name}
clusterName: ${exampleCluster.name}
tenantId: ${current.tenantId}
principalId: ${current.clientId}
principalType: App
role: AllDatabasesAdmin
variables:
current:
fn::invoke:
Function: azure:core:getClientConfig
Arguments: {}
Create ClusterPrincipalAssignment Resource
new ClusterPrincipalAssignment(name: string, args: ClusterPrincipalAssignmentArgs, opts?: CustomResourceOptions);
@overload
def ClusterPrincipalAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_name: Optional[str] = None,
name: Optional[str] = None,
principal_id: Optional[str] = None,
principal_type: Optional[str] = None,
resource_group_name: Optional[str] = None,
role: Optional[str] = None,
tenant_id: Optional[str] = None)
@overload
def ClusterPrincipalAssignment(resource_name: str,
args: ClusterPrincipalAssignmentArgs,
opts: Optional[ResourceOptions] = None)
func NewClusterPrincipalAssignment(ctx *Context, name string, args ClusterPrincipalAssignmentArgs, opts ...ResourceOption) (*ClusterPrincipalAssignment, error)
public ClusterPrincipalAssignment(string name, ClusterPrincipalAssignmentArgs args, CustomResourceOptions? opts = null)
public ClusterPrincipalAssignment(String name, ClusterPrincipalAssignmentArgs args)
public ClusterPrincipalAssignment(String name, ClusterPrincipalAssignmentArgs args, CustomResourceOptions options)
type: azure:kusto:ClusterPrincipalAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClusterPrincipalAssignmentArgs
- 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 ClusterPrincipalAssignmentArgs
- 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 ClusterPrincipalAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClusterPrincipalAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClusterPrincipalAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClusterPrincipalAssignment 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 ClusterPrincipalAssignment resource accepts the following input properties:
- Cluster
Name string The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- Principal
Id string The object id of the principal. Changing this forces a new resource to be created.
- Principal
Type string The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- Resource
Group stringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- Role string
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- Tenant
Id string The tenant id in which the principal resides. Changing this forces a new resource to be created.
- Name string
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- Cluster
Name string The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- Principal
Id string The object id of the principal. Changing this forces a new resource to be created.
- Principal
Type string The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- Resource
Group stringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- Role string
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- Tenant
Id string The tenant id in which the principal resides. Changing this forces a new resource to be created.
- Name string
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- cluster
Name String The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- principal
Id String The object id of the principal. Changing this forces a new resource to be created.
- principal
Type String The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource
Group StringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role String
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant
Id String The tenant id in which the principal resides. Changing this forces a new resource to be created.
- name String
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- cluster
Name string The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- principal
Id string The object id of the principal. Changing this forces a new resource to be created.
- principal
Type string The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource
Group stringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role string
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant
Id string The tenant id in which the principal resides. Changing this forces a new resource to be created.
- name string
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- cluster_
name str The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- principal_
id str The object id of the principal. Changing this forces a new resource to be created.
- principal_
type str The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource_
group_ strname The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role str
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant_
id str The tenant id in which the principal resides. Changing this forces a new resource to be created.
- name str
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- cluster
Name String The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- principal
Id String The object id of the principal. Changing this forces a new resource to be created.
- principal
Type String The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource
Group StringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role String
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant
Id String The tenant id in which the principal resides. Changing this forces a new resource to be created.
- name String
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClusterPrincipalAssignment resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Principal
Name string The name of the principal.
- Tenant
Name string The name of the tenant.
- Id string
The provider-assigned unique ID for this managed resource.
- Principal
Name string The name of the principal.
- Tenant
Name string The name of the tenant.
- id String
The provider-assigned unique ID for this managed resource.
- principal
Name String The name of the principal.
- tenant
Name String The name of the tenant.
- id string
The provider-assigned unique ID for this managed resource.
- principal
Name string The name of the principal.
- tenant
Name string The name of the tenant.
- id str
The provider-assigned unique ID for this managed resource.
- principal_
name str The name of the principal.
- tenant_
name str The name of the tenant.
- id String
The provider-assigned unique ID for this managed resource.
- principal
Name String The name of the principal.
- tenant
Name String The name of the tenant.
Look up Existing ClusterPrincipalAssignment Resource
Get an existing ClusterPrincipalAssignment 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?: ClusterPrincipalAssignmentState, opts?: CustomResourceOptions): ClusterPrincipalAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_name: Optional[str] = None,
name: Optional[str] = None,
principal_id: Optional[str] = None,
principal_name: Optional[str] = None,
principal_type: Optional[str] = None,
resource_group_name: Optional[str] = None,
role: Optional[str] = None,
tenant_id: Optional[str] = None,
tenant_name: Optional[str] = None) -> ClusterPrincipalAssignment
func GetClusterPrincipalAssignment(ctx *Context, name string, id IDInput, state *ClusterPrincipalAssignmentState, opts ...ResourceOption) (*ClusterPrincipalAssignment, error)
public static ClusterPrincipalAssignment Get(string name, Input<string> id, ClusterPrincipalAssignmentState? state, CustomResourceOptions? opts = null)
public static ClusterPrincipalAssignment get(String name, Output<String> id, ClusterPrincipalAssignmentState 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.
- Cluster
Name string The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- Name string
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- Principal
Id string The object id of the principal. Changing this forces a new resource to be created.
- Principal
Name string The name of the principal.
- Principal
Type string The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- Resource
Group stringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- Role string
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- Tenant
Id string The tenant id in which the principal resides. Changing this forces a new resource to be created.
- Tenant
Name string The name of the tenant.
- Cluster
Name string The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- Name string
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- Principal
Id string The object id of the principal. Changing this forces a new resource to be created.
- Principal
Name string The name of the principal.
- Principal
Type string The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- Resource
Group stringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- Role string
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- Tenant
Id string The tenant id in which the principal resides. Changing this forces a new resource to be created.
- Tenant
Name string The name of the tenant.
- cluster
Name String The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- name String
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- principal
Id String The object id of the principal. Changing this forces a new resource to be created.
- principal
Name String The name of the principal.
- principal
Type String The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource
Group StringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role String
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant
Id String The tenant id in which the principal resides. Changing this forces a new resource to be created.
- tenant
Name String The name of the tenant.
- cluster
Name string The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- name string
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- principal
Id string The object id of the principal. Changing this forces a new resource to be created.
- principal
Name string The name of the principal.
- principal
Type string The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource
Group stringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role string
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant
Id string The tenant id in which the principal resides. Changing this forces a new resource to be created.
- tenant
Name string The name of the tenant.
- cluster_
name str The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- name str
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- principal_
id str The object id of the principal. Changing this forces a new resource to be created.
- principal_
name str The name of the principal.
- principal_
type str The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource_
group_ strname The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role str
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant_
id str The tenant id in which the principal resides. Changing this forces a new resource to be created.
- tenant_
name str The name of the tenant.
- cluster
Name String The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
- name String
The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
- principal
Id String The object id of the principal. Changing this forces a new resource to be created.
- principal
Name String The name of the principal.
- principal
Type String The type of the principal. Valid values include
App
,Group
,User
. Changing this forces a new resource to be created.- resource
Group StringName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
- role String
The cluster role assigned to the principal. Valid values include
AllDatabasesAdmin
andAllDatabasesViewer
. Changing this forces a new resource to be created.- tenant
Id String The tenant id in which the principal resides. Changing this forces a new resource to be created.
- tenant
Name String The name of the tenant.
Import
Data Explorer Cluster Principal Assignments can be imported using the resource id
, e.g.
$ pulumi import azure:kusto/clusterPrincipalAssignment:ClusterPrincipalAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/principalAssignments/assignment1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.