<gh_stars>0// *** 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 TencentCloudIAC.PulumiPackage.Tencentcloud.Tsf
{
    /// <summary>
    /// Provides a resource to create a tsf cluster
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var cluster = new Tencentcloud.Tsf.Cluster("cluster", new Tencentcloud.Tsf.ClusterArgs
    ///         {
    ///             ClusterCidr = "9.165.120.0/24",
    ///             ClusterDesc = "test",
    ///             ClusterName = "terraform-test",
    ///             ClusterType = "C",
    ///             ClusterVersion = "1.18.4",
    ///             MaxClusterServiceNum = 128,
    ///             MaxNodePodNum = 32,
    ///             Tags = 
    ///             {
    ///                 { "createdBy", "terraform" },
    ///             },
    ///             TsfRegionId = "ap-guangzhou",
    ///             VpcId = "vpc-xxxxxx",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tsf/cluster:Cluster")]
    public partial class Cluster : Pulumi.CustomResource
    {
        /// <summary>
        /// Abnormal number of deployment groups.
        /// </summary>
        [Output("abnormalGroupCount")]
        public Output<int> AbnormalGroupCount { get; private set; } = null!;

        /// <summary>
        /// CIDR assigned to cluster containers and service IP.
        /// </summary>
        [Output("clusterCidr")]
        public Output<string?> ClusterCidr { get; private set; } = null!;

        /// <summary>
        /// cluster notes.
        /// </summary>
        [Output("clusterDesc")]
        public Output<string?> ClusterDesc { get; private set; } = null!;

        /// <summary>
        /// Cluster ID.
        /// </summary>
        [Output("clusterId")]
        public Output<string> ClusterId { get; private set; } = null!;

        /// <summary>
        /// Cluster remaining cpu limit.
        /// </summary>
        [Output("clusterLimitCpu")]
        public Output<string> ClusterLimitCpu { get; private set; } = null!;

        /// <summary>
        /// Cluster remaining memory limit.
        /// </summary>
        [Output("clusterLimitMem")]
        public Output<string> ClusterLimitMem { get; private set; } = null!;

        /// <summary>
        /// Cluster name.
        /// </summary>
        [Output("clusterName")]
        public Output<string> ClusterName { get; private set; } = null!;

        /// <summary>
        /// cluster remark name.
        /// </summary>
        [Output("clusterRemarkName")]
        public Output<string> ClusterRemarkName { get; private set; } = null!;

        /// <summary>
        /// cluster status.
        /// </summary>
        [Output("clusterStatus")]
        public Output<string> ClusterStatus { get; private set; } = null!;

        /// <summary>
        /// The total CPU of the cluster, unit: core.
        /// </summary>
        [Output("clusterTotalCpu")]
        public Output<double> ClusterTotalCpu { get; private set; } = null!;

        /// <summary>
        /// The total memory of the cluster, unit: G.
        /// </summary>
        [Output("clusterTotalMem")]
        public Output<double> ClusterTotalMem { get; private set; } = null!;

        /// <summary>
        /// Cluster type.
        /// </summary>
        [Output("clusterType")]
        public Output<string> ClusterType { get; private set; } = null!;

        /// <summary>
        /// CPU used by the cluster, unit: core.
        /// </summary>
        [Output("clusterUsedCpu")]
        public Output<double> ClusterUsedCpu { get; private set; } = null!;

        /// <summary>
        /// The memory used by the cluster, unit: G.
        /// </summary>
        [Output("clusterUsedMem")]
        public Output<double> ClusterUsedMem { get; private set; } = null!;

        /// <summary>
        /// cluster version.
        /// </summary>
        [Output("clusterVersion")]
        public Output<string?> ClusterVersion { get; private set; } = null!;

        /// <summary>
        /// Create time.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Delete flag: `true`: can be deleted; `false`: can not be deleted.
        /// </summary>
        [Output("deleteFlag")]
        public Output<bool> DeleteFlag { get; private set; } = null!;

        /// <summary>
        /// Reasons why clusters cannot be deleted.
        /// </summary>
        [Output("deleteFlagReason")]
        public Output<string> DeleteFlagReason { get; private set; } = null!;

        /// <summary>
        /// Total number of deployment groups.
        /// </summary>
        [Output("groupCount")]
        public Output<int> GroupCount { get; private set; } = null!;

        /// <summary>
        /// Number of cluster machine instances.
        /// </summary>
        [Output("instanceCount")]
        public Output<int> InstanceCount { get; private set; } = null!;

        /// <summary>
        /// api address.
        /// </summary>
        [Output("kuberneteApiServer")]
        public Output<string?> KuberneteApiServer { get; private set; } = null!;

        /// <summary>
        /// native secret.
        /// </summary>
        [Output("kuberneteNativeSecret")]
        public Output<string?> KuberneteNativeSecret { get; private set; } = null!;

        /// <summary>
        /// `K`:kubeconfig, `S`:service account.
        /// </summary>
        [Output("kuberneteNativeType")]
        public Output<string?> KuberneteNativeType { get; private set; } = null!;

        /// <summary>
        /// The maximum number of services in the cluster. The value ranges from 32 to 32768. If it is not a power of 2, the nearest power of 2 will be taken up.
        /// </summary>
        [Output("maxClusterServiceNum")]
        public Output<int?> MaxClusterServiceNum { get; private set; } = null!;

        /// <summary>
        /// The maximum number of Pods on each Node in the cluster. The value ranges from 4 to 256. When the value is not a power of 2, the nearest power of 2 will be taken up.
        /// </summary>
        [Output("maxNodePodNum")]
        public Output<int?> MaxNodePodNum { get; private set; } = null!;

        /// <summary>
        /// The number of machine instances in the normal state of the cluster.
        /// </summary>
        [Output("normalInstanceCount")]
        public Output<int> NormalInstanceCount { get; private set; } = null!;

        /// <summary>
        /// Control information for buttons on the front end.
        /// </summary>
        [Output("operationInfos")]
        public Output<ImmutableArray<Outputs.ClusterOperationInfo>> OperationInfos { get; private set; } = null!;

        /// <summary>
        /// The dataset ID to be bound.
        /// </summary>
        [Output("programId")]
        public Output<string?> ProgramId { get; private set; } = null!;

        /// <summary>
        /// Program id list.
        /// </summary>
        [Output("programIdLists")]
        public Output<ImmutableArray<string>> ProgramIdLists { get; private set; } = null!;

        /// <summary>
        /// Number of Deployment Groups in progress.
        /// </summary>
        [Output("runGroupCount")]
        public Output<int> RunGroupCount { get; private set; } = null!;

        /// <summary>
        /// Number of machine instances running in the cluster.
        /// </summary>
        [Output("runInstanceCount")]
        public Output<int> RunInstanceCount { get; private set; } = null!;

        /// <summary>
        /// Number of running service instances.
        /// </summary>
        [Output("runServiceInstanceCount")]
        public Output<int> RunServiceInstanceCount { get; private set; } = null!;

        /// <summary>
        /// Number of deployment groups in stop.
        /// </summary>
        [Output("stopGroupCount")]
        public Output<int> StopGroupCount { get; private set; } = null!;

        /// <summary>
        /// Subnet id.
        /// </summary>
        [Output("subnetId")]
        public Output<string?> SubnetId { get; private set; } = null!;

        /// <summary>
        /// Tag description list.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The TSF region to which the cluster belongs.
        /// </summary>
        [Output("tsfRegionId")]
        public Output<string?> TsfRegionId { get; private set; } = null!;

        /// <summary>
        /// Name of the TSF region to which the cluster belongs.
        /// </summary>
        [Output("tsfRegionName")]
        public Output<string> TsfRegionName { get; private set; } = null!;

        /// <summary>
        /// The TSF availability zone to which the cluster belongs.
        /// </summary>
        [Output("tsfZoneId")]
        public Output<string?> TsfZoneId { get; private set; } = null!;

        /// <summary>
        /// The name of the TSF availability zone to which the cluster belongs.
        /// </summary>
        [Output("tsfZoneName")]
        public Output<string> TsfZoneName { get; private set; } = null!;

        /// <summary>
        /// Update time.
        /// </summary>
        [Output("updateTime")]
        public Output<string> UpdateTime { get; private set; } = null!;

        /// <summary>
        /// Vpc id.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;


        /// <summary>
        /// Create a Cluster 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 Cluster(string name, ClusterArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Tsf/cluster:Cluster", name, args ?? new ClusterArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Cluster(string name, Input<string> id, ClusterState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Tsf/cluster:Cluster", 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/tencentcloudstack",
            };
            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 Cluster 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 Cluster Get(string name, Input<string> id, ClusterState? state = null, CustomResourceOptions? options = null)
        {
            return new Cluster(name, id, state, options);
        }
    }

    public sealed class ClusterArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// CIDR assigned to cluster containers and service IP.
        /// </summary>
        [Input("clusterCidr")]
        public Input<string>? ClusterCidr { get; set; }

        /// <summary>
        /// cluster notes.
        /// </summary>
        [Input("clusterDesc")]
        public Input<string>? ClusterDesc { get; set; }

        /// <summary>
        /// Cluster name.
        /// </summary>
        [Input("clusterName", required: true)]
        public Input<string> ClusterName { get; set; } = null!;

        /// <summary>
        /// cluster remark name.
        /// </summary>
        [Input("clusterRemarkName")]
        public Input<string>? ClusterRemarkName { get; set; }

        /// <summary>
        /// Cluster type.
        /// </summary>
        [Input("clusterType", required: true)]
        public Input<string> ClusterType { get; set; } = null!;

        /// <summary>
        /// cluster version.
        /// </summary>
        [Input("clusterVersion")]
        public Input<string>? ClusterVersion { get; set; }

        /// <summary>
        /// api address.
        /// </summary>
        [Input("kuberneteApiServer")]
        public Input<string>? KuberneteApiServer { get; set; }

        /// <summary>
        /// native secret.
        /// </summary>
        [Input("kuberneteNativeSecret")]
        public Input<string>? KuberneteNativeSecret { get; set; }

        /// <summary>
        /// `K`:kubeconfig, `S`:service account.
        /// </summary>
        [Input("kuberneteNativeType")]
        public Input<string>? KuberneteNativeType { get; set; }

        /// <summary>
        /// The maximum number of services in the cluster. The value ranges from 32 to 32768. If it is not a power of 2, the nearest power of 2 will be taken up.
        /// </summary>
        [Input("maxClusterServiceNum")]
        public Input<int>? MaxClusterServiceNum { get; set; }

        /// <summary>
        /// The maximum number of Pods on each Node in the cluster. The value ranges from 4 to 256. When the value is not a power of 2, the nearest power of 2 will be taken up.
        /// </summary>
        [Input("maxNodePodNum")]
        public Input<int>? MaxNodePodNum { get; set; }

        /// <summary>
        /// The dataset ID to be bound.
        /// </summary>
        [Input("programId")]
        public Input<string>? ProgramId { get; set; }

        [Input("programIdLists")]
        private InputList<string>? _programIdLists;

        /// <summary>
        /// Program id list.
        /// </summary>
        public InputList<string> ProgramIdLists
        {
            get => _programIdLists ?? (_programIdLists = new InputList<string>());
            set => _programIdLists = value;
        }

        /// <summary>
        /// Subnet id.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The TSF region to which the cluster belongs.
        /// </summary>
        [Input("tsfRegionId")]
        public Input<string>? TsfRegionId { get; set; }

        /// <summary>
        /// The TSF availability zone to which the cluster belongs.
        /// </summary>
        [Input("tsfZoneId")]
        public Input<string>? TsfZoneId { get; set; }

        /// <summary>
        /// Vpc id.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        public ClusterArgs()
        {
        }
    }

    public sealed class ClusterState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Abnormal number of deployment groups.
        /// </summary>
        [Input("abnormalGroupCount")]
        public Input<int>? AbnormalGroupCount { get; set; }

        /// <summary>
        /// CIDR assigned to cluster containers and service IP.
        /// </summary>
        [Input("clusterCidr")]
        public Input<string>? ClusterCidr { get; set; }

        /// <summary>
        /// cluster notes.
        /// </summary>
        [Input("clusterDesc")]
        public Input<string>? ClusterDesc { get; set; }

        /// <summary>
        /// Cluster ID.
        /// </summary>
        [Input("clusterId")]
        public Input<string>? ClusterId { get; set; }

        /// <summary>
        /// Cluster remaining cpu limit.
        /// </summary>
        [Input("clusterLimitCpu")]
        public Input<string>? ClusterLimitCpu { get; set; }

        /// <summary>
        /// Cluster remaining memory limit.
        /// </summary>
        [Input("clusterLimitMem")]
        public Input<string>? ClusterLimitMem { get; set; }

        /// <summary>
        /// Cluster name.
        /// </summary>
        [Input("clusterName")]
        public Input<string>? ClusterName { get; set; }

        /// <summary>
        /// cluster remark name.
        /// </summary>
        [Input("clusterRemarkName")]
        public Input<string>? ClusterRemarkName { get; set; }

        /// <summary>
        /// cluster status.
        /// </summary>
        [Input("clusterStatus")]
        public Input<string>? ClusterStatus { get; set; }

        /// <summary>
        /// The total CPU of the cluster, unit: core.
        /// </summary>
        [Input("clusterTotalCpu")]
        public Input<double>? ClusterTotalCpu { get; set; }

        /// <summary>
        /// The total memory of the cluster, unit: G.
        /// </summary>
        [Input("clusterTotalMem")]
        public Input<double>? ClusterTotalMem { get; set; }

        /// <summary>
        /// Cluster type.
        /// </summary>
        [Input("clusterType")]
        public Input<string>? ClusterType { get; set; }

        /// <summary>
        /// CPU used by the cluster, unit: core.
        /// </summary>
        [Input("clusterUsedCpu")]
        public Input<double>? ClusterUsedCpu { get; set; }

        /// <summary>
        /// The memory used by the cluster, unit: G.
        /// </summary>
        [Input("clusterUsedMem")]
        public Input<double>? ClusterUsedMem { get; set; }

        /// <summary>
        /// cluster version.
        /// </summary>
        [Input("clusterVersion")]
        public Input<string>? ClusterVersion { get; set; }

        /// <summary>
        /// Create time.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Delete flag: `true`: can be deleted; `false`: can not be deleted.
        /// </summary>
        [Input("deleteFlag")]
        public Input<bool>? DeleteFlag { get; set; }

        /// <summary>
        /// Reasons why clusters cannot be deleted.
        /// </summary>
        [Input("deleteFlagReason")]
        public Input<string>? DeleteFlagReason { get; set; }

        /// <summary>
        /// Total number of deployment groups.
        /// </summary>
        [Input("groupCount")]
        public Input<int>? GroupCount { get; set; }

        /// <summary>
        /// Number of cluster machine instances.
        /// </summary>
        [Input("instanceCount")]
        public Input<int>? InstanceCount { get; set; }

        /// <summary>
        /// api address.
        /// </summary>
        [Input("kuberneteApiServer")]
        public Input<string>? KuberneteApiServer { get; set; }

        /// <summary>
        /// native secret.
        /// </summary>
        [Input("kuberneteNativeSecret")]
        public Input<string>? KuberneteNativeSecret { get; set; }

        /// <summary>
        /// `K`:kubeconfig, `S`:service account.
        /// </summary>
        [Input("kuberneteNativeType")]
        public Input<string>? KuberneteNativeType { get; set; }

        /// <summary>
        /// The maximum number of services in the cluster. The value ranges from 32 to 32768. If it is not a power of 2, the nearest power of 2 will be taken up.
        /// </summary>
        [Input("maxClusterServiceNum")]
        public Input<int>? MaxClusterServiceNum { get; set; }

        /// <summary>
        /// The maximum number of Pods on each Node in the cluster. The value ranges from 4 to 256. When the value is not a power of 2, the nearest power of 2 will be taken up.
        /// </summary>
        [Input("maxNodePodNum")]
        public Input<int>? MaxNodePodNum { get; set; }

        /// <summary>
        /// The number of machine instances in the normal state of the cluster.
        /// </summary>
        [Input("normalInstanceCount")]
        public Input<int>? NormalInstanceCount { get; set; }

        [Input("operationInfos")]
        private InputList<Inputs.ClusterOperationInfoGetArgs>? _operationInfos;

        /// <summary>
        /// Control information for buttons on the front end.
        /// </summary>
        public InputList<Inputs.ClusterOperationInfoGetArgs> OperationInfos
        {
            get => _operationInfos ?? (_operationInfos = new InputList<Inputs.ClusterOperationInfoGetArgs>());
            set => _operationInfos = value;
        }

        /// <summary>
        /// The dataset ID to be bound.
        /// </summary>
        [Input("programId")]
        public Input<string>? ProgramId { get; set; }

        [Input("programIdLists")]
        private InputList<string>? _programIdLists;

        /// <summary>
        /// Program id list.
        /// </summary>
        public InputList<string> ProgramIdLists
        {
            get => _programIdLists ?? (_programIdLists = new InputList<string>());
            set => _programIdLists = value;
        }

        /// <summary>
        /// Number of Deployment Groups in progress.
        /// </summary>
        [Input("runGroupCount")]
        public Input<int>? RunGroupCount { get; set; }

        /// <summary>
        /// Number of machine instances running in the cluster.
        /// </summary>
        [Input("runInstanceCount")]
        public Input<int>? RunInstanceCount { get; set; }

        /// <summary>
        /// Number of running service instances.
        /// </summary>
        [Input("runServiceInstanceCount")]
        public Input<int>? RunServiceInstanceCount { get; set; }

        /// <summary>
        /// Number of deployment groups in stop.
        /// </summary>
        [Input("stopGroupCount")]
        public Input<int>? StopGroupCount { get; set; }

        /// <summary>
        /// Subnet id.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The TSF region to which the cluster belongs.
        /// </summary>
        [Input("tsfRegionId")]
        public Input<string>? TsfRegionId { get; set; }

        /// <summary>
        /// Name of the TSF region to which the cluster belongs.
        /// </summary>
        [Input("tsfRegionName")]
        public Input<string>? TsfRegionName { get; set; }

        /// <summary>
        /// The TSF availability zone to which the cluster belongs.
        /// </summary>
        [Input("tsfZoneId")]
        public Input<string>? TsfZoneId { get; set; }

        /// <summary>
        /// The name of the TSF availability zone to which the cluster belongs.
        /// </summary>
        [Input("tsfZoneName")]
        public Input<string>? TsfZoneName { get; set; }

        /// <summary>
        /// Update time.
        /// </summary>
        [Input("updateTime")]
        public Input<string>? UpdateTime { get; set; }

        /// <summary>
        /// Vpc id.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        public ClusterState()
        {
        }
    }
}
