All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.stack.kotlin.HciClusterArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.stack.kotlin

import com.pulumi.azure.stack.HciClusterArgs.builder
import com.pulumi.azure.stack.kotlin.inputs.HciClusterIdentityArgs
import com.pulumi.azure.stack.kotlin.inputs.HciClusterIdentityArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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
 * ```
 * @property automanageConfigurationId The ID of the Automanage Configuration assigned to the Azure Stack HCI Cluster.
 * @property clientId 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.
 * @property identity An `identity` block as defined below.
 * @property location The Azure Region where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
 * @property name The name which should be used for this Azure Stack HCI Cluster. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
 * @property tags A mapping of tags which should be assigned to the Azure Stack HCI Cluster.
 * @property tenantId 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 data class HciClusterArgs(
    public val automanageConfigurationId: Output? = null,
    public val clientId: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val tenantId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.stack.HciClusterArgs =
        com.pulumi.azure.stack.HciClusterArgs.builder()
            .automanageConfigurationId(automanageConfigurationId?.applyValue({ args0 -> args0 }))
            .clientId(clientId?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .tenantId(tenantId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HciClusterArgs].
 */
@PulumiTagMarker
public class HciClusterArgsBuilder internal constructor() {
    private var automanageConfigurationId: Output? = null

    private var clientId: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var tenantId: Output? = null

    /**
     * @param value The ID of the Automanage Configuration assigned to the Azure Stack HCI Cluster.
     */
    @JvmName("fagtomvtgnsebwiw")
    public suspend fun automanageConfigurationId(`value`: Output) {
        this.automanageConfigurationId = value
    }

    /**
     * @param value 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.
     */
    @JvmName("eburjdgkcrpnpakp")
    public suspend fun clientId(`value`: Output) {
        this.clientId = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("moebpqkuvjvjhhkf")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The Azure Region where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
     */
    @JvmName("tkgatkpjgpmejjsq")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name which should be used for this Azure Stack HCI Cluster. Changing this forces a new resource to be created.
     */
    @JvmName("yeamkxqlsyxvfihr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the Resource Group where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
     */
    @JvmName("kgffdyodumfsgmrd")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Azure Stack HCI Cluster.
     */
    @JvmName("ukdpptrrjulcgiiw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value 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.
     */
    @JvmName("nwrmhvdsyqaoujou")
    public suspend fun tenantId(`value`: Output) {
        this.tenantId = value
    }

    /**
     * @param value The ID of the Automanage Configuration assigned to the Azure Stack HCI Cluster.
     */
    @JvmName("fcooyioryspfqddf")
    public suspend fun automanageConfigurationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.automanageConfigurationId = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("wiobelkkfbqnbjoq")
    public suspend fun clientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientId = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("cknmrvoccrcdqija")
    public suspend fun identity(`value`: HciClusterIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("rqtbilisusqpsbmy")
    public suspend fun identity(argument: suspend HciClusterIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = HciClusterIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The Azure Region where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
     */
    @JvmName("ixwxbecqjktwqjka")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name which should be used for this Azure Stack HCI Cluster. Changing this forces a new resource to be created.
     */
    @JvmName("cabemlywpbbwpakg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name of the Resource Group where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.
     */
    @JvmName("scoixvwxtviinfes")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Azure Stack HCI Cluster.
     */
    @JvmName("grwkqbqhusoxrrrg")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Azure Stack HCI Cluster.
     */
    @JvmName("rvvvelxrqduccsrt")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("jwrarfayhpmxfebk")
    public suspend fun tenantId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tenantId = mapped
    }

    internal fun build(): HciClusterArgs = HciClusterArgs(
        automanageConfigurationId = automanageConfigurationId,
        clientId = clientId,
        identity = identity,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        tags = tags,
        tenantId = tenantId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy