CassandraDatacenterArgs

data class CassandraDatacenterArgs(val availabilityZonesEnabled: Output<Boolean>? = null, val backupStorageCustomerKeyUri: Output<String>? = null, val base64EncodedYamlFragment: Output<String>? = null, val cassandraClusterId: Output<String>? = null, val delegatedManagementSubnetId: Output<String>? = null, val diskCount: Output<Int>? = null, val diskSku: Output<String>? = null, val location: Output<String>? = null, val managedDiskCustomerKeyUri: Output<String>? = null, val name: Output<String>? = null, val nodeCount: Output<Int>? = null, val skuName: Output<String>? = null) : ConvertibleToJava<CassandraDatacenterArgs>

Manages a Cassandra Datacenter.

NOTE: In order for the Azure Managed Instances for Apache Cassandra to work properly the product requires the Azure Cosmos DB Application ID to be present and working in your tenant. If the Azure Cosmos DB Application ID is missing in your environment you will need to have an administrator of your tenant run the following command to add the Azure Cosmos DB Application ID to your tenant:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
}
}
{}

Example Usage

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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
import com.pulumi.azure.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.cosmosdb.CassandraCluster;
import com.pulumi.azure.cosmosdb.CassandraClusterArgs;
import com.pulumi.azure.cosmosdb.CassandraDatacenter;
import com.pulumi.azure.cosmosdb.CassandraDatacenterArgs;
import com.pulumi.resources.CustomResourceOptions;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.1.0/24")
.build());
final var exampleServicePrincipal = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
.displayName("Azure Cosmos DB")
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.scope(exampleVirtualNetwork.id())
.roleDefinitionName("Network Contributor")
.principalId(exampleServicePrincipal.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId()))
.build());
var exampleCassandraCluster = new CassandraCluster("exampleCassandraCluster", CassandraClusterArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.delegatedManagementSubnetId(exampleSubnet.id())
.defaultAdminPassword("Password1234")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAssignment)
.build());
var exampleCassandraDatacenter = new CassandraDatacenter("exampleCassandraDatacenter", CassandraDatacenterArgs.builder()
.location(exampleCassandraCluster.location())
.cassandraClusterId(exampleCassandraCluster.id())
.delegatedManagementSubnetId(exampleSubnet.id())
.nodeCount(3)
.diskCount(4)
.skuName("Standard_DS14_v2")
.availabilityZonesEnabled(false)
.build());
}
}

Import

Cassandra Datacenters can be imported using the resource id, e.g.

$ pulumi import azure:cosmosdb/cassandraDatacenter:CassandraDatacenter example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DocumentDB/cassandraClusters/cluster1/dataCenters/dc1

Constructors

Link copied to clipboard
fun CassandraDatacenterArgs(availabilityZonesEnabled: Output<Boolean>? = null, backupStorageCustomerKeyUri: Output<String>? = null, base64EncodedYamlFragment: Output<String>? = null, cassandraClusterId: Output<String>? = null, delegatedManagementSubnetId: Output<String>? = null, diskCount: Output<Int>? = null, diskSku: Output<String>? = null, location: Output<String>? = null, managedDiskCustomerKeyUri: Output<String>? = null, name: Output<String>? = null, nodeCount: Output<Int>? = null, skuName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): CassandraDatacenterArgs

Properties

Link copied to clipboard
val availabilityZonesEnabled: Output<Boolean>? = null

Determines whether availability zones are enabled. Defaults to true.

Link copied to clipboard
val backupStorageCustomerKeyUri: Output<String>? = null

The key URI of the customer key to use for the encryption of the backup Storage Account.

Link copied to clipboard
val base64EncodedYamlFragment: Output<String>? = null

The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed.

Link copied to clipboard
val cassandraClusterId: Output<String>? = null

The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created.

Link copied to clipboard
val delegatedManagementSubnetId: Output<String>? = null

The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created.

Link copied to clipboard
val diskCount: Output<Int>? = null

Determines the number of p30 disks that are attached to each node.

Link copied to clipboard
val diskSku: Output<String>? = null

The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30.

Link copied to clipboard
val location: Output<String>? = null

The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created.

Link copied to clipboard
val managedDiskCustomerKeyUri: Output<String>? = null

The key URI of the customer key to use for the encryption of the Managed Disk.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created.

Link copied to clipboard
val nodeCount: Output<Int>? = null

The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3.

Link copied to clipboard
val skuName: Output<String>? = null

Determines the selected sku.