<reponame>lbrlabs/pulumi-ovh// *** 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 Lbrlabs.PulumiPackage.Ovh.CloudProject
{
    /// <summary>
    /// ## Import
    /// 
    /// OVHcloud Managed Kubernetes Service clusters can be imported using the `service_name` and the `id` of the cluster, separated by "/" E.g., bash
    /// 
    /// ```sh
    ///  $ pulumi import ovh:CloudProject/kube:Kube my_kube_cluster service_name/kube_id
    /// ```
    /// </summary>
    [OvhResourceType("ovh:CloudProject/kube:Kube")]
    public partial class Kube : global::Pulumi.CustomResource
    {
        /// <summary>
        /// True if control-plane is up-to-date.
        /// </summary>
        [Output("controlPlaneIsUpToDate")]
        public Output<bool> ControlPlaneIsUpToDate { get; private set; } = null!;

        /// <summary>
        /// Kubernetes API server customization
        /// </summary>
        [Output("customizationApiservers")]
        public Output<ImmutableArray<Outputs.KubeCustomizationApiserver>> CustomizationApiservers { get; private set; } = null!;

        /// <summary>
        /// Kubernetes kube-proxy customization
        /// </summary>
        [Output("customizationKubeProxy")]
        public Output<Outputs.KubeCustomizationKubeProxy?> CustomizationKubeProxy { get; private set; } = null!;

        /// <summary>
        /// **Deprecated** (Optional) Use `customization_apiserver` and `customization_kube_proxy` instead. Kubernetes cluster customization
        /// </summary>
        [Output("customizations")]
        public Output<ImmutableArray<Outputs.KubeCustomization>> Customizations { get; private set; } = null!;

        /// <summary>
        /// True if all nodes and control-plane are up-to-date.
        /// </summary>
        [Output("isUpToDate")]
        public Output<bool> IsUpToDate { get; private set; } = null!;

        /// <summary>
        /// Selected mode for kube-proxy. **Changing this value recreates the resource, including ETCD user data.** Defaults to `iptables`.
        /// </summary>
        [Output("kubeProxyMode")]
        public Output<string> KubeProxyMode { get; private set; } = null!;

        /// <summary>
        /// The kubeconfig file. Use this file to connect to your kubernetes cluster.
        /// </summary>
        [Output("kubeconfig")]
        public Output<string> Kubeconfig { get; private set; } = null!;

        /// <summary>
        /// The kubeconfig file attributes.
        /// </summary>
        [Output("kubeconfigAttributes")]
        public Output<ImmutableArray<Outputs.KubeKubeconfigAttribute>> KubeconfigAttributes { get; private set; } = null!;

        /// <summary>
        /// The name of the kubernetes cluster.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Kubernetes versions available for upgrade.
        /// </summary>
        [Output("nextUpgradeVersions")]
        public Output<ImmutableArray<string>> NextUpgradeVersions { get; private set; } = null!;

        /// <summary>
        /// Cluster nodes URL.
        /// </summary>
        [Output("nodesUrl")]
        public Output<string> NodesUrl { get; private set; } = null!;

        /// <summary>
        /// The private network configuration
        /// </summary>
        [Output("privateNetworkConfiguration")]
        public Output<Outputs.KubePrivateNetworkConfiguration?> PrivateNetworkConfiguration { get; private set; } = null!;

        /// <summary>
        /// OpenStack private network (or vRack) ID to use. **Changing this value recreates the resource, including ETCD user data.** Defaults - not use private network.
        /// </summary>
        [Output("privateNetworkId")]
        public Output<string?> PrivateNetworkId { get; private set; } = null!;

        /// <summary>
        /// a valid OVHcloud public cloud region ID in which the kubernetes cluster will be available. Ex.: "GRA1". Defaults to all public cloud regions. **Changing this value recreates the resource.**
        /// </summary>
        [Output("region")]
        public Output<string> Region { get; private set; } = null!;

        /// <summary>
        /// The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
        /// </summary>
        [Output("serviceName")]
        public Output<string> ServiceName { get; private set; } = null!;

        /// <summary>
        /// Cluster status. Should be normally set to 'READY'.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Cluster update policy. Choose between [ALWAYS_UPDATE, MINIMAL_DOWNTIME, NEVER_UPDATE].
        /// </summary>
        [Output("updatePolicy")]
        public Output<string> UpdatePolicy { get; private set; } = null!;

        /// <summary>
        /// Management URL of your cluster.
        /// </summary>
        [Output("url")]
        public Output<string> Url { get; private set; } = null!;

        /// <summary>
        /// kubernetes version to use. Changing this value updates the resource. Defaults to the latest available.
        /// </summary>
        [Output("version")]
        public Output<string> Version { get; private set; } = null!;


        /// <summary>
        /// Create a Kube 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 Kube(string name, KubeArgs args, CustomResourceOptions? options = null)
            : base("ovh:CloudProject/kube:Kube", name, args ?? new KubeArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Kube(string name, Input<string> id, KubeState? state = null, CustomResourceOptions? options = null)
            : base("ovh:CloudProject/kube:Kube", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/lbrlabs",
                AdditionalSecretOutputs =
                {
                    "kubeconfig",
                    "kubeconfigAttributes",
                },
            };
            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 Kube 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 Kube Get(string name, Input<string> id, KubeState? state = null, CustomResourceOptions? options = null)
        {
            return new Kube(name, id, state, options);
        }
    }

    public sealed class KubeArgs : global::Pulumi.ResourceArgs
    {
        [Input("customizationApiservers")]
        private InputList<Inputs.KubeCustomizationApiserverArgs>? _customizationApiservers;

        /// <summary>
        /// Kubernetes API server customization
        /// </summary>
        public InputList<Inputs.KubeCustomizationApiserverArgs> CustomizationApiservers
        {
            get => _customizationApiservers ?? (_customizationApiservers = new InputList<Inputs.KubeCustomizationApiserverArgs>());
            set => _customizationApiservers = value;
        }

        /// <summary>
        /// Kubernetes kube-proxy customization
        /// </summary>
        [Input("customizationKubeProxy")]
        public Input<Inputs.KubeCustomizationKubeProxyArgs>? CustomizationKubeProxy { get; set; }

        [Input("customizations")]
        private InputList<Inputs.KubeCustomizationArgs>? _customizations;

        /// <summary>
        /// **Deprecated** (Optional) Use `customization_apiserver` and `customization_kube_proxy` instead. Kubernetes cluster customization
        /// </summary>
        [Obsolete(@"Use customization_apiserver instead")]
        public InputList<Inputs.KubeCustomizationArgs> Customizations
        {
            get => _customizations ?? (_customizations = new InputList<Inputs.KubeCustomizationArgs>());
            set => _customizations = value;
        }

        /// <summary>
        /// Selected mode for kube-proxy. **Changing this value recreates the resource, including ETCD user data.** Defaults to `iptables`.
        /// </summary>
        [Input("kubeProxyMode")]
        public Input<string>? KubeProxyMode { get; set; }

        /// <summary>
        /// The name of the kubernetes cluster.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The private network configuration
        /// </summary>
        [Input("privateNetworkConfiguration")]
        public Input<Inputs.KubePrivateNetworkConfigurationArgs>? PrivateNetworkConfiguration { get; set; }

        /// <summary>
        /// OpenStack private network (or vRack) ID to use. **Changing this value recreates the resource, including ETCD user data.** Defaults - not use private network.
        /// </summary>
        [Input("privateNetworkId")]
        public Input<string>? PrivateNetworkId { get; set; }

        /// <summary>
        /// a valid OVHcloud public cloud region ID in which the kubernetes cluster will be available. Ex.: "GRA1". Defaults to all public cloud regions. **Changing this value recreates the resource.**
        /// </summary>
        [Input("region", required: true)]
        public Input<string> Region { get; set; } = null!;

        /// <summary>
        /// The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

        /// <summary>
        /// Cluster update policy. Choose between [ALWAYS_UPDATE, MINIMAL_DOWNTIME, NEVER_UPDATE].
        /// </summary>
        [Input("updatePolicy")]
        public Input<string>? UpdatePolicy { get; set; }

        /// <summary>
        /// kubernetes version to use. Changing this value updates the resource. Defaults to the latest available.
        /// </summary>
        [Input("version")]
        public Input<string>? Version { get; set; }

        public KubeArgs()
        {
        }
        public static new KubeArgs Empty => new KubeArgs();
    }

    public sealed class KubeState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// True if control-plane is up-to-date.
        /// </summary>
        [Input("controlPlaneIsUpToDate")]
        public Input<bool>? ControlPlaneIsUpToDate { get; set; }

        [Input("customizationApiservers")]
        private InputList<Inputs.KubeCustomizationApiserverGetArgs>? _customizationApiservers;

        /// <summary>
        /// Kubernetes API server customization
        /// </summary>
        public InputList<Inputs.KubeCustomizationApiserverGetArgs> CustomizationApiservers
        {
            get => _customizationApiservers ?? (_customizationApiservers = new InputList<Inputs.KubeCustomizationApiserverGetArgs>());
            set => _customizationApiservers = value;
        }

        /// <summary>
        /// Kubernetes kube-proxy customization
        /// </summary>
        [Input("customizationKubeProxy")]
        public Input<Inputs.KubeCustomizationKubeProxyGetArgs>? CustomizationKubeProxy { get; set; }

        [Input("customizations")]
        private InputList<Inputs.KubeCustomizationGetArgs>? _customizations;

        /// <summary>
        /// **Deprecated** (Optional) Use `customization_apiserver` and `customization_kube_proxy` instead. Kubernetes cluster customization
        /// </summary>
        [Obsolete(@"Use customization_apiserver instead")]
        public InputList<Inputs.KubeCustomizationGetArgs> Customizations
        {
            get => _customizations ?? (_customizations = new InputList<Inputs.KubeCustomizationGetArgs>());
            set => _customizations = value;
        }

        /// <summary>
        /// True if all nodes and control-plane are up-to-date.
        /// </summary>
        [Input("isUpToDate")]
        public Input<bool>? IsUpToDate { get; set; }

        /// <summary>
        /// Selected mode for kube-proxy. **Changing this value recreates the resource, including ETCD user data.** Defaults to `iptables`.
        /// </summary>
        [Input("kubeProxyMode")]
        public Input<string>? KubeProxyMode { get; set; }

        [Input("kubeconfig")]
        private Input<string>? _kubeconfig;

        /// <summary>
        /// The kubeconfig file. Use this file to connect to your kubernetes cluster.
        /// </summary>
        public Input<string>? Kubeconfig
        {
            get => _kubeconfig;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _kubeconfig = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("kubeconfigAttributes")]
        private InputList<Inputs.KubeKubeconfigAttributeGetArgs>? _kubeconfigAttributes;

        /// <summary>
        /// The kubeconfig file attributes.
        /// </summary>
        public InputList<Inputs.KubeKubeconfigAttributeGetArgs> KubeconfigAttributes
        {
            get => _kubeconfigAttributes ?? (_kubeconfigAttributes = new InputList<Inputs.KubeKubeconfigAttributeGetArgs>());
            set
            {
                var emptySecret = Output.CreateSecret(ImmutableArray.Create<Inputs.KubeKubeconfigAttributeGetArgs>());
                _kubeconfigAttributes = Output.All(value, emptySecret).Apply(v => v[0]);
            }
        }

        /// <summary>
        /// The name of the kubernetes cluster.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("nextUpgradeVersions")]
        private InputList<string>? _nextUpgradeVersions;

        /// <summary>
        /// Kubernetes versions available for upgrade.
        /// </summary>
        public InputList<string> NextUpgradeVersions
        {
            get => _nextUpgradeVersions ?? (_nextUpgradeVersions = new InputList<string>());
            set => _nextUpgradeVersions = value;
        }

        /// <summary>
        /// Cluster nodes URL.
        /// </summary>
        [Input("nodesUrl")]
        public Input<string>? NodesUrl { get; set; }

        /// <summary>
        /// The private network configuration
        /// </summary>
        [Input("privateNetworkConfiguration")]
        public Input<Inputs.KubePrivateNetworkConfigurationGetArgs>? PrivateNetworkConfiguration { get; set; }

        /// <summary>
        /// OpenStack private network (or vRack) ID to use. **Changing this value recreates the resource, including ETCD user data.** Defaults - not use private network.
        /// </summary>
        [Input("privateNetworkId")]
        public Input<string>? PrivateNetworkId { get; set; }

        /// <summary>
        /// a valid OVHcloud public cloud region ID in which the kubernetes cluster will be available. Ex.: "GRA1". Defaults to all public cloud regions. **Changing this value recreates the resource.**
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

        /// <summary>
        /// The id of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. **Changing this value recreates the resource.**
        /// </summary>
        [Input("serviceName")]
        public Input<string>? ServiceName { get; set; }

        /// <summary>
        /// Cluster status. Should be normally set to 'READY'.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Cluster update policy. Choose between [ALWAYS_UPDATE, MINIMAL_DOWNTIME, NEVER_UPDATE].
        /// </summary>
        [Input("updatePolicy")]
        public Input<string>? UpdatePolicy { get; set; }

        /// <summary>
        /// Management URL of your cluster.
        /// </summary>
        [Input("url")]
        public Input<string>? Url { get; set; }

        /// <summary>
        /// kubernetes version to use. Changing this value updates the resource. Defaults to the latest available.
        /// </summary>
        [Input("version")]
        public Input<string>? Version { get; set; }

        public KubeState()
        {
        }
        public static new KubeState Empty => new KubeState();
    }
}
