OpenShiftCluster

class OpenShiftCluster : KotlinCustomResource

OpenShiftCluster represents an Azure Red Hat OpenShift cluster. Uses Azure REST API version 2023-11-22. In version 2.x of the Azure Native provider, it used API version 2022-09-04. Other available API versions: 2022-09-04, 2023-04-01, 2023-07-01-preview, 2023-09-04, 2024-08-12-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native redhatopenshift [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Creates or updates a OpenShift cluster with the specified subscription, resource group and resource name.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var openShiftCluster = new AzureNative.RedHatOpenShift.OpenShiftCluster("openShiftCluster", new()
{
ApiserverProfile = new AzureNative.RedHatOpenShift.Inputs.APIServerProfileArgs
{
Visibility = AzureNative.RedHatOpenShift.Visibility.Public,
},
ClusterProfile = new AzureNative.RedHatOpenShift.Inputs.ClusterProfileArgs
{
Domain = "cluster.location.aroapp.io",
FipsValidatedModules = AzureNative.RedHatOpenShift.FipsValidatedModules.Enabled,
PullSecret = "{\"auths\":{\"registry.connect.redhat.com\":{\"auth\":\"\"},\"registry.redhat.io\":{\"auth\":\"\"}}}",
ResourceGroupId = "/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup",
},
IngressProfiles = new[]
{
new AzureNative.RedHatOpenShift.Inputs.IngressProfileArgs
{
Name = "default",
Visibility = AzureNative.RedHatOpenShift.Visibility.Public,
},
},
Location = "location",
MasterProfile = new AzureNative.RedHatOpenShift.Inputs.MasterProfileArgs
{
EncryptionAtHost = AzureNative.RedHatOpenShift.EncryptionAtHost.Enabled,
SubnetId = "/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master",
VmSize = "Standard_D8s_v3",
},
NetworkProfile = new AzureNative.RedHatOpenShift.Inputs.NetworkProfileArgs
{
LoadBalancerProfile = new AzureNative.RedHatOpenShift.Inputs.LoadBalancerProfileArgs
{
ManagedOutboundIps = new AzureNative.RedHatOpenShift.Inputs.ManagedOutboundIPsArgs
{
Count = 1,
},
},
PodCidr = "10.128.0.0/14",
PreconfiguredNSG = AzureNative.RedHatOpenShift.PreconfiguredNSG.Disabled,
ServiceCidr = "172.30.0.0/16",
},
ResourceGroupName = "resourceGroup",
ResourceName = "resourceName",
ServicePrincipalProfile = new AzureNative.RedHatOpenShift.Inputs.ServicePrincipalProfileArgs
{
ClientId = "clientId",
ClientSecret = "clientSecret",
},
Tags =
{
{ "key", "value" },
},
WorkerProfiles = new[]
{
new AzureNative.RedHatOpenShift.Inputs.WorkerProfileArgs
{
Count = 3,
DiskSizeGB = 128,
Name = "worker",
SubnetId = "/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker",
VmSize = "Standard_D2s_v3",
},
},
});
});
package main
import (
redhatopenshift "github.com/pulumi/pulumi-azure-native-sdk/redhatopenshift/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := redhatopenshift.NewOpenShiftCluster(ctx, "openShiftCluster", &redhatopenshift.OpenShiftClusterArgs{
ApiserverProfile: &redhatopenshift.APIServerProfileArgs{
Visibility: pulumi.String(redhatopenshift.VisibilityPublic),
},
ClusterProfile: &redhatopenshift.ClusterProfileArgs{
Domain: pulumi.String("cluster.location.aroapp.io"),
FipsValidatedModules: pulumi.String(redhatopenshift.FipsValidatedModulesEnabled),
PullSecret: pulumi.String("{\"auths\":{\"registry.connect.redhat.com\":{\"auth\":\"\"},\"registry.redhat.io\":{\"auth\":\"\"}}}"),
ResourceGroupId: pulumi.String("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup"),
},
IngressProfiles: redhatopenshift.IngressProfileArray{
&redhatopenshift.IngressProfileArgs{
Name: pulumi.String("default"),
Visibility: pulumi.String(redhatopenshift.VisibilityPublic),
},
},
Location: pulumi.String("location"),
MasterProfile: &redhatopenshift.MasterProfileArgs{
EncryptionAtHost: pulumi.String(redhatopenshift.EncryptionAtHostEnabled),
SubnetId: pulumi.String("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master"),
VmSize: pulumi.String("Standard_D8s_v3"),
},
NetworkProfile: &redhatopenshift.NetworkProfileArgs{
LoadBalancerProfile: &redhatopenshift.LoadBalancerProfileArgs{
ManagedOutboundIps: &redhatopenshift.ManagedOutboundIPsArgs{
Count: pulumi.Int(1),
},
},
PodCidr: pulumi.String("10.128.0.0/14"),
PreconfiguredNSG: pulumi.String(redhatopenshift.PreconfiguredNSGDisabled),
ServiceCidr: pulumi.String("172.30.0.0/16"),
},
ResourceGroupName: pulumi.String("resourceGroup"),
ResourceName: pulumi.String("resourceName"),
ServicePrincipalProfile: &redhatopenshift.ServicePrincipalProfileArgs{
ClientId: pulumi.String("clientId"),
ClientSecret: pulumi.String("clientSecret"),
},
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
WorkerProfiles: redhatopenshift.WorkerProfileArray{
&redhatopenshift.WorkerProfileArgs{
Count: pulumi.Int(3),
DiskSizeGB: pulumi.Int(128),
Name: pulumi.String("worker"),
SubnetId: pulumi.String("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker"),
VmSize: pulumi.String("Standard_D2s_v3"),
},
},
})
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.azurenative.redhatopenshift.OpenShiftCluster;
import com.pulumi.azurenative.redhatopenshift.OpenShiftClusterArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.APIServerProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.ClusterProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.IngressProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.MasterProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.NetworkProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.LoadBalancerProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.ManagedOutboundIPsArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.ServicePrincipalProfileArgs;
import com.pulumi.azurenative.redhatopenshift.inputs.WorkerProfileArgs;
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 openShiftCluster = new OpenShiftCluster("openShiftCluster", OpenShiftClusterArgs.builder()
.apiserverProfile(APIServerProfileArgs.builder()
.visibility("Public")
.build())
.clusterProfile(ClusterProfileArgs.builder()
.domain("cluster.location.aroapp.io")
.fipsValidatedModules("Enabled")
.pullSecret("{\"auths\":{\"registry.connect.redhat.com\":{\"auth\":\"\"},\"registry.redhat.io\":{\"auth\":\"\"}}}")
.resourceGroupId("/subscriptions/subscriptionId/resourceGroups/clusterResourceGroup")
.build())
.ingressProfiles(IngressProfileArgs.builder()
.name("default")
.visibility("Public")
.build())
.location("location")
.masterProfile(MasterProfileArgs.builder()
.encryptionAtHost("Enabled")
.subnetId("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/master")
.vmSize("Standard_D8s_v3")
.build())
.networkProfile(NetworkProfileArgs.builder()
.loadBalancerProfile(LoadBalancerProfileArgs.builder()
.managedOutboundIps(ManagedOutboundIPsArgs.builder()
.count(1)
.build())
.build())
.podCidr("10.128.0.0/14")
.preconfiguredNSG("Disabled")
.serviceCidr("172.30.0.0/16")
.build())
.resourceGroupName("resourceGroup")
.resourceName("resourceName")
.servicePrincipalProfile(ServicePrincipalProfileArgs.builder()
.clientId("clientId")
.clientSecret("clientSecret")
.build())
.tags(Map.of("key", "value"))
.workerProfiles(WorkerProfileArgs.builder()
.count(3)
.diskSizeGB(128)
.name("worker")
.subnetId("/subscriptions/subscriptionId/resourceGroups/vnetResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet/subnets/worker")
.vmSize("Standard_D2s_v3")
.build())
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:redhatopenshift:OpenShiftCluster resourceName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}

Properties

Link copied to clipboard

The cluster API server profile.

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

The cluster profile.

Link copied to clipboard

The console profile.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The cluster ingress profiles.

Link copied to clipboard
val location: Output<String>

The geo-location where the resource lives

Link copied to clipboard

The cluster master profile.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

The cluster network profile.

Link copied to clipboard

The cluster provisioning state.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The cluster service principal profile.

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The cluster worker profiles.

Link copied to clipboard

The cluster worker profiles status.