// *** 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.Vcd
{
    [VcdResourceType("vcd:index/nsxtIpsecVpnTunnel:NsxtIpsecVpnTunnel")]
    public partial class NsxtIpsecVpnTunnel : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Description IP Sec VPN Tunnel
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Edge gateway name in which IP Sec VPN configuration is located
        /// </summary>
        [Output("edgeGatewayId")]
        public Output<string> EdgeGatewayId { get; private set; } = null!;

        /// <summary>
        /// Enables or disables this configuration (default true)
        /// </summary>
        [Output("enabled")]
        public Output<bool?> Enabled { get; private set; } = null!;

        /// <summary>
        /// Provides more details of failure if the IKE service is not UP
        /// </summary>
        [Output("ikeFailReason")]
        public Output<string> IkeFailReason { get; private set; } = null!;

        /// <summary>
        /// Status for the actual IKE Session for the given tunnel
        /// </summary>
        [Output("ikeServiceStatus")]
        public Output<string> IkeServiceStatus { get; private set; } = null!;

        /// <summary>
        /// IPv4 Address for the endpoint. This has to be a sub-allocated IP on the Edge Gateway.
        /// </summary>
        [Output("localIpAddress")]
        public Output<string> LocalIpAddress { get; private set; } = null!;

        /// <summary>
        /// Set of local networks in CIDR format. At least one value is required
        /// </summary>
        [Output("localNetworks")]
        public Output<ImmutableArray<string>> LocalNetworks { get; private set; } = null!;

        /// <summary>
        /// Sets whether logging for the tunnel is enabled or not. (default - false)
        /// </summary>
        [Output("logging")]
        public Output<bool?> Logging { get; private set; } = null!;

        /// <summary>
        /// Name of IP Sec VPN Tunnel
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Output("org")]
        public Output<string?> Org { get; private set; } = null!;

        /// <summary>
        /// Pre-Shared Key (PSK)
        /// </summary>
        [Output("preSharedKey")]
        public Output<string> PreSharedKey { get; private set; } = null!;

        /// <summary>
        /// Public IPv4 Address of the remote device terminating the VPN connection
        /// </summary>
        [Output("remoteIpAddress")]
        public Output<string> RemoteIpAddress { get; private set; } = null!;

        /// <summary>
        /// Set of remote networks in CIDR format. Leaving it empty is interpreted as 0.0.0.0/0
        /// </summary>
        [Output("remoteNetworks")]
        public Output<ImmutableArray<string>> RemoteNetworks { get; private set; } = null!;

        /// <summary>
        /// Security type which is use for IPsec VPN Tunnel. It will be 'DEFAULT' if nothing is customized and 'CUSTOM' if some
        /// changes are applied
        /// </summary>
        [Output("securityProfile")]
        public Output<string> SecurityProfile { get; private set; } = null!;

        /// <summary>
        /// Security profile customization
        /// </summary>
        [Output("securityProfileCustomization")]
        public Output<Outputs.NsxtIpsecVpnTunnelSecurityProfileCustomization?> SecurityProfileCustomization { get; private set; } = null!;

        /// <summary>
        /// Overall IPsec VPN Tunnel Status
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Output("vdc")]
        public Output<string> Vdc { get; private set; } = null!;


        /// <summary>
        /// Create a NsxtIpsecVpnTunnel 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 NsxtIpsecVpnTunnel(string name, NsxtIpsecVpnTunnelArgs args, CustomResourceOptions? options = null)
            : base("vcd:index/nsxtIpsecVpnTunnel:NsxtIpsecVpnTunnel", name, args ?? new NsxtIpsecVpnTunnelArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class NsxtIpsecVpnTunnelArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description IP Sec VPN Tunnel
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Edge gateway name in which IP Sec VPN configuration is located
        /// </summary>
        [Input("edgeGatewayId", required: true)]
        public Input<string> EdgeGatewayId { get; set; } = null!;

        /// <summary>
        /// Enables or disables this configuration (default true)
        /// </summary>
        [Input("enabled")]
        public Input<bool>? Enabled { get; set; }

        /// <summary>
        /// IPv4 Address for the endpoint. This has to be a sub-allocated IP on the Edge Gateway.
        /// </summary>
        [Input("localIpAddress", required: true)]
        public Input<string> LocalIpAddress { get; set; } = null!;

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

        /// <summary>
        /// Set of local networks in CIDR format. At least one value is required
        /// </summary>
        public InputList<string> LocalNetworks
        {
            get => _localNetworks ?? (_localNetworks = new InputList<string>());
            set => _localNetworks = value;
        }

        /// <summary>
        /// Sets whether logging for the tunnel is enabled or not. (default - false)
        /// </summary>
        [Input("logging")]
        public Input<bool>? Logging { get; set; }

        /// <summary>
        /// Name of IP Sec VPN Tunnel
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Input("org")]
        public Input<string>? Org { get; set; }

        /// <summary>
        /// Pre-Shared Key (PSK)
        /// </summary>
        [Input("preSharedKey", required: true)]
        public Input<string> PreSharedKey { get; set; } = null!;

        /// <summary>
        /// Public IPv4 Address of the remote device terminating the VPN connection
        /// </summary>
        [Input("remoteIpAddress", required: true)]
        public Input<string> RemoteIpAddress { get; set; } = null!;

        [Input("remoteNetworks")]
        private InputList<string>? _remoteNetworks;

        /// <summary>
        /// Set of remote networks in CIDR format. Leaving it empty is interpreted as 0.0.0.0/0
        /// </summary>
        public InputList<string> RemoteNetworks
        {
            get => _remoteNetworks ?? (_remoteNetworks = new InputList<string>());
            set => _remoteNetworks = value;
        }

        /// <summary>
        /// Security profile customization
        /// </summary>
        [Input("securityProfileCustomization")]
        public Input<Inputs.NsxtIpsecVpnTunnelSecurityProfileCustomizationArgs>? SecurityProfileCustomization { get; set; }

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Input("vdc")]
        public Input<string>? Vdc { get; set; }

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

    public sealed class NsxtIpsecVpnTunnelState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description IP Sec VPN Tunnel
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Edge gateway name in which IP Sec VPN configuration is located
        /// </summary>
        [Input("edgeGatewayId")]
        public Input<string>? EdgeGatewayId { get; set; }

        /// <summary>
        /// Enables or disables this configuration (default true)
        /// </summary>
        [Input("enabled")]
        public Input<bool>? Enabled { get; set; }

        /// <summary>
        /// Provides more details of failure if the IKE service is not UP
        /// </summary>
        [Input("ikeFailReason")]
        public Input<string>? IkeFailReason { get; set; }

        /// <summary>
        /// Status for the actual IKE Session for the given tunnel
        /// </summary>
        [Input("ikeServiceStatus")]
        public Input<string>? IkeServiceStatus { get; set; }

        /// <summary>
        /// IPv4 Address for the endpoint. This has to be a sub-allocated IP on the Edge Gateway.
        /// </summary>
        [Input("localIpAddress")]
        public Input<string>? LocalIpAddress { get; set; }

        [Input("localNetworks")]
        private InputList<string>? _localNetworks;

        /// <summary>
        /// Set of local networks in CIDR format. At least one value is required
        /// </summary>
        public InputList<string> LocalNetworks
        {
            get => _localNetworks ?? (_localNetworks = new InputList<string>());
            set => _localNetworks = value;
        }

        /// <summary>
        /// Sets whether logging for the tunnel is enabled or not. (default - false)
        /// </summary>
        [Input("logging")]
        public Input<bool>? Logging { get; set; }

        /// <summary>
        /// Name of IP Sec VPN Tunnel
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across
        /// different organizations
        /// </summary>
        [Input("org")]
        public Input<string>? Org { get; set; }

        /// <summary>
        /// Pre-Shared Key (PSK)
        /// </summary>
        [Input("preSharedKey")]
        public Input<string>? PreSharedKey { get; set; }

        /// <summary>
        /// Public IPv4 Address of the remote device terminating the VPN connection
        /// </summary>
        [Input("remoteIpAddress")]
        public Input<string>? RemoteIpAddress { get; set; }

        [Input("remoteNetworks")]
        private InputList<string>? _remoteNetworks;

        /// <summary>
        /// Set of remote networks in CIDR format. Leaving it empty is interpreted as 0.0.0.0/0
        /// </summary>
        public InputList<string> RemoteNetworks
        {
            get => _remoteNetworks ?? (_remoteNetworks = new InputList<string>());
            set => _remoteNetworks = value;
        }

        /// <summary>
        /// Security type which is use for IPsec VPN Tunnel. It will be 'DEFAULT' if nothing is customized and 'CUSTOM' if some
        /// changes are applied
        /// </summary>
        [Input("securityProfile")]
        public Input<string>? SecurityProfile { get; set; }

        /// <summary>
        /// Security profile customization
        /// </summary>
        [Input("securityProfileCustomization")]
        public Input<Inputs.NsxtIpsecVpnTunnelSecurityProfileCustomizationGetArgs>? SecurityProfileCustomization { get; set; }

        /// <summary>
        /// Overall IPsec VPN Tunnel Status
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The name of VDC to use, optional if defined at provider level
        /// </summary>
        [Input("vdc")]
        public Input<string>? Vdc { get; set; }

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