// *** 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 Nutanix resource to create VPC.
    /// 
    /// ## Example Usage
    /// ### vpc creation with external subnet name
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var vpc = new Nutanix.Vpc("vpc", new Nutanix.VpcArgs
    ///         {
    ///             CommonDomainNameServerIpLists = 
    ///             {
    ///                 new Nutanix.Inputs.VpcCommonDomainNameServerIpListArgs
    ///                 {
    ///                     Ip = "8.8.8.8",
    ///                 },
    ///                 new Nutanix.Inputs.VpcCommonDomainNameServerIpListArgs
    ///                 {
    ///                     Ip = "172.16.17.32",
    ///                 },
    ///             },
    ///             ExternalSubnetReferenceNames = 
    ///             {
    ///                 "test-Ext1",
    ///                 "test-ext2",
    ///             },
    ///             ExternallyRoutablePrefixLists = 
    ///             {
    ///                 new Nutanix.Inputs.VpcExternallyRoutablePrefixListArgs
    ///                 {
    ///                     Ip = "172.16.31.10",
    ///                     PrefixLength = 16,
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// ### vpc creation with external subnet uuid
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var vpc = new Nutanix.Vpc("vpc", new Nutanix.VpcArgs
    ///         {
    ///             CommonDomainNameServerIpLists = 
    ///             {
    ///                 new Nutanix.Inputs.VpcCommonDomainNameServerIpListArgs
    ///                 {
    ///                     Ip = "8.8.8.8",
    ///                 },
    ///             },
    ///             ExternalSubnetReferenceUuids = 
    ///             {
    ///                 "&lt;subnet_uuid&gt;",
    ///             },
    ///             ExternallyRoutablePrefixLists = 
    ///             {
    ///                 new Nutanix.Inputs.VpcExternallyRoutablePrefixListArgs
    ///                 {
    ///                     Ip = "172.16.31.10",
    ///                     PrefixLength = 16,
    ///                 },
    ///                 new Nutanix.Inputs.VpcExternallyRoutablePrefixListArgs
    ///                 {
    ///                     Ip = "192.168.127.12",
    ///                     PrefixLength = 16,
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [NutanixResourceType("nutanix:index/vpc:Vpc")]
    public partial class Vpc : Pulumi.CustomResource
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Output("apiVersion")]
        public Output<string> ApiVersion { get; private set; } = null!;

        /// <summary>
        /// List of domain name server IPs.
        /// </summary>
        [Output("commonDomainNameServerIpLists")]
        public Output<ImmutableArray<Outputs.VpcCommonDomainNameServerIpList>> CommonDomainNameServerIpLists { get; private set; } = null!;

        /// <summary>
        /// Status of List of external subnets attached to this VPC
        /// </summary>
        [Output("externalSubnetListStatuses")]
        public Output<ImmutableArray<Outputs.VpcExternalSubnetListStatus>> ExternalSubnetListStatuses { get; private set; } = null!;

        /// <summary>
        /// List of external subnets name attached to this VPC. Should not be used with external_subnet_reference_uuid.
        /// </summary>
        [Output("externalSubnetReferenceNames")]
        public Output<ImmutableArray<string>> ExternalSubnetReferenceNames { get; private set; } = null!;

        /// <summary>
        /// List of external subnets uuid attached to this VPC. Should not be used with external_subnet_reference_name.
        /// </summary>
        [Output("externalSubnetReferenceUuids")]
        public Output<ImmutableArray<string>> ExternalSubnetReferenceUuids { get; private set; } = null!;

        /// <summary>
        /// List Externally Routable IP Addresses. Required when external subnet with NoNAT is used.
        /// </summary>
        [Output("externallyRoutablePrefixLists")]
        public Output<ImmutableArray<Outputs.VpcExternallyRoutablePrefixList>> ExternallyRoutablePrefixLists { get; private set; } = null!;

        /// <summary>
        /// The vpc kind metadata.
        /// </summary>
        [Output("metadata")]
        public Output<ImmutableDictionary<string, string>> Metadata { get; private set; } = null!;

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


        /// <summary>
        /// Create a Vpc 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 Vpc(string name, VpcArgs? args = null, CustomResourceOptions? options = null)
            : base("nutanix:index/vpc:Vpc", name, args ?? new VpcArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Vpc(string name, Input<string> id, VpcState? state = null, CustomResourceOptions? options = null)
            : base("nutanix:index/vpc:Vpc", 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 Vpc 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 Vpc Get(string name, Input<string> id, VpcState? state = null, CustomResourceOptions? options = null)
        {
            return new Vpc(name, id, state, options);
        }
    }

    public sealed class VpcArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        [Input("commonDomainNameServerIpLists")]
        private InputList<Inputs.VpcCommonDomainNameServerIpListArgs>? _commonDomainNameServerIpLists;

        /// <summary>
        /// List of domain name server IPs.
        /// </summary>
        public InputList<Inputs.VpcCommonDomainNameServerIpListArgs> CommonDomainNameServerIpLists
        {
            get => _commonDomainNameServerIpLists ?? (_commonDomainNameServerIpLists = new InputList<Inputs.VpcCommonDomainNameServerIpListArgs>());
            set => _commonDomainNameServerIpLists = value;
        }

        [Input("externalSubnetReferenceNames")]
        private InputList<string>? _externalSubnetReferenceNames;

        /// <summary>
        /// List of external subnets name attached to this VPC. Should not be used with external_subnet_reference_uuid.
        /// </summary>
        public InputList<string> ExternalSubnetReferenceNames
        {
            get => _externalSubnetReferenceNames ?? (_externalSubnetReferenceNames = new InputList<string>());
            set => _externalSubnetReferenceNames = value;
        }

        [Input("externalSubnetReferenceUuids")]
        private InputList<string>? _externalSubnetReferenceUuids;

        /// <summary>
        /// List of external subnets uuid attached to this VPC. Should not be used with external_subnet_reference_name.
        /// </summary>
        public InputList<string> ExternalSubnetReferenceUuids
        {
            get => _externalSubnetReferenceUuids ?? (_externalSubnetReferenceUuids = new InputList<string>());
            set => _externalSubnetReferenceUuids = value;
        }

        [Input("externallyRoutablePrefixLists")]
        private InputList<Inputs.VpcExternallyRoutablePrefixListArgs>? _externallyRoutablePrefixLists;

        /// <summary>
        /// List Externally Routable IP Addresses. Required when external subnet with NoNAT is used.
        /// </summary>
        public InputList<Inputs.VpcExternallyRoutablePrefixListArgs> ExternallyRoutablePrefixLists
        {
            get => _externallyRoutablePrefixLists ?? (_externallyRoutablePrefixLists = new InputList<Inputs.VpcExternallyRoutablePrefixListArgs>());
            set => _externallyRoutablePrefixLists = value;
        }

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

        public VpcArgs()
        {
        }
    }

    public sealed class VpcState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The version of the API.
        /// </summary>
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        [Input("commonDomainNameServerIpLists")]
        private InputList<Inputs.VpcCommonDomainNameServerIpListGetArgs>? _commonDomainNameServerIpLists;

        /// <summary>
        /// List of domain name server IPs.
        /// </summary>
        public InputList<Inputs.VpcCommonDomainNameServerIpListGetArgs> CommonDomainNameServerIpLists
        {
            get => _commonDomainNameServerIpLists ?? (_commonDomainNameServerIpLists = new InputList<Inputs.VpcCommonDomainNameServerIpListGetArgs>());
            set => _commonDomainNameServerIpLists = value;
        }

        [Input("externalSubnetListStatuses")]
        private InputList<Inputs.VpcExternalSubnetListStatusGetArgs>? _externalSubnetListStatuses;

        /// <summary>
        /// Status of List of external subnets attached to this VPC
        /// </summary>
        public InputList<Inputs.VpcExternalSubnetListStatusGetArgs> ExternalSubnetListStatuses
        {
            get => _externalSubnetListStatuses ?? (_externalSubnetListStatuses = new InputList<Inputs.VpcExternalSubnetListStatusGetArgs>());
            set => _externalSubnetListStatuses = value;
        }

        [Input("externalSubnetReferenceNames")]
        private InputList<string>? _externalSubnetReferenceNames;

        /// <summary>
        /// List of external subnets name attached to this VPC. Should not be used with external_subnet_reference_uuid.
        /// </summary>
        public InputList<string> ExternalSubnetReferenceNames
        {
            get => _externalSubnetReferenceNames ?? (_externalSubnetReferenceNames = new InputList<string>());
            set => _externalSubnetReferenceNames = value;
        }

        [Input("externalSubnetReferenceUuids")]
        private InputList<string>? _externalSubnetReferenceUuids;

        /// <summary>
        /// List of external subnets uuid attached to this VPC. Should not be used with external_subnet_reference_name.
        /// </summary>
        public InputList<string> ExternalSubnetReferenceUuids
        {
            get => _externalSubnetReferenceUuids ?? (_externalSubnetReferenceUuids = new InputList<string>());
            set => _externalSubnetReferenceUuids = value;
        }

        [Input("externallyRoutablePrefixLists")]
        private InputList<Inputs.VpcExternallyRoutablePrefixListGetArgs>? _externallyRoutablePrefixLists;

        /// <summary>
        /// List Externally Routable IP Addresses. Required when external subnet with NoNAT is used.
        /// </summary>
        public InputList<Inputs.VpcExternallyRoutablePrefixListGetArgs> ExternallyRoutablePrefixLists
        {
            get => _externallyRoutablePrefixLists ?? (_externallyRoutablePrefixLists = new InputList<Inputs.VpcExternallyRoutablePrefixListGetArgs>());
            set => _externallyRoutablePrefixLists = value;
        }

        [Input("metadata")]
        private InputMap<string>? _metadata;

        /// <summary>
        /// The vpc kind metadata.
        /// </summary>
        public InputMap<string> Metadata
        {
            get => _metadata ?? (_metadata = new InputMap<string>());
            set => _metadata = value;
        }

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

        public VpcState()
        {
        }
    }
}
