<reponame>Kagashino/pulumi-tctest// *** 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;

namespace Pulumi.Tctest.Eks
{
    [TctestResourceType("tctest:Eks/containerInstance:ContainerInstance")]
    public partial class ContainerInstance : Pulumi.CustomResource
    {
        /// <summary>
        /// Indicates whether to create EIP instead of specify existing EIPs. Conflict with `existed_eip_ids`.
        /// </summary>
        [Output("autoCreateEip")]
        public Output<bool?> AutoCreateEip { get; private set; } = null!;

        /// <summary>
        /// ID of EIP which create automatically.
        /// </summary>
        [Output("autoCreateEipId")]
        public Output<string> AutoCreateEipId { get; private set; } = null!;

        /// <summary>
        /// CAM role name authorized to access.
        /// </summary>
        [Output("camRoleName")]
        public Output<string?> CamRoleName { get; private set; } = null!;

        /// <summary>
        /// List of CBS volume.
        /// </summary>
        [Output("cbsVolumes")]
        public Output<ImmutableArray<Outputs.ContainerInstanceCbsVolume>> CbsVolumes { get; private set; } = null!;

        /// <summary>
        /// List of container.
        /// </summary>
        [Output("containers")]
        public Output<ImmutableArray<Outputs.ContainerInstanceContainer>> Containers { get; private set; } = null!;

        /// <summary>
        /// The number of CPU cores. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Output("cpu")]
        public Output<double> Cpu { get; private set; } = null!;

        /// <summary>
        /// Type of cpu, which can set to `intel` or `amd`. It also support backup list like `amd,intel` which indicates using
        /// `intel` when `amd` sold out.
        /// </summary>
        [Output("cpuType")]
        public Output<string?> CpuType { get; private set; } = null!;

        /// <summary>
        /// Container instance creation time.
        /// </summary>
        [Output("createdTime")]
        public Output<string> CreatedTime { get; private set; } = null!;

        /// <summary>
        /// Map of DNS config options.
        /// </summary>
        [Output("dnsConfigOptions")]
        public Output<ImmutableDictionary<string, object>?> DnsConfigOptions { get; private set; } = null!;

        /// <summary>
        /// IP Addresses of DNS Servers.
        /// </summary>
        [Output("dnsNamesServers")]
        public Output<ImmutableArray<string>> DnsNamesServers { get; private set; } = null!;

        /// <summary>
        /// List of DNS Search Domain.
        /// </summary>
        [Output("dnsSearches")]
        public Output<ImmutableArray<string>> DnsSearches { get; private set; } = null!;

        /// <summary>
        /// EIP address.
        /// </summary>
        [Output("eipAddress")]
        public Output<string> EipAddress { get; private set; } = null!;

        /// <summary>
        /// Indicates weather the EIP release or not after instance deleted. Conflict with `existed_eip_ids`.
        /// </summary>
        [Output("eipDeletePolicy")]
        public Output<bool?> EipDeletePolicy { get; private set; } = null!;

        /// <summary>
        /// Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). Conflict with
        /// `existed_eip_ids`.
        /// </summary>
        [Output("eipMaxBandwidthOut")]
        public Output<int?> EipMaxBandwidthOut { get; private set; } = null!;

        /// <summary>
        /// EIP service provider. Default is `BGP`, values `CMCC`,`CTCC`,`CUCC` are available for whitelist customer. Conflict with
        /// `existed_eip_ids`.
        /// </summary>
        [Output("eipServiceProvider")]
        public Output<string?> EipServiceProvider { get; private set; } = null!;

        /// <summary>
        /// Existed EIP ID List which used to bind container instance. Conflict with `auto_create_eip` and auto create EIP options.
        /// </summary>
        [Output("existedEipIds")]
        public Output<ImmutableArray<string>> ExistedEipIds { get; private set; } = null!;

        /// <summary>
        /// Count of GPU. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Output("gpuCount")]
        public Output<int?> GpuCount { get; private set; } = null!;

        /// <summary>
        /// Type of GPU. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Output("gpuType")]
        public Output<string?> GpuType { get; private set; } = null!;

        /// <summary>
        /// List of credentials which pull from image registry.
        /// </summary>
        [Output("imageRegistryCredentials")]
        public Output<ImmutableArray<Outputs.ContainerInstanceImageRegistryCredential>> ImageRegistryCredentials { get; private set; } = null!;

        /// <summary>
        /// List of initialized container.
        /// </summary>
        [Output("initContainers")]
        public Output<ImmutableArray<Outputs.ContainerInstanceInitContainer>> InitContainers { get; private set; } = null!;

        /// <summary>
        /// Memory size. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Output("memory")]
        public Output<double> Memory { get; private set; } = null!;

        /// <summary>
        /// Name of EKS container instance.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// List of NFS volume.
        /// </summary>
        [Output("nfsVolumes")]
        public Output<ImmutableArray<Outputs.ContainerInstanceNfsVolume>> NfsVolumes { get; private set; } = null!;

        /// <summary>
        /// Private IP address.
        /// </summary>
        [Output("privateIp")]
        public Output<string> PrivateIp { get; private set; } = null!;

        /// <summary>
        /// Container instance restart policy. Available values: `Always`, `Never`, `OnFailure`.
        /// </summary>
        [Output("restartPolicy")]
        public Output<string?> RestartPolicy { get; private set; } = null!;

        /// <summary>
        /// List of security group id.
        /// </summary>
        [Output("securityGroups")]
        public Output<ImmutableArray<string>> SecurityGroups { get; private set; } = null!;

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

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

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


        /// <summary>
        /// Create a ContainerInstance 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 ContainerInstance(string name, ContainerInstanceArgs args, CustomResourceOptions? options = null)
            : base("tctest:Eks/containerInstance:ContainerInstance", name, args ?? new ContainerInstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ContainerInstance(string name, Input<string> id, ContainerInstanceState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Eks/containerInstance:ContainerInstance", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.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 ContainerInstance 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 ContainerInstance Get(string name, Input<string> id, ContainerInstanceState? state = null, CustomResourceOptions? options = null)
        {
            return new ContainerInstance(name, id, state, options);
        }
    }

    public sealed class ContainerInstanceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Indicates whether to create EIP instead of specify existing EIPs. Conflict with `existed_eip_ids`.
        /// </summary>
        [Input("autoCreateEip")]
        public Input<bool>? AutoCreateEip { get; set; }

        /// <summary>
        /// CAM role name authorized to access.
        /// </summary>
        [Input("camRoleName")]
        public Input<string>? CamRoleName { get; set; }

        [Input("cbsVolumes")]
        private InputList<Inputs.ContainerInstanceCbsVolumeArgs>? _cbsVolumes;

        /// <summary>
        /// List of CBS volume.
        /// </summary>
        public InputList<Inputs.ContainerInstanceCbsVolumeArgs> CbsVolumes
        {
            get => _cbsVolumes ?? (_cbsVolumes = new InputList<Inputs.ContainerInstanceCbsVolumeArgs>());
            set => _cbsVolumes = value;
        }

        [Input("containers", required: true)]
        private InputList<Inputs.ContainerInstanceContainerArgs>? _containers;

        /// <summary>
        /// List of container.
        /// </summary>
        public InputList<Inputs.ContainerInstanceContainerArgs> Containers
        {
            get => _containers ?? (_containers = new InputList<Inputs.ContainerInstanceContainerArgs>());
            set => _containers = value;
        }

        /// <summary>
        /// The number of CPU cores. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("cpu", required: true)]
        public Input<double> Cpu { get; set; } = null!;

        /// <summary>
        /// Type of cpu, which can set to `intel` or `amd`. It also support backup list like `amd,intel` which indicates using
        /// `intel` when `amd` sold out.
        /// </summary>
        [Input("cpuType")]
        public Input<string>? CpuType { get; set; }

        [Input("dnsConfigOptions")]
        private InputMap<object>? _dnsConfigOptions;

        /// <summary>
        /// Map of DNS config options.
        /// </summary>
        public InputMap<object> DnsConfigOptions
        {
            get => _dnsConfigOptions ?? (_dnsConfigOptions = new InputMap<object>());
            set => _dnsConfigOptions = value;
        }

        [Input("dnsNamesServers")]
        private InputList<string>? _dnsNamesServers;

        /// <summary>
        /// IP Addresses of DNS Servers.
        /// </summary>
        public InputList<string> DnsNamesServers
        {
            get => _dnsNamesServers ?? (_dnsNamesServers = new InputList<string>());
            set => _dnsNamesServers = value;
        }

        [Input("dnsSearches")]
        private InputList<string>? _dnsSearches;

        /// <summary>
        /// List of DNS Search Domain.
        /// </summary>
        public InputList<string> DnsSearches
        {
            get => _dnsSearches ?? (_dnsSearches = new InputList<string>());
            set => _dnsSearches = value;
        }

        /// <summary>
        /// Indicates weather the EIP release or not after instance deleted. Conflict with `existed_eip_ids`.
        /// </summary>
        [Input("eipDeletePolicy")]
        public Input<bool>? EipDeletePolicy { get; set; }

        /// <summary>
        /// Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). Conflict with
        /// `existed_eip_ids`.
        /// </summary>
        [Input("eipMaxBandwidthOut")]
        public Input<int>? EipMaxBandwidthOut { get; set; }

        /// <summary>
        /// EIP service provider. Default is `BGP`, values `CMCC`,`CTCC`,`CUCC` are available for whitelist customer. Conflict with
        /// `existed_eip_ids`.
        /// </summary>
        [Input("eipServiceProvider")]
        public Input<string>? EipServiceProvider { get; set; }

        [Input("existedEipIds")]
        private InputList<string>? _existedEipIds;

        /// <summary>
        /// Existed EIP ID List which used to bind container instance. Conflict with `auto_create_eip` and auto create EIP options.
        /// </summary>
        public InputList<string> ExistedEipIds
        {
            get => _existedEipIds ?? (_existedEipIds = new InputList<string>());
            set => _existedEipIds = value;
        }

        /// <summary>
        /// Count of GPU. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("gpuCount")]
        public Input<int>? GpuCount { get; set; }

        /// <summary>
        /// Type of GPU. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("gpuType")]
        public Input<string>? GpuType { get; set; }

        [Input("imageRegistryCredentials")]
        private InputList<Inputs.ContainerInstanceImageRegistryCredentialArgs>? _imageRegistryCredentials;

        /// <summary>
        /// List of credentials which pull from image registry.
        /// </summary>
        public InputList<Inputs.ContainerInstanceImageRegistryCredentialArgs> ImageRegistryCredentials
        {
            get => _imageRegistryCredentials ?? (_imageRegistryCredentials = new InputList<Inputs.ContainerInstanceImageRegistryCredentialArgs>());
            set => _imageRegistryCredentials = value;
        }

        [Input("initContainers")]
        private InputList<Inputs.ContainerInstanceInitContainerArgs>? _initContainers;

        /// <summary>
        /// List of initialized container.
        /// </summary>
        public InputList<Inputs.ContainerInstanceInitContainerArgs> InitContainers
        {
            get => _initContainers ?? (_initContainers = new InputList<Inputs.ContainerInstanceInitContainerArgs>());
            set => _initContainers = value;
        }

        /// <summary>
        /// Memory size. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("memory", required: true)]
        public Input<double> Memory { get; set; } = null!;

        /// <summary>
        /// Name of EKS container instance.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("nfsVolumes")]
        private InputList<Inputs.ContainerInstanceNfsVolumeArgs>? _nfsVolumes;

        /// <summary>
        /// List of NFS volume.
        /// </summary>
        public InputList<Inputs.ContainerInstanceNfsVolumeArgs> NfsVolumes
        {
            get => _nfsVolumes ?? (_nfsVolumes = new InputList<Inputs.ContainerInstanceNfsVolumeArgs>());
            set => _nfsVolumes = value;
        }

        /// <summary>
        /// Container instance restart policy. Available values: `Always`, `Never`, `OnFailure`.
        /// </summary>
        [Input("restartPolicy")]
        public Input<string>? RestartPolicy { get; set; }

        [Input("securityGroups", required: true)]
        private InputList<string>? _securityGroups;

        /// <summary>
        /// List of security group id.
        /// </summary>
        public InputList<string> SecurityGroups
        {
            get => _securityGroups ?? (_securityGroups = new InputList<string>());
            set => _securityGroups = value;
        }

        /// <summary>
        /// Subnet ID of container instance.
        /// </summary>
        [Input("subnetId", required: true)]
        public Input<string> SubnetId { get; set; } = null!;

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

        public ContainerInstanceArgs()
        {
        }
    }

    public sealed class ContainerInstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Indicates whether to create EIP instead of specify existing EIPs. Conflict with `existed_eip_ids`.
        /// </summary>
        [Input("autoCreateEip")]
        public Input<bool>? AutoCreateEip { get; set; }

        /// <summary>
        /// ID of EIP which create automatically.
        /// </summary>
        [Input("autoCreateEipId")]
        public Input<string>? AutoCreateEipId { get; set; }

        /// <summary>
        /// CAM role name authorized to access.
        /// </summary>
        [Input("camRoleName")]
        public Input<string>? CamRoleName { get; set; }

        [Input("cbsVolumes")]
        private InputList<Inputs.ContainerInstanceCbsVolumeGetArgs>? _cbsVolumes;

        /// <summary>
        /// List of CBS volume.
        /// </summary>
        public InputList<Inputs.ContainerInstanceCbsVolumeGetArgs> CbsVolumes
        {
            get => _cbsVolumes ?? (_cbsVolumes = new InputList<Inputs.ContainerInstanceCbsVolumeGetArgs>());
            set => _cbsVolumes = value;
        }

        [Input("containers")]
        private InputList<Inputs.ContainerInstanceContainerGetArgs>? _containers;

        /// <summary>
        /// List of container.
        /// </summary>
        public InputList<Inputs.ContainerInstanceContainerGetArgs> Containers
        {
            get => _containers ?? (_containers = new InputList<Inputs.ContainerInstanceContainerGetArgs>());
            set => _containers = value;
        }

        /// <summary>
        /// The number of CPU cores. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("cpu")]
        public Input<double>? Cpu { get; set; }

        /// <summary>
        /// Type of cpu, which can set to `intel` or `amd`. It also support backup list like `amd,intel` which indicates using
        /// `intel` when `amd` sold out.
        /// </summary>
        [Input("cpuType")]
        public Input<string>? CpuType { get; set; }

        /// <summary>
        /// Container instance creation time.
        /// </summary>
        [Input("createdTime")]
        public Input<string>? CreatedTime { get; set; }

        [Input("dnsConfigOptions")]
        private InputMap<object>? _dnsConfigOptions;

        /// <summary>
        /// Map of DNS config options.
        /// </summary>
        public InputMap<object> DnsConfigOptions
        {
            get => _dnsConfigOptions ?? (_dnsConfigOptions = new InputMap<object>());
            set => _dnsConfigOptions = value;
        }

        [Input("dnsNamesServers")]
        private InputList<string>? _dnsNamesServers;

        /// <summary>
        /// IP Addresses of DNS Servers.
        /// </summary>
        public InputList<string> DnsNamesServers
        {
            get => _dnsNamesServers ?? (_dnsNamesServers = new InputList<string>());
            set => _dnsNamesServers = value;
        }

        [Input("dnsSearches")]
        private InputList<string>? _dnsSearches;

        /// <summary>
        /// List of DNS Search Domain.
        /// </summary>
        public InputList<string> DnsSearches
        {
            get => _dnsSearches ?? (_dnsSearches = new InputList<string>());
            set => _dnsSearches = value;
        }

        /// <summary>
        /// EIP address.
        /// </summary>
        [Input("eipAddress")]
        public Input<string>? EipAddress { get; set; }

        /// <summary>
        /// Indicates weather the EIP release or not after instance deleted. Conflict with `existed_eip_ids`.
        /// </summary>
        [Input("eipDeletePolicy")]
        public Input<bool>? EipDeletePolicy { get; set; }

        /// <summary>
        /// Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). Conflict with
        /// `existed_eip_ids`.
        /// </summary>
        [Input("eipMaxBandwidthOut")]
        public Input<int>? EipMaxBandwidthOut { get; set; }

        /// <summary>
        /// EIP service provider. Default is `BGP`, values `CMCC`,`CTCC`,`CUCC` are available for whitelist customer. Conflict with
        /// `existed_eip_ids`.
        /// </summary>
        [Input("eipServiceProvider")]
        public Input<string>? EipServiceProvider { get; set; }

        [Input("existedEipIds")]
        private InputList<string>? _existedEipIds;

        /// <summary>
        /// Existed EIP ID List which used to bind container instance. Conflict with `auto_create_eip` and auto create EIP options.
        /// </summary>
        public InputList<string> ExistedEipIds
        {
            get => _existedEipIds ?? (_existedEipIds = new InputList<string>());
            set => _existedEipIds = value;
        }

        /// <summary>
        /// Count of GPU. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("gpuCount")]
        public Input<int>? GpuCount { get; set; }

        /// <summary>
        /// Type of GPU. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("gpuType")]
        public Input<string>? GpuType { get; set; }

        [Input("imageRegistryCredentials")]
        private InputList<Inputs.ContainerInstanceImageRegistryCredentialGetArgs>? _imageRegistryCredentials;

        /// <summary>
        /// List of credentials which pull from image registry.
        /// </summary>
        public InputList<Inputs.ContainerInstanceImageRegistryCredentialGetArgs> ImageRegistryCredentials
        {
            get => _imageRegistryCredentials ?? (_imageRegistryCredentials = new InputList<Inputs.ContainerInstanceImageRegistryCredentialGetArgs>());
            set => _imageRegistryCredentials = value;
        }

        [Input("initContainers")]
        private InputList<Inputs.ContainerInstanceInitContainerGetArgs>? _initContainers;

        /// <summary>
        /// List of initialized container.
        /// </summary>
        public InputList<Inputs.ContainerInstanceInitContainerGetArgs> InitContainers
        {
            get => _initContainers ?? (_initContainers = new InputList<Inputs.ContainerInstanceInitContainerGetArgs>());
            set => _initContainers = value;
        }

        /// <summary>
        /// Memory size. Check https://intl.cloud.tencent.com/document/product/457/34057 for specification references.
        /// </summary>
        [Input("memory")]
        public Input<double>? Memory { get; set; }

        /// <summary>
        /// Name of EKS container instance.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("nfsVolumes")]
        private InputList<Inputs.ContainerInstanceNfsVolumeGetArgs>? _nfsVolumes;

        /// <summary>
        /// List of NFS volume.
        /// </summary>
        public InputList<Inputs.ContainerInstanceNfsVolumeGetArgs> NfsVolumes
        {
            get => _nfsVolumes ?? (_nfsVolumes = new InputList<Inputs.ContainerInstanceNfsVolumeGetArgs>());
            set => _nfsVolumes = value;
        }

        /// <summary>
        /// Private IP address.
        /// </summary>
        [Input("privateIp")]
        public Input<string>? PrivateIp { get; set; }

        /// <summary>
        /// Container instance restart policy. Available values: `Always`, `Never`, `OnFailure`.
        /// </summary>
        [Input("restartPolicy")]
        public Input<string>? RestartPolicy { get; set; }

        [Input("securityGroups")]
        private InputList<string>? _securityGroups;

        /// <summary>
        /// List of security group id.
        /// </summary>
        public InputList<string> SecurityGroups
        {
            get => _securityGroups ?? (_securityGroups = new InputList<string>());
            set => _securityGroups = value;
        }

        /// <summary>
        /// Container instance status.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

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

        public ContainerInstanceState()
        {
        }
    }
}
