Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.stack.kotlin.HciCluster.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.stack.kotlin
import com.pulumi.azure.stack.kotlin.outputs.HciClusterIdentity
import com.pulumi.azure.stack.kotlin.outputs.HciClusterIdentity.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [HciCluster].
*/
@PulumiTagMarker
public class HciClusterResourceBuilder internal constructor() {
public var name: String? = null
public var args: HciClusterArgs = HciClusterArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend HciClusterArgsBuilder.() -> Unit) {
val builder = HciClusterArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): HciCluster {
val builtJavaResource = com.pulumi.azure.stack.HciCluster(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return HciCluster(builtJavaResource)
}
}
/**
* Manages an Azure Stack HCI Cluster.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* import * as azuread from "@pulumi/azuread";
* const example = azuread.getApplication({
* displayName: "Allowed resource types",
* });
* const current = azure.core.getClientConfig({});
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleHciCluster = new azure.stack.HciCluster("example", {
* name: "example-cluster",
* resourceGroupName: exampleResourceGroup.name,
* location: exampleResourceGroup.location,
* clientId: example.then(example => example.applicationId),
* tenantId: current.then(current => current.tenantId),
* identity: {
* type: "SystemAssigned",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* import pulumi_azuread as azuread
* example = azuread.get_application(display_name="Allowed resource types")
* current = azure.core.get_client_config()
* example_resource_group = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_hci_cluster = azure.stack.HciCluster("example",
* name="example-cluster",
* resource_group_name=example_resource_group.name,
* location=example_resource_group.location,
* client_id=example.application_id,
* tenant_id=current.tenant_id,
* identity={
* "type": "SystemAssigned",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* using AzureAD = Pulumi.AzureAD;
* return await Deployment.RunAsync(() =>
* {
* var example = AzureAD.GetApplication.Invoke(new()
* {
* DisplayName = "Allowed resource types",
* });
* var current = Azure.Core.GetClientConfig.Invoke();
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleHciCluster = new Azure.Stack.HciCluster("example", new()
* {
* Name = "example-cluster",
* ResourceGroupName = exampleResourceGroup.Name,
* Location = exampleResourceGroup.Location,
* ClientId = example.Apply(getApplicationResult => getApplicationResult.ApplicationId),
* TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
* Identity = new Azure.Stack.Inputs.HciClusterIdentityArgs
* {
* Type = "SystemAssigned",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/stack"
* "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.LookupApplication(ctx, &azuread.LookupApplicationArgs{
* DisplayName: pulumi.StringRef("Allowed resource types"),
* }, nil)
* if err != nil {
* return err
* }
* current, err := core.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = stack.NewHciCluster(ctx, "example", &stack.HciClusterArgs{
* Name: pulumi.String("example-cluster"),
* ResourceGroupName: exampleResourceGroup.Name,
* Location: exampleResourceGroup.Location,
* ClientId: pulumi.String(example.ApplicationId),
* TenantId: pulumi.String(current.TenantId),
* Identity: &stack.HciClusterIdentityArgs{
* Type: pulumi.String("SystemAssigned"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.GetApplicationArgs;
* import com.pulumi.azure.core.CoreFunctions;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.stack.HciCluster;
* import com.pulumi.azure.stack.HciClusterArgs;
* import com.pulumi.azure.stack.inputs.HciClusterIdentityArgs;
* 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.getApplication(GetApplicationArgs.builder()
* .displayName("Allowed resource types")
* .build());
* final var current = CoreFunctions.getClientConfig();
* var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleHciCluster = new HciCluster("exampleHciCluster", HciClusterArgs.builder()
* .name("example-cluster")
* .resourceGroupName(exampleResourceGroup.name())
* .location(exampleResourceGroup.location())
* .clientId(example.applyValue(getApplicationResult -> getApplicationResult.applicationId()))
* .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
* .identity(HciClusterIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example-resources
* location: West Europe
* exampleHciCluster:
* type: azure:stack:HciCluster
* name: example
* properties:
* name: example-cluster
* resourceGroupName: ${exampleResourceGroup.name}
* location: ${exampleResourceGroup.location}
* clientId: ${example.applicationId}
* tenantId: ${current.tenantId}
* identity:
* type: SystemAssigned
* variables:
* example:
* fn::invoke:
* Function: azuread:getApplication
* Arguments:
* displayName: Allowed resource types
* current:
* fn::invoke:
* Function: azure:core:getClientConfig
* Arguments: {}
* ```
*
* ## Import
* Azure Stack HCI Clusters can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:stack/hciCluster:HciCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AzureStackHCI/clusters/cluster1
* ```
*/
public class HciCluster internal constructor(
override val javaResource: com.pulumi.azure.stack.HciCluster,
) : KotlinCustomResource(javaResource, HciClusterMapper) {
/**
* The ID of the Automanage Configuration assigned to the Azure Stack HCI Cluster.
*/
public val automanageConfigurationId: Output?
get() = javaResource.automanageConfigurationId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Client ID of the Azure Active Directory Application which is used by the Azure Stack HCI Cluster. Changing this forces a new resource to be created.
*/
public val clientId: Output?
get() = javaResource.clientId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* An immutable UUID for the Azure Stack HCI Cluster.
*/
public val cloudId: Output
get() = javaResource.cloudId().applyValue({ args0 -> args0 })
/**
* An `identity` block as defined below.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
}).orElse(null)
})
/**
* The Azure Region where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name which should be used for this Azure Stack HCI Cluster. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The name of the Resource Group where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The object ID of the Resource Provider Service Principal.
*/
public val resourceProviderObjectId: Output
get() = javaResource.resourceProviderObjectId().applyValue({ args0 -> args0 })
/**
* The region specific Data Path Endpoint of the Azure Stack HCI Cluster.
*/
public val serviceEndpoint: Output
get() = javaResource.serviceEndpoint().applyValue({ args0 -> args0 })
/**
* A mapping of tags which should be assigned to the Azure Stack HCI Cluster.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
/**
* The Tenant ID of the Azure Active Directory which is used by the Azure Stack HCI Cluster. Changing this forces a new resource to be created.
* > **NOTE** If unspecified the Tenant ID of the Provider will be used.
*/
public val tenantId: Output
get() = javaResource.tenantId().applyValue({ args0 -> args0 })
}
public object HciClusterMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.stack.HciCluster::class == javaResource::class
override fun map(javaResource: Resource): HciCluster = HciCluster(
javaResource as
com.pulumi.azure.stack.HciCluster,
)
}
/**
* @see [HciCluster].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [HciCluster].
*/
public suspend fun hciCluster(name: String, block: suspend HciClusterResourceBuilder.() -> Unit): HciCluster {
val builder = HciClusterResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [HciCluster].
* @param name The _unique_ name of the resulting resource.
*/
public fun hciCluster(name: String): HciCluster {
val builder = HciClusterResourceBuilder()
builder.name(name)
return builder.build()
}