// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace PiersKarsenbarg.Nutanix
{
    /// <summary>
    /// Provides a Nutanix Karbon Cluster resource to Create a k8s cluster.
    /// 
    /// **Note:** Minimum tested version is Karbon 2.2
    /// 
    /// **Note:** Kubernetes and Node OS upgrades are not supported using this provider.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var exampleCluster = new Nutanix.KarbonCluster("exampleCluster", new Nutanix.KarbonClusterArgs
    ///         {
    ///             CniConfig = new Nutanix.Inputs.KarbonClusterCniConfigArgs
    ///             {
    ///                 NodeCidrMaskSize = 24,
    ///                 PodIpv4Cidr = "172.20.0.0/16",
    ///                 ServiceIpv4Cidr = "172.19.0.0/16",
    ///             },
    ///             EtcdNodePool = new Nutanix.Inputs.KarbonClusterEtcdNodePoolArgs
    ///             {
    ///                 AhvConfig = new Nutanix.Inputs.KarbonClusterEtcdNodePoolAhvConfigArgs
    ///                 {
    ///                     NetworkUuid = "my_subnet_id",
    ///                     PrismElementClusterUuid = "my_pe_cluster_uuid",
    ///                 },
    ///                 NodeOsVersion = "ntnx-1.0",
    ///                 NumInstances = 1,
    ///             },
    ///             MasterNodePool = new Nutanix.Inputs.KarbonClusterMasterNodePoolArgs
    ///             {
    ///                 AhvConfig = new Nutanix.Inputs.KarbonClusterMasterNodePoolAhvConfigArgs
    ///                 {
    ///                     NetworkUuid = "my_subnet_id",
    ///                     PrismElementClusterUuid = "my_pe_cluster_uuid",
    ///                 },
    ///                 NodeOsVersion = "ntnx-1.0",
    ///                 NumInstances = 1,
    ///             },
    ///             StorageClassConfig = new Nutanix.Inputs.KarbonClusterStorageClassConfigArgs
    ///             {
    ///                 ReclaimPolicy = "Delete",
    ///                 VolumesConfig = new Nutanix.Inputs.KarbonClusterStorageClassConfigVolumesConfigArgs
    ///                 {
    ///                     FileSystem = "ext4",
    ///                     FlashMode = false,
    ///                     Password = "my_pe_pw",
    ///                     PrismElementClusterUuid = "my_pe_cluster_uuid",
    ///                     StorageContainer = "my_storage_container_name",
    ///                     Username = "my_pe_username",
    ///                 },
    ///             },
    ///             Version = "1.18.15-1",
    ///             WorkerNodePool = new Nutanix.Inputs.KarbonClusterWorkerNodePoolArgs
    ///             {
    ///                 AhvConfig = new Nutanix.Inputs.KarbonClusterWorkerNodePoolAhvConfigArgs
    ///                 {
    ///                     NetworkUuid = "my_subnet_id",
    ///                     PrismElementClusterUuid = "my_pe_cluster_uuid",
    ///                 },
    ///                 NodeOsVersion = "ntnx-1.0",
    ///                 NumInstances = 1,
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [NutanixResourceType("nutanix:index/karbonCluster:KarbonCluster")]
    public partial class KarbonCluster : Pulumi.CustomResource
    {
        [Output("activePassiveConfig")]
        public Output<Outputs.KarbonClusterActivePassiveConfig?> ActivePassiveConfig { get; private set; } = null!;

        [Output("cniConfig")]
        public Output<Outputs.KarbonClusterCniConfig> CniConfig { get; private set; } = null!;

        [Output("deploymentType")]
        public Output<string> DeploymentType { get; private set; } = null!;

        [Output("etcdNodePool")]
        public Output<Outputs.KarbonClusterEtcdNodePool> EtcdNodePool { get; private set; } = null!;

        [Output("externalLbConfig")]
        public Output<Outputs.KarbonClusterExternalLbConfig?> ExternalLbConfig { get; private set; } = null!;

        [Output("kubeapiServerIpv4Address")]
        public Output<string> KubeapiServerIpv4Address { get; private set; } = null!;

        [Output("masterNodePool")]
        public Output<Outputs.KarbonClusterMasterNodePool> MasterNodePool { get; private set; } = null!;

        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        [Output("privateRegistries")]
        public Output<ImmutableArray<Outputs.KarbonClusterPrivateRegistry>> PrivateRegistries { get; private set; } = null!;

        [Output("singleMasterConfig")]
        public Output<Outputs.KarbonClusterSingleMasterConfig?> SingleMasterConfig { get; private set; } = null!;

        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        [Output("storageClassConfig")]
        public Output<Outputs.KarbonClusterStorageClassConfig> StorageClassConfig { get; private set; } = null!;

        [Output("version")]
        public Output<string> Version { get; private set; } = null!;

        [Output("waitTimeoutMinutes")]
        public Output<int?> WaitTimeoutMinutes { get; private set; } = null!;

        [Output("workerNodePool")]
        public Output<Outputs.KarbonClusterWorkerNodePool> WorkerNodePool { get; private set; } = null!;


        /// <summary>
        /// Create a KarbonCluster resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public KarbonCluster(string name, KarbonClusterArgs args, CustomResourceOptions? options = null)
            : base("nutanix:index/karbonCluster:KarbonCluster", name, args ?? new KarbonClusterArgs(), MakeResourceOptions(options, ""))
        {
        }

        private KarbonCluster(string name, Input<string> id, KarbonClusterState? state = null, CustomResourceOptions? options = null)
            : base("nutanix:index/karbonCluster:KarbonCluster", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/pierskarsenbarg/pulumi-nutanix/releases/download/${VERSION}",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing KarbonCluster resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static KarbonCluster Get(string name, Input<string> id, KarbonClusterState? state = null, CustomResourceOptions? options = null)
        {
            return new KarbonCluster(name, id, state, options);
        }
    }

    public sealed class KarbonClusterArgs : Pulumi.ResourceArgs
    {
        [Input("activePassiveConfig")]
        public Input<Inputs.KarbonClusterActivePassiveConfigArgs>? ActivePassiveConfig { get; set; }

        [Input("cniConfig", required: true)]
        public Input<Inputs.KarbonClusterCniConfigArgs> CniConfig { get; set; } = null!;

        [Input("etcdNodePool", required: true)]
        public Input<Inputs.KarbonClusterEtcdNodePoolArgs> EtcdNodePool { get; set; } = null!;

        [Input("externalLbConfig")]
        public Input<Inputs.KarbonClusterExternalLbConfigArgs>? ExternalLbConfig { get; set; }

        [Input("masterNodePool", required: true)]
        public Input<Inputs.KarbonClusterMasterNodePoolArgs> MasterNodePool { get; set; } = null!;

        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("privateRegistries")]
        private InputList<Inputs.KarbonClusterPrivateRegistryArgs>? _privateRegistries;
        public InputList<Inputs.KarbonClusterPrivateRegistryArgs> PrivateRegistries
        {
            get => _privateRegistries ?? (_privateRegistries = new InputList<Inputs.KarbonClusterPrivateRegistryArgs>());
            set => _privateRegistries = value;
        }

        [Input("singleMasterConfig")]
        public Input<Inputs.KarbonClusterSingleMasterConfigArgs>? SingleMasterConfig { get; set; }

        [Input("storageClassConfig", required: true)]
        public Input<Inputs.KarbonClusterStorageClassConfigArgs> StorageClassConfig { get; set; } = null!;

        [Input("version", required: true)]
        public Input<string> Version { get; set; } = null!;

        [Input("waitTimeoutMinutes")]
        public Input<int>? WaitTimeoutMinutes { get; set; }

        [Input("workerNodePool", required: true)]
        public Input<Inputs.KarbonClusterWorkerNodePoolArgs> WorkerNodePool { get; set; } = null!;

        public KarbonClusterArgs()
        {
        }
    }

    public sealed class KarbonClusterState : Pulumi.ResourceArgs
    {
        [Input("activePassiveConfig")]
        public Input<Inputs.KarbonClusterActivePassiveConfigGetArgs>? ActivePassiveConfig { get; set; }

        [Input("cniConfig")]
        public Input<Inputs.KarbonClusterCniConfigGetArgs>? CniConfig { get; set; }

        [Input("deploymentType")]
        public Input<string>? DeploymentType { get; set; }

        [Input("etcdNodePool")]
        public Input<Inputs.KarbonClusterEtcdNodePoolGetArgs>? EtcdNodePool { get; set; }

        [Input("externalLbConfig")]
        public Input<Inputs.KarbonClusterExternalLbConfigGetArgs>? ExternalLbConfig { get; set; }

        [Input("kubeapiServerIpv4Address")]
        public Input<string>? KubeapiServerIpv4Address { get; set; }

        [Input("masterNodePool")]
        public Input<Inputs.KarbonClusterMasterNodePoolGetArgs>? MasterNodePool { get; set; }

        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("privateRegistries")]
        private InputList<Inputs.KarbonClusterPrivateRegistryGetArgs>? _privateRegistries;
        public InputList<Inputs.KarbonClusterPrivateRegistryGetArgs> PrivateRegistries
        {
            get => _privateRegistries ?? (_privateRegistries = new InputList<Inputs.KarbonClusterPrivateRegistryGetArgs>());
            set => _privateRegistries = value;
        }

        [Input("singleMasterConfig")]
        public Input<Inputs.KarbonClusterSingleMasterConfigGetArgs>? SingleMasterConfig { get; set; }

        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("storageClassConfig")]
        public Input<Inputs.KarbonClusterStorageClassConfigGetArgs>? StorageClassConfig { get; set; }

        [Input("version")]
        public Input<string>? Version { get; set; }

        [Input("waitTimeoutMinutes")]
        public Input<int>? WaitTimeoutMinutes { get; set; }

        [Input("workerNodePool")]
        public Input<Inputs.KarbonClusterWorkerNodePoolGetArgs>? WorkerNodePool { get; set; }

        public KarbonClusterState()
        {
        }
    }
}
