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

com.pulumi.azure.redhatopenshift.kotlin.ClusterArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.redhatopenshift.kotlin

import com.pulumi.azure.redhatopenshift.ClusterArgs.builder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterApiServerProfileArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterApiServerProfileArgsBuilder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterClusterProfileArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterClusterProfileArgsBuilder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterIngressProfileArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterIngressProfileArgsBuilder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterMainProfileArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterMainProfileArgsBuilder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterNetworkProfileArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterNetworkProfileArgsBuilder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterServicePrincipalArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterServicePrincipalArgsBuilder
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterWorkerProfileArgs
import com.pulumi.azure.redhatopenshift.kotlin.inputs.ClusterWorkerProfileArgsBuilder
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 a fully managed Azure Red Hat OpenShift Cluster (also known as ARO).
 * > **Note:** All arguments including the client secret will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as azuread from "@pulumi/azuread";
 * const example = azure.core.getClientConfig({});
 * const exampleGetClientConfig = azuread.getClientConfig({});
 * const exampleApplication = new azuread.Application("example", {displayName: "example-aro"});
 * const exampleServicePrincipal = new azuread.ServicePrincipal("example", {clientId: exampleApplication.clientId});
 * const exampleServicePrincipalPassword = new azuread.ServicePrincipalPassword("example", {servicePrincipalId: exampleServicePrincipal.objectId});
 * const redhatopenshift = azuread.getServicePrincipal({
 *     clientId: "f1dd0a37-89c6-4e07-bcd1-ffd3d43d8875",
 * });
 * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West US",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-vnet",
 *     addressSpaces: ["10.0.0.0/22"],
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 * });
 * const roleNetwork1 = new azure.authorization.Assignment("role_network1", {
 *     scope: exampleVirtualNetwork.id,
 *     roleDefinitionName: "Network Contributor",
 *     principalId: exampleServicePrincipal.objectId,
 * });
 * const roleNetwork2 = new azure.authorization.Assignment("role_network2", {
 *     scope: exampleVirtualNetwork.id,
 *     roleDefinitionName: "Network Contributor",
 *     principalId: redhatopenshift.then(redhatopenshift => redhatopenshift.objectId),
 * });
 * const mainSubnet = new azure.network.Subnet("main_subnet", {
 *     name: "main-subnet",
 *     resourceGroupName: exampleResourceGroup.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.0.0/23"],
 *     serviceEndpoints: [
 *         "Microsoft.Storage",
 *         "Microsoft.ContainerRegistry",
 *     ],
 * });
 * const workerSubnet = new azure.network.Subnet("worker_subnet", {
 *     name: "worker-subnet",
 *     resourceGroupName: exampleResourceGroup.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/23"],
 *     serviceEndpoints: [
 *         "Microsoft.Storage",
 *         "Microsoft.ContainerRegistry",
 *     ],
 * });
 * const exampleCluster = new azure.redhatopenshift.Cluster("example", {
 *     name: "examplearo",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     clusterProfile: {
 *         domain: "aro-example.com",
 *         version: "4.13.23",
 *     },
 *     networkProfile: {
 *         podCidr: "10.128.0.0/14",
 *         serviceCidr: "172.30.0.0/16",
 *     },
 *     mainProfile: {
 *         vmSize: "Standard_D8s_v3",
 *         subnetId: mainSubnet.id,
 *     },
 *     apiServerProfile: {
 *         visibility: "Public",
 *     },
 *     ingressProfile: {
 *         visibility: "Public",
 *     },
 *     workerProfile: {
 *         vmSize: "Standard_D4s_v3",
 *         diskSizeGb: 128,
 *         nodeCount: 3,
 *         subnetId: workerSubnet.id,
 *     },
 *     servicePrincipal: {
 *         clientId: exampleApplication.clientId,
 *         clientSecret: exampleServicePrincipalPassword.value,
 *     },
 * }, {
 *     dependsOn: [
 *         roleNetwork1,
 *         roleNetwork2,
 *     ],
 * });
 * export const consoleUrl = exampleCluster.consoleUrl;
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumi_azuread as azuread
 * example = azure.core.get_client_config()
 * example_get_client_config = azuread.get_client_config()
 * example_application = azuread.Application("example", display_name="example-aro")
 * example_service_principal = azuread.ServicePrincipal("example", client_id=example_application.client_id)
 * example_service_principal_password = azuread.ServicePrincipalPassword("example", service_principal_id=example_service_principal.object_id)
 * redhatopenshift = azuread.get_service_principal(client_id="f1dd0a37-89c6-4e07-bcd1-ffd3d43d8875")
 * example_resource_group = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West US")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="example-vnet",
 *     address_spaces=["10.0.0.0/22"],
 *     location=example_resource_group.location,
 *     resource_group_name=example_resource_group.name)
 * role_network1 = azure.authorization.Assignment("role_network1",
 *     scope=example_virtual_network.id,
 *     role_definition_name="Network Contributor",
 *     principal_id=example_service_principal.object_id)
 * role_network2 = azure.authorization.Assignment("role_network2",
 *     scope=example_virtual_network.id,
 *     role_definition_name="Network Contributor",
 *     principal_id=redhatopenshift.object_id)
 * main_subnet = azure.network.Subnet("main_subnet",
 *     name="main-subnet",
 *     resource_group_name=example_resource_group.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.0.0/23"],
 *     service_endpoints=[
 *         "Microsoft.Storage",
 *         "Microsoft.ContainerRegistry",
 *     ])
 * worker_subnet = azure.network.Subnet("worker_subnet",
 *     name="worker-subnet",
 *     resource_group_name=example_resource_group.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.2.0/23"],
 *     service_endpoints=[
 *         "Microsoft.Storage",
 *         "Microsoft.ContainerRegistry",
 *     ])
 * example_cluster = azure.redhatopenshift.Cluster("example",
 *     name="examplearo",
 *     location=example_resource_group.location,
 *     resource_group_name=example_resource_group.name,
 *     cluster_profile={
 *         "domain": "aro-example.com",
 *         "version": "4.13.23",
 *     },
 *     network_profile={
 *         "pod_cidr": "10.128.0.0/14",
 *         "service_cidr": "172.30.0.0/16",
 *     },
 *     main_profile={
 *         "vm_size": "Standard_D8s_v3",
 *         "subnet_id": main_subnet.id,
 *     },
 *     api_server_profile={
 *         "visibility": "Public",
 *     },
 *     ingress_profile={
 *         "visibility": "Public",
 *     },
 *     worker_profile={
 *         "vm_size": "Standard_D4s_v3",
 *         "disk_size_gb": 128,
 *         "node_count": 3,
 *         "subnet_id": worker_subnet.id,
 *     },
 *     service_principal={
 *         "client_id": example_application.client_id,
 *         "client_secret": example_service_principal_password.value,
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[
 *             role_network1,
 *             role_network2,
 *         ]))
 * pulumi.export("consoleUrl", example_cluster.console_url)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * using AzureAD = Pulumi.AzureAD;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = Azure.Core.GetClientConfig.Invoke();
 *     var exampleGetClientConfig = AzureAD.GetClientConfig.Invoke();
 *     var exampleApplication = new AzureAD.Application("example", new()
 *     {
 *         DisplayName = "example-aro",
 *     });
 *     var exampleServicePrincipal = new AzureAD.ServicePrincipal("example", new()
 *     {
 *         ClientId = exampleApplication.ClientId,
 *     });
 *     var exampleServicePrincipalPassword = new AzureAD.ServicePrincipalPassword("example", new()
 *     {
 *         ServicePrincipalId = exampleServicePrincipal.ObjectId,
 *     });
 *     var redhatopenshift = AzureAD.GetServicePrincipal.Invoke(new()
 *     {
 *         ClientId = "f1dd0a37-89c6-4e07-bcd1-ffd3d43d8875",
 *     });
 *     var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West US",
 *     });
 *     var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "example-vnet",
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/22",
 *         },
 *         Location = exampleResourceGroup.Location,
 *         ResourceGroupName = exampleResourceGroup.Name,
 *     });
 *     var roleNetwork1 = new Azure.Authorization.Assignment("role_network1", new()
 *     {
 *         Scope = exampleVirtualNetwork.Id,
 *         RoleDefinitionName = "Network Contributor",
 *         PrincipalId = exampleServicePrincipal.ObjectId,
 *     });
 *     var roleNetwork2 = new Azure.Authorization.Assignment("role_network2", new()
 *     {
 *         Scope = exampleVirtualNetwork.Id,
 *         RoleDefinitionName = "Network Contributor",
 *         PrincipalId = redhatopenshift.Apply(getServicePrincipalResult => getServicePrincipalResult.ObjectId),
 *     });
 *     var mainSubnet = new Azure.Network.Subnet("main_subnet", new()
 *     {
 *         Name = "main-subnet",
 *         ResourceGroupName = exampleResourceGroup.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.0.0/23",
 *         },
 *         ServiceEndpoints = new[]
 *         {
 *             "Microsoft.Storage",
 *             "Microsoft.ContainerRegistry",
 *         },
 *     });
 *     var workerSubnet = new Azure.Network.Subnet("worker_subnet", new()
 *     {
 *         Name = "worker-subnet",
 *         ResourceGroupName = exampleResourceGroup.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.2.0/23",
 *         },
 *         ServiceEndpoints = new[]
 *         {
 *             "Microsoft.Storage",
 *             "Microsoft.ContainerRegistry",
 *         },
 *     });
 *     var exampleCluster = new Azure.RedHatOpenShift.Cluster("example", new()
 *     {
 *         Name = "examplearo",
 *         Location = exampleResourceGroup.Location,
 *         ResourceGroupName = exampleResourceGroup.Name,
 *         ClusterProfile = new Azure.RedHatOpenShift.Inputs.ClusterClusterProfileArgs
 *         {
 *             Domain = "aro-example.com",
 *             Version = "4.13.23",
 *         },
 *         NetworkProfile = new Azure.RedHatOpenShift.Inputs.ClusterNetworkProfileArgs
 *         {
 *             PodCidr = "10.128.0.0/14",
 *             ServiceCidr = "172.30.0.0/16",
 *         },
 *         MainProfile = new Azure.RedHatOpenShift.Inputs.ClusterMainProfileArgs
 *         {
 *             VmSize = "Standard_D8s_v3",
 *             SubnetId = mainSubnet.Id,
 *         },
 *         ApiServerProfile = new Azure.RedHatOpenShift.Inputs.ClusterApiServerProfileArgs
 *         {
 *             Visibility = "Public",
 *         },
 *         IngressProfile = new Azure.RedHatOpenShift.Inputs.ClusterIngressProfileArgs
 *         {
 *             Visibility = "Public",
 *         },
 *         WorkerProfile = new Azure.RedHatOpenShift.Inputs.ClusterWorkerProfileArgs
 *         {
 *             VmSize = "Standard_D4s_v3",
 *             DiskSizeGb = 128,
 *             NodeCount = 3,
 *             SubnetId = workerSubnet.Id,
 *         },
 *         ServicePrincipal = new Azure.RedHatOpenShift.Inputs.ClusterServicePrincipalArgs
 *         {
 *             ClientId = exampleApplication.ClientId,
 *             ClientSecret = exampleServicePrincipalPassword.Value,
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             roleNetwork1,
 *             roleNetwork2,
 *         },
 *     });
 *     return new Dictionary
 *     {
 *         ["consoleUrl"] = exampleCluster.ConsoleUrl,
 *     };
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/redhatopenshift"
 * 	"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 {
 * 		_, err := core.GetClientConfig(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = azuread.GetClientConfig(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleApplication, err := azuread.NewApplication(ctx, "example", &azuread.ApplicationArgs{
 * 			DisplayName: pulumi.String("example-aro"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleServicePrincipal, err := azuread.NewServicePrincipal(ctx, "example", &azuread.ServicePrincipalArgs{
 * 			ClientId: exampleApplication.ClientId,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleServicePrincipalPassword, err := azuread.NewServicePrincipalPassword(ctx, "example", &azuread.ServicePrincipalPasswordArgs{
 * 			ServicePrincipalId: exampleServicePrincipal.ObjectId,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		redhatopenshift, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
 * 			ClientId: pulumi.StringRef("f1dd0a37-89c6-4e07-bcd1-ffd3d43d8875"),
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name: pulumi.String("example-vnet"),
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/22"),
 * 			},
 * 			Location:          exampleResourceGroup.Location,
 * 			ResourceGroupName: exampleResourceGroup.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		roleNetwork1, err := authorization.NewAssignment(ctx, "role_network1", &authorization.AssignmentArgs{
 * 			Scope:              exampleVirtualNetwork.ID(),
 * 			RoleDefinitionName: pulumi.String("Network Contributor"),
 * 			PrincipalId:        exampleServicePrincipal.ObjectId,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		roleNetwork2, err := authorization.NewAssignment(ctx, "role_network2", &authorization.AssignmentArgs{
 * 			Scope:              exampleVirtualNetwork.ID(),
 * 			RoleDefinitionName: pulumi.String("Network Contributor"),
 * 			PrincipalId:        pulumi.String(redhatopenshift.ObjectId),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		mainSubnet, err := network.NewSubnet(ctx, "main_subnet", &network.SubnetArgs{
 * 			Name:               pulumi.String("main-subnet"),
 * 			ResourceGroupName:  exampleResourceGroup.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/23"),
 * 			},
 * 			ServiceEndpoints: pulumi.StringArray{
 * 				pulumi.String("Microsoft.Storage"),
 * 				pulumi.String("Microsoft.ContainerRegistry"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		workerSubnet, err := network.NewSubnet(ctx, "worker_subnet", &network.SubnetArgs{
 * 			Name:               pulumi.String("worker-subnet"),
 * 			ResourceGroupName:  exampleResourceGroup.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.2.0/23"),
 * 			},
 * 			ServiceEndpoints: pulumi.StringArray{
 * 				pulumi.String("Microsoft.Storage"),
 * 				pulumi.String("Microsoft.ContainerRegistry"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleCluster, err := redhatopenshift.NewCluster(ctx, "example", &redhatopenshift.ClusterArgs{
 * 			Name:              pulumi.String("examplearo"),
 * 			Location:          exampleResourceGroup.Location,
 * 			ResourceGroupName: exampleResourceGroup.Name,
 * 			ClusterProfile: &redhatopenshift.ClusterClusterProfileArgs{
 * 				Domain:  pulumi.String("aro-example.com"),
 * 				Version: pulumi.String("4.13.23"),
 * 			},
 * 			NetworkProfile: &redhatopenshift.ClusterNetworkProfileArgs{
 * 				PodCidr:     pulumi.String("10.128.0.0/14"),
 * 				ServiceCidr: pulumi.String("172.30.0.0/16"),
 * 			},
 * 			MainProfile: &redhatopenshift.ClusterMainProfileArgs{
 * 				VmSize:   pulumi.String("Standard_D8s_v3"),
 * 				SubnetId: mainSubnet.ID(),
 * 			},
 * 			ApiServerProfile: &redhatopenshift.ClusterApiServerProfileArgs{
 * 				Visibility: pulumi.String("Public"),
 * 			},
 * 			IngressProfile: &redhatopenshift.ClusterIngressProfileArgs{
 * 				Visibility: pulumi.String("Public"),
 * 			},
 * 			WorkerProfile: &redhatopenshift.ClusterWorkerProfileArgs{
 * 				VmSize:     pulumi.String("Standard_D4s_v3"),
 * 				DiskSizeGb: pulumi.Int(128),
 * 				NodeCount:  pulumi.Int(3),
 * 				SubnetId:   workerSubnet.ID(),
 * 			},
 * 			ServicePrincipal: &redhatopenshift.ClusterServicePrincipalArgs{
 * 				ClientId:     exampleApplication.ClientId,
 * 				ClientSecret: exampleServicePrincipalPassword.Value,
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			roleNetwork1,
 * 			roleNetwork2,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		ctx.Export("consoleUrl", exampleCluster.ConsoleUrl)
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.azuread.AzureadFunctions;
 * import com.pulumi.azuread.Application;
 * import com.pulumi.azuread.ApplicationArgs;
 * import com.pulumi.azuread.ServicePrincipal;
 * import com.pulumi.azuread.ServicePrincipalArgs;
 * import com.pulumi.azuread.ServicePrincipalPassword;
 * import com.pulumi.azuread.ServicePrincipalPasswordArgs;
 * import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
 * 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.authorization.Assignment;
 * import com.pulumi.azure.authorization.AssignmentArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.redhatopenshift.Cluster;
 * import com.pulumi.azure.redhatopenshift.ClusterArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterClusterProfileArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterNetworkProfileArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterMainProfileArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterApiServerProfileArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterIngressProfileArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterWorkerProfileArgs;
 * import com.pulumi.azure.redhatopenshift.inputs.ClusterServicePrincipalArgs;
 * 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) {
 *         final var example = CoreFunctions.getClientConfig();
 *         final var exampleGetClientConfig = AzureadFunctions.getClientConfig();
 *         var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
 *             .displayName("example-aro")
 *             .build());
 *         var exampleServicePrincipal = new ServicePrincipal("exampleServicePrincipal", ServicePrincipalArgs.builder()
 *             .clientId(exampleApplication.clientId())
 *             .build());
 *         var exampleServicePrincipalPassword = new ServicePrincipalPassword("exampleServicePrincipalPassword", ServicePrincipalPasswordArgs.builder()
 *             .servicePrincipalId(exampleServicePrincipal.objectId())
 *             .build());
 *         final var redhatopenshift = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
 *             .clientId("f1dd0a37-89c6-4e07-bcd1-ffd3d43d8875")
 *             .build());
 *         var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West US")
 *             .build());
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-vnet")
 *             .addressSpaces("10.0.0.0/22")
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 *         var roleNetwork1 = new Assignment("roleNetwork1", AssignmentArgs.builder()
 *             .scope(exampleVirtualNetwork.id())
 *             .roleDefinitionName("Network Contributor")
 *             .principalId(exampleServicePrincipal.objectId())
 *             .build());
 *         var roleNetwork2 = new Assignment("roleNetwork2", AssignmentArgs.builder()
 *             .scope(exampleVirtualNetwork.id())
 *             .roleDefinitionName("Network Contributor")
 *             .principalId(redhatopenshift.applyValue(getServicePrincipalResult -> getServicePrincipalResult.objectId()))
 *             .build());
 *         var mainSubnet = new Subnet("mainSubnet", SubnetArgs.builder()
 *             .name("main-subnet")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.0.0/23")
 *             .serviceEndpoints(
 *                 "Microsoft.Storage",
 *                 "Microsoft.ContainerRegistry")
 *             .build());
 *         var workerSubnet = new Subnet("workerSubnet", SubnetArgs.builder()
 *             .name("worker-subnet")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.2.0/23")
 *             .serviceEndpoints(
 *                 "Microsoft.Storage",
 *                 "Microsoft.ContainerRegistry")
 *             .build());
 *         var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
 *             .name("examplearo")
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .clusterProfile(ClusterClusterProfileArgs.builder()
 *                 .domain("aro-example.com")
 *                 .version("4.13.23")
 *                 .build())
 *             .networkProfile(ClusterNetworkProfileArgs.builder()
 *                 .podCidr("10.128.0.0/14")
 *                 .serviceCidr("172.30.0.0/16")
 *                 .build())
 *             .mainProfile(ClusterMainProfileArgs.builder()
 *                 .vmSize("Standard_D8s_v3")
 *                 .subnetId(mainSubnet.id())
 *                 .build())
 *             .apiServerProfile(ClusterApiServerProfileArgs.builder()
 *                 .visibility("Public")
 *                 .build())
 *             .ingressProfile(ClusterIngressProfileArgs.builder()
 *                 .visibility("Public")
 *                 .build())
 *             .workerProfile(ClusterWorkerProfileArgs.builder()
 *                 .vmSize("Standard_D4s_v3")
 *                 .diskSizeGb(128)
 *                 .nodeCount(3)
 *                 .subnetId(workerSubnet.id())
 *                 .build())
 *             .servicePrincipal(ClusterServicePrincipalArgs.builder()
 *                 .clientId(exampleApplication.clientId())
 *                 .clientSecret(exampleServicePrincipalPassword.value())
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(
 *                     roleNetwork1,
 *                     roleNetwork2)
 *                 .build());
 *         ctx.export("consoleUrl", exampleCluster.consoleUrl());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleApplication:
 *     type: azuread:Application
 *     name: example
 *     properties:
 *       displayName: example-aro
 *   exampleServicePrincipal:
 *     type: azuread:ServicePrincipal
 *     name: example
 *     properties:
 *       clientId: ${exampleApplication.clientId}
 *   exampleServicePrincipalPassword:
 *     type: azuread:ServicePrincipalPassword
 *     name: example
 *     properties:
 *       servicePrincipalId: ${exampleServicePrincipal.objectId}
 *   roleNetwork1:
 *     type: azure:authorization:Assignment
 *     name: role_network1
 *     properties:
 *       scope: ${exampleVirtualNetwork.id}
 *       roleDefinitionName: Network Contributor
 *       principalId: ${exampleServicePrincipal.objectId}
 *   roleNetwork2:
 *     type: azure:authorization:Assignment
 *     name: role_network2
 *     properties:
 *       scope: ${exampleVirtualNetwork.id}
 *       roleDefinitionName: Network Contributor
 *       principalId: ${redhatopenshift.objectId}
 *   exampleResourceGroup:
 *     type: azure:core:ResourceGroup
 *     name: example
 *     properties:
 *       name: example-resources
 *       location: West US
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: example-vnet
 *       addressSpaces:
 *         - 10.0.0.0/22
 *       location: ${exampleResourceGroup.location}
 *       resourceGroupName: ${exampleResourceGroup.name}
 *   mainSubnet:
 *     type: azure:network:Subnet
 *     name: main_subnet
 *     properties:
 *       name: main-subnet
 *       resourceGroupName: ${exampleResourceGroup.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.0.0/23
 *       serviceEndpoints:
 *         - Microsoft.Storage
 *         - Microsoft.ContainerRegistry
 *   workerSubnet:
 *     type: azure:network:Subnet
 *     name: worker_subnet
 *     properties:
 *       name: worker-subnet
 *       resourceGroupName: ${exampleResourceGroup.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.2.0/23
 *       serviceEndpoints:
 *         - Microsoft.Storage
 *         - Microsoft.ContainerRegistry
 *   exampleCluster:
 *     type: azure:redhatopenshift:Cluster
 *     name: example
 *     properties:
 *       name: examplearo
 *       location: ${exampleResourceGroup.location}
 *       resourceGroupName: ${exampleResourceGroup.name}
 *       clusterProfile:
 *         domain: aro-example.com
 *         version: 4.13.23
 *       networkProfile:
 *         podCidr: 10.128.0.0/14
 *         serviceCidr: 172.30.0.0/16
 *       mainProfile:
 *         vmSize: Standard_D8s_v3
 *         subnetId: ${mainSubnet.id}
 *       apiServerProfile:
 *         visibility: Public
 *       ingressProfile:
 *         visibility: Public
 *       workerProfile:
 *         vmSize: Standard_D4s_v3
 *         diskSizeGb: 128
 *         nodeCount: 3
 *         subnetId: ${workerSubnet.id}
 *       servicePrincipal:
 *         clientId: ${exampleApplication.clientId}
 *         clientSecret: ${exampleServicePrincipalPassword.value}
 *     options:
 *       dependson:
 *         - ${roleNetwork1}
 *         - ${roleNetwork2}
 * variables:
 *   example:
 *     fn::invoke:
 *       Function: azure:core:getClientConfig
 *       Arguments: {}
 *   exampleGetClientConfig:
 *     fn::invoke:
 *       Function: azuread:getClientConfig
 *       Arguments: {}
 *   redhatopenshift:
 *     fn::invoke:
 *       Function: azuread:getServicePrincipal
 *       Arguments:
 *         clientId: f1dd0a37-89c6-4e07-bcd1-ffd3d43d8875
 * outputs:
 *   consoleUrl: ${exampleCluster.consoleUrl}
 * ```
 * 
 * ## Import
 * Red Hat OpenShift Clusters can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:redhatopenshift/cluster:Cluster cluster1 /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group1/providers/Microsoft.RedHatOpenShift/openShiftClusters/cluster1
 * ```
 * @property apiServerProfile An `api_server_profile` block as defined below. Changing this forces a new resource to be created.
 * @property clusterProfile A `cluster_profile` block as defined below. Changing this forces a new resource to be created.
 * @property ingressProfile An `ingress_profile` block as defined below. Changing this forces a new resource to be created.
 * @property location The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
 * @property mainProfile A `main_profile` block as defined below. Changing this forces a new resource to be created.
 * @property name The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
 * @property networkProfile A `network_profile` block as defined below. Changing this forces a new resource to be created.
 * @property resourceGroupName Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
 * @property servicePrincipal A `service_principal` block as defined below.
 * @property tags A mapping of tags to assign to the resource.
 * @property workerProfile A `worker_profile` block as defined below. Changing this forces a new resource to be created.
 */
public data class ClusterArgs(
    public val apiServerProfile: Output? = null,
    public val clusterProfile: Output? = null,
    public val ingressProfile: Output? = null,
    public val location: Output? = null,
    public val mainProfile: Output? = null,
    public val name: Output? = null,
    public val networkProfile: Output? = null,
    public val resourceGroupName: Output? = null,
    public val servicePrincipal: Output? = null,
    public val tags: Output>? = null,
    public val workerProfile: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.redhatopenshift.ClusterArgs =
        com.pulumi.azure.redhatopenshift.ClusterArgs.builder()
            .apiServerProfile(apiServerProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .clusterProfile(clusterProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ingressProfile(ingressProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .mainProfile(mainProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkProfile(networkProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .servicePrincipal(servicePrincipal?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workerProfile(workerProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ClusterArgs].
 */
@PulumiTagMarker
public class ClusterArgsBuilder internal constructor() {
    private var apiServerProfile: Output? = null

    private var clusterProfile: Output? = null

    private var ingressProfile: Output? = null

    private var location: Output? = null

    private var mainProfile: Output? = null

    private var name: Output? = null

    private var networkProfile: Output? = null

    private var resourceGroupName: Output? = null

    private var servicePrincipal: Output? = null

    private var tags: Output>? = null

    private var workerProfile: Output? = null

    /**
     * @param value An `api_server_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("rrayishkwbmapntx")
    public suspend fun apiServerProfile(`value`: Output) {
        this.apiServerProfile = value
    }

    /**
     * @param value A `cluster_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("yqplgapthohsadtt")
    public suspend fun clusterProfile(`value`: Output) {
        this.clusterProfile = value
    }

    /**
     * @param value An `ingress_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ugbuowbxccjlxgwl")
    public suspend fun ingressProfile(`value`: Output) {
        this.ingressProfile = value
    }

    /**
     * @param value The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
     */
    @JvmName("lkicfvykpxhcirgy")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A `main_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("udttiddrlboqyoey")
    public suspend fun mainProfile(`value`: Output) {
        this.mainProfile = value
    }

    /**
     * @param value The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
     */
    @JvmName("cnwwmntvbsslcemb")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A `network_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("kmqkfaksngtglgpu")
    public suspend fun networkProfile(`value`: Output) {
        this.networkProfile = value
    }

    /**
     * @param value Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
     */
    @JvmName("bpwnbtqylckrlhxy")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `service_principal` block as defined below.
     */
    @JvmName("ggxovpobjtoblgpl")
    public suspend fun servicePrincipal(`value`: Output) {
        this.servicePrincipal = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("bnfwgoimygomuiyo")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `worker_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("nmqxvrcsgammehal")
    public suspend fun workerProfile(`value`: Output) {
        this.workerProfile = value
    }

    /**
     * @param value An `api_server_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ajwmvxfvhvukgiac")
    public suspend fun apiServerProfile(`value`: ClusterApiServerProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiServerProfile = mapped
    }

    /**
     * @param argument An `api_server_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("lfxjleygbxljwmkp")
    public suspend fun apiServerProfile(argument: suspend ClusterApiServerProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterApiServerProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.apiServerProfile = mapped
    }

    /**
     * @param value A `cluster_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("fblqacmkqurksdah")
    public suspend fun clusterProfile(`value`: ClusterClusterProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterProfile = mapped
    }

    /**
     * @param argument A `cluster_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("xmdyaoopmyrsljfd")
    public suspend fun clusterProfile(argument: suspend ClusterClusterProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterClusterProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.clusterProfile = mapped
    }

    /**
     * @param value An `ingress_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ssignchrlbylwrsl")
    public suspend fun ingressProfile(`value`: ClusterIngressProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingressProfile = mapped
    }

    /**
     * @param argument An `ingress_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ewoebajjigvaolnb")
    public suspend fun ingressProfile(argument: suspend ClusterIngressProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterIngressProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ingressProfile = mapped
    }

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

    /**
     * @param value A `main_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("nfiepufqsswjddaq")
    public suspend fun mainProfile(`value`: ClusterMainProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mainProfile = mapped
    }

    /**
     * @param argument A `main_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("tifbvhcsqpwmfqic")
    public suspend fun mainProfile(argument: suspend ClusterMainProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterMainProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.mainProfile = mapped
    }

    /**
     * @param value The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
     */
    @JvmName("cgiunpjyxckdqmch")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A `network_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("tyxoembpmgijhhue")
    public suspend fun networkProfile(`value`: ClusterNetworkProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkProfile = mapped
    }

    /**
     * @param argument A `network_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("xxleyxiwokcuqlcr")
    public suspend fun networkProfile(argument: suspend ClusterNetworkProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterNetworkProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkProfile = mapped
    }

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

    /**
     * @param value A `service_principal` block as defined below.
     */
    @JvmName("ivhlvrbfvtaofprx")
    public suspend fun servicePrincipal(`value`: ClusterServicePrincipalArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.servicePrincipal = mapped
    }

    /**
     * @param argument A `service_principal` block as defined below.
     */
    @JvmName("gsosaohpbqwdcgmh")
    public suspend fun servicePrincipal(argument: suspend ClusterServicePrincipalArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterServicePrincipalArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.servicePrincipal = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("eubbmphsufuhklae")
    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 to assign to the resource.
     */
    @JvmName("jhwqrcxwhswadkac")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `worker_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("wflwoyhityasahuc")
    public suspend fun workerProfile(`value`: ClusterWorkerProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workerProfile = mapped
    }

    /**
     * @param argument A `worker_profile` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("rlxrryvjiytteeuu")
    public suspend fun workerProfile(argument: suspend ClusterWorkerProfileArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterWorkerProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.workerProfile = mapped
    }

    internal fun build(): ClusterArgs = ClusterArgs(
        apiServerProfile = apiServerProfile,
        clusterProfile = clusterProfile,
        ingressProfile = ingressProfile,
        location = location,
        mainProfile = mainProfile,
        name = name,
        networkProfile = networkProfile,
        resourceGroupName = resourceGroupName,
        servicePrincipal = servicePrincipal,
        tags = tags,
        workerProfile = workerProfile,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy