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

com.pulumi.azurenative.redhatopenshift.OpenShiftCluster Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.redhatopenshift;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.redhatopenshift.OpenShiftClusterArgs;
import com.pulumi.azurenative.redhatopenshift.outputs.APIServerProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.ClusterProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.ConsoleProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.IngressProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.MasterProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.NetworkProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.ServicePrincipalProfileResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.SystemDataResponse;
import com.pulumi.azurenative.redhatopenshift.outputs.WorkerProfileResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
 * Azure REST API version: 2022-09-04. Prior API version in Azure Native 1.x: 2020-04-30.
 * 
 * Other available API versions: 2023-04-01, 2023-07-01-preview, 2023-09-04, 2023-11-22.
 * 
 * ## Example Usage
 * ### Creates or updates a OpenShift cluster with the specified subscription, resource group and resource name.
 * 
 * 
 * {@code
 * 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.ConsoleProfileArgs;
 * 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.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())
 *             .consoleProfile()
 *             .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()
 *                 .podCidr("10.128.0.0/14")
 *                 .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. * * ```sh * $ pulumi import azure-native:redhatopenshift:OpenShiftCluster resourceName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName} * ``` * */ @ResourceType(type="azure-native:redhatopenshift:OpenShiftCluster") public class OpenShiftCluster extends com.pulumi.resources.CustomResource { /** * The cluster API server profile. * */ @Export(name="apiserverProfile", refs={APIServerProfileResponse.class}, tree="[0]") private Output apiserverProfile; /** * @return The cluster API server profile. * */ public Output> apiserverProfile() { return Codegen.optional(this.apiserverProfile); } /** * The cluster profile. * */ @Export(name="clusterProfile", refs={ClusterProfileResponse.class}, tree="[0]") private Output clusterProfile; /** * @return The cluster profile. * */ public Output> clusterProfile() { return Codegen.optional(this.clusterProfile); } /** * The console profile. * */ @Export(name="consoleProfile", refs={ConsoleProfileResponse.class}, tree="[0]") private Output consoleProfile; /** * @return The console profile. * */ public Output> consoleProfile() { return Codegen.optional(this.consoleProfile); } /** * The cluster ingress profiles. * */ @Export(name="ingressProfiles", refs={List.class,IngressProfileResponse.class}, tree="[0,1]") private Output> ingressProfiles; /** * @return The cluster ingress profiles. * */ public Output>> ingressProfiles() { return Codegen.optional(this.ingressProfiles); } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * The cluster master profile. * */ @Export(name="masterProfile", refs={MasterProfileResponse.class}, tree="[0]") private Output masterProfile; /** * @return The cluster master profile. * */ public Output> masterProfile() { return Codegen.optional(this.masterProfile); } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * The cluster network profile. * */ @Export(name="networkProfile", refs={NetworkProfileResponse.class}, tree="[0]") private Output networkProfile; /** * @return The cluster network profile. * */ public Output> networkProfile() { return Codegen.optional(this.networkProfile); } /** * The cluster provisioning state. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The cluster provisioning state. * */ public Output> provisioningState() { return Codegen.optional(this.provisioningState); } /** * The cluster service principal profile. * */ @Export(name="servicePrincipalProfile", refs={ServicePrincipalProfileResponse.class}, tree="[0]") private Output servicePrincipalProfile; /** * @return The cluster service principal profile. * */ public Output> servicePrincipalProfile() { return Codegen.optional(this.servicePrincipalProfile); } /** * Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * The cluster worker profiles. * */ @Export(name="workerProfiles", refs={List.class,WorkerProfileResponse.class}, tree="[0,1]") private Output> workerProfiles; /** * @return The cluster worker profiles. * */ public Output>> workerProfiles() { return Codegen.optional(this.workerProfiles); } /** * * @param name The _unique_ name of the resulting resource. */ public OpenShiftCluster(java.lang.String name) { this(name, OpenShiftClusterArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public OpenShiftCluster(java.lang.String name, OpenShiftClusterArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public OpenShiftCluster(java.lang.String name, OpenShiftClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:redhatopenshift:OpenShiftCluster", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private OpenShiftCluster(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:redhatopenshift:OpenShiftCluster", name, null, makeResourceOptions(options, id), false); } private static OpenShiftClusterArgs makeArgs(OpenShiftClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? OpenShiftClusterArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:redhatopenshift/v20200430:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20210901preview:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20220401:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20220904:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20230401:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20230701preview:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20230904:OpenShiftCluster").build()), Output.of(Alias.builder().type("azure-native:redhatopenshift/v20231122:OpenShiftCluster").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static OpenShiftCluster get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new OpenShiftCluster(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy