// *** 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 Pulumiverse.Fortios
{
    /// <summary>
    /// Configure IPsec manual keys.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var trname = new Fortios.VpnipsecManualkeyinterface("trname", new()
    ///     {
    ///         AddrType = "4",
    ///         AuthAlg = "null",
    ///         AuthKey = "-",
    ///         EncAlg = "des",
    ///         EncKey = "CECA2184ACADAEEF",
    ///         Interface = "port3",
    ///         IpVersion = "4",
    ///         LocalGw = "0.0.0.0",
    ///         LocalGw6 = "::",
    ///         LocalSpi = "0x100",
    ///         RemoteGw = "2.2.2.2",
    ///         RemoteGw6 = "::",
    ///         RemoteSpi = "0x100",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// VpnIpsec ManualkeyInterface can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/vpnipsecManualkeyinterface:VpnipsecManualkeyinterface labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/vpnipsecManualkeyinterface:VpnipsecManualkeyinterface labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/vpnipsecManualkeyinterface:VpnipsecManualkeyinterface")]
    public partial class VpnipsecManualkeyinterface : global::Pulumi.CustomResource
    {
        /// <summary>
        /// IP version to use for IP packets. Valid values: `4`, `6`.
        /// </summary>
        [Output("addrType")]
        public Output<string> AddrType { get; private set; } = null!;

        /// <summary>
        /// Authentication algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`.
        /// </summary>
        [Output("authAlg")]
        public Output<string> AuthAlg { get; private set; } = null!;

        /// <summary>
        /// Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        [Output("authKey")]
        public Output<string> AuthKey { get; private set; } = null!;

        /// <summary>
        /// Encryption algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `des`, `3des`, `aes128`, `aes192`, `aes256`, `aria128`, `aria192`, `aria256`, `seed`.
        /// </summary>
        [Output("encAlg")]
        public Output<string> EncAlg { get; private set; } = null!;

        /// <summary>
        /// Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        [Output("encKey")]
        public Output<string> EncKey { get; private set; } = null!;

        /// <summary>
        /// Name of the physical, aggregate, or VLAN interface.
        /// </summary>
        [Output("interface")]
        public Output<string> Interface { get; private set; } = null!;

        /// <summary>
        /// IP version to use for VPN interface. Valid values: `4`, `6`.
        /// </summary>
        [Output("ipVersion")]
        public Output<string> IpVersion { get; private set; } = null!;

        /// <summary>
        /// IPv4 address of the local gateway's external interface.
        /// </summary>
        [Output("localGw")]
        public Output<string> LocalGw { get; private set; } = null!;

        /// <summary>
        /// Local IPv6 address of VPN gateway.
        /// </summary>
        [Output("localGw6")]
        public Output<string> LocalGw6 { get; private set; } = null!;

        /// <summary>
        /// Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Output("localSpi")]
        public Output<string> LocalSpi { get; private set; } = null!;

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

        /// <summary>
        /// Enable/disable offloading IPsec VPN manual key sessions to NPUs. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("npuOffload")]
        public Output<string> NpuOffload { get; private set; } = null!;

        /// <summary>
        /// IPv4 address of the remote gateway's external interface.
        /// </summary>
        [Output("remoteGw")]
        public Output<string> RemoteGw { get; private set; } = null!;

        /// <summary>
        /// Remote IPv6 address of VPN gateway.
        /// </summary>
        [Output("remoteGw6")]
        public Output<string> RemoteGw6 { get; private set; } = null!;

        /// <summary>
        /// Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Output("remoteSpi")]
        public Output<string> RemoteSpi { get; private set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Output("vdomparam")]
        public Output<string?> Vdomparam { get; private set; } = null!;


        /// <summary>
        /// Create a VpnipsecManualkeyinterface 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 VpnipsecManualkeyinterface(string name, VpnipsecManualkeyinterfaceArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/vpnipsecManualkeyinterface:VpnipsecManualkeyinterface", name, args ?? new VpnipsecManualkeyinterfaceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private VpnipsecManualkeyinterface(string name, Input<string> id, VpnipsecManualkeyinterfaceState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/vpnipsecManualkeyinterface:VpnipsecManualkeyinterface", 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/pulumiverse/pulumi-fortios",
                AdditionalSecretOutputs =
                {
                    "authKey",
                    "encKey",
                },
            };
            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 VpnipsecManualkeyinterface 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 VpnipsecManualkeyinterface Get(string name, Input<string> id, VpnipsecManualkeyinterfaceState? state = null, CustomResourceOptions? options = null)
        {
            return new VpnipsecManualkeyinterface(name, id, state, options);
        }
    }

    public sealed class VpnipsecManualkeyinterfaceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// IP version to use for IP packets. Valid values: `4`, `6`.
        /// </summary>
        [Input("addrType")]
        public Input<string>? AddrType { get; set; }

        /// <summary>
        /// Authentication algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`.
        /// </summary>
        [Input("authAlg", required: true)]
        public Input<string> AuthAlg { get; set; } = null!;

        [Input("authKey")]
        private Input<string>? _authKey;

        /// <summary>
        /// Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? AuthKey
        {
            get => _authKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _authKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Encryption algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `des`, `3des`, `aes128`, `aes192`, `aes256`, `aria128`, `aria192`, `aria256`, `seed`.
        /// </summary>
        [Input("encAlg", required: true)]
        public Input<string> EncAlg { get; set; } = null!;

        [Input("encKey")]
        private Input<string>? _encKey;

        /// <summary>
        /// Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? EncKey
        {
            get => _encKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _encKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Name of the physical, aggregate, or VLAN interface.
        /// </summary>
        [Input("interface", required: true)]
        public Input<string> Interface { get; set; } = null!;

        /// <summary>
        /// IP version to use for VPN interface. Valid values: `4`, `6`.
        /// </summary>
        [Input("ipVersion")]
        public Input<string>? IpVersion { get; set; }

        /// <summary>
        /// IPv4 address of the local gateway's external interface.
        /// </summary>
        [Input("localGw")]
        public Input<string>? LocalGw { get; set; }

        /// <summary>
        /// Local IPv6 address of VPN gateway.
        /// </summary>
        [Input("localGw6")]
        public Input<string>? LocalGw6 { get; set; }

        /// <summary>
        /// Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("localSpi")]
        public Input<string>? LocalSpi { get; set; }

        /// <summary>
        /// IPsec tunnel name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Enable/disable offloading IPsec VPN manual key sessions to NPUs. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("npuOffload")]
        public Input<string>? NpuOffload { get; set; }

        /// <summary>
        /// IPv4 address of the remote gateway's external interface.
        /// </summary>
        [Input("remoteGw", required: true)]
        public Input<string> RemoteGw { get; set; } = null!;

        /// <summary>
        /// Remote IPv6 address of VPN gateway.
        /// </summary>
        [Input("remoteGw6", required: true)]
        public Input<string> RemoteGw6 { get; set; } = null!;

        /// <summary>
        /// Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("remoteSpi")]
        public Input<string>? RemoteSpi { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

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

    public sealed class VpnipsecManualkeyinterfaceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// IP version to use for IP packets. Valid values: `4`, `6`.
        /// </summary>
        [Input("addrType")]
        public Input<string>? AddrType { get; set; }

        /// <summary>
        /// Authentication algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `md5`, `sha1`, `sha256`, `sha384`, `sha512`.
        /// </summary>
        [Input("authAlg")]
        public Input<string>? AuthAlg { get; set; }

        [Input("authKey")]
        private Input<string>? _authKey;

        /// <summary>
        /// Hexadecimal authentication key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? AuthKey
        {
            get => _authKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _authKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Encryption algorithm. Must be the same for both ends of the tunnel. Valid values: `null`, `des`, `3des`, `aes128`, `aes192`, `aes256`, `aria128`, `aria192`, `aria256`, `seed`.
        /// </summary>
        [Input("encAlg")]
        public Input<string>? EncAlg { get; set; }

        [Input("encKey")]
        private Input<string>? _encKey;

        /// <summary>
        /// Hexadecimal encryption key in 16-digit (8-byte) segments separated by hyphens.
        /// </summary>
        public Input<string>? EncKey
        {
            get => _encKey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _encKey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// Name of the physical, aggregate, or VLAN interface.
        /// </summary>
        [Input("interface")]
        public Input<string>? Interface { get; set; }

        /// <summary>
        /// IP version to use for VPN interface. Valid values: `4`, `6`.
        /// </summary>
        [Input("ipVersion")]
        public Input<string>? IpVersion { get; set; }

        /// <summary>
        /// IPv4 address of the local gateway's external interface.
        /// </summary>
        [Input("localGw")]
        public Input<string>? LocalGw { get; set; }

        /// <summary>
        /// Local IPv6 address of VPN gateway.
        /// </summary>
        [Input("localGw6")]
        public Input<string>? LocalGw6 { get; set; }

        /// <summary>
        /// Local SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("localSpi")]
        public Input<string>? LocalSpi { get; set; }

        /// <summary>
        /// IPsec tunnel name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Enable/disable offloading IPsec VPN manual key sessions to NPUs. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("npuOffload")]
        public Input<string>? NpuOffload { get; set; }

        /// <summary>
        /// IPv4 address of the remote gateway's external interface.
        /// </summary>
        [Input("remoteGw")]
        public Input<string>? RemoteGw { get; set; }

        /// <summary>
        /// Remote IPv6 address of VPN gateway.
        /// </summary>
        [Input("remoteGw6")]
        public Input<string>? RemoteGw6 { get; set; }

        /// <summary>
        /// Remote SPI, a hexadecimal 8-digit (4-byte) tag. Discerns between two traffic streams with different encryption rules.
        /// </summary>
        [Input("remoteSpi")]
        public Input<string>? RemoteSpi { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

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