<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 Pulumiverse.Fortios
{
    /// <summary>
    /// Configure WAN optimization authentication groups.
    /// 
    /// ## 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.WanoptAuthgroup("trname", new()
    ///     {
    ///         AuthMethod = "cert",
    ///         Cert = "Fortinet_CA_SSL",
    ///         PeerAccept = "any",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Wanopt AuthGroup can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/wanoptAuthgroup:WanoptAuthgroup labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/wanoptAuthgroup:WanoptAuthgroup labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/wanoptAuthgroup:WanoptAuthgroup")]
    public partial class WanoptAuthgroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Select certificate or pre-shared key authentication for this authentication group. Valid values: `cert`, `psk`.
        /// </summary>
        [Output("authMethod")]
        public Output<string> AuthMethod { get; private set; } = null!;

        /// <summary>
        /// Name of certificate to identify this peer.
        /// </summary>
        [Output("cert")]
        public Output<string> Cert { get; private set; } = null!;

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

        /// <summary>
        /// If peer-accept is set to one, select the name of one peer to add to this authentication group. The peer must have added with the wanopt peer command.
        /// </summary>
        [Output("peer")]
        public Output<string> Peer { get; private set; } = null!;

        /// <summary>
        /// Determine if this auth group accepts, any peer, a list of defined peers, or just one peer. Valid values: `any`, `defined`, `one`.
        /// </summary>
        [Output("peerAccept")]
        public Output<string> PeerAccept { get; private set; } = null!;

        /// <summary>
        /// Pre-shared key used by the peers in this authentication group.
        /// </summary>
        [Output("psk")]
        public Output<string?> Psk { 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 WanoptAuthgroup 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 WanoptAuthgroup(string name, WanoptAuthgroupArgs args, CustomResourceOptions? options = null)
            : base("fortios:index/wanoptAuthgroup:WanoptAuthgroup", name, args ?? new WanoptAuthgroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private WanoptAuthgroup(string name, Input<string> id, WanoptAuthgroupState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/wanoptAuthgroup:WanoptAuthgroup", 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 =
                {
                    "psk",
                },
            };
            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 WanoptAuthgroup 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 WanoptAuthgroup Get(string name, Input<string> id, WanoptAuthgroupState? state = null, CustomResourceOptions? options = null)
        {
            return new WanoptAuthgroup(name, id, state, options);
        }
    }

    public sealed class WanoptAuthgroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Select certificate or pre-shared key authentication for this authentication group. Valid values: `cert`, `psk`.
        /// </summary>
        [Input("authMethod")]
        public Input<string>? AuthMethod { get; set; }

        /// <summary>
        /// Name of certificate to identify this peer.
        /// </summary>
        [Input("cert", required: true)]
        public Input<string> Cert { get; set; } = null!;

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

        /// <summary>
        /// If peer-accept is set to one, select the name of one peer to add to this authentication group. The peer must have added with the wanopt peer command.
        /// </summary>
        [Input("peer")]
        public Input<string>? Peer { get; set; }

        /// <summary>
        /// Determine if this auth group accepts, any peer, a list of defined peers, or just one peer. Valid values: `any`, `defined`, `one`.
        /// </summary>
        [Input("peerAccept")]
        public Input<string>? PeerAccept { get; set; }

        [Input("psk")]
        private Input<string>? _psk;

        /// <summary>
        /// Pre-shared key used by the peers in this authentication group.
        /// </summary>
        public Input<string>? Psk
        {
            get => _psk;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _psk = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <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 WanoptAuthgroupArgs()
        {
        }
        public static new WanoptAuthgroupArgs Empty => new WanoptAuthgroupArgs();
    }

    public sealed class WanoptAuthgroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Select certificate or pre-shared key authentication for this authentication group. Valid values: `cert`, `psk`.
        /// </summary>
        [Input("authMethod")]
        public Input<string>? AuthMethod { get; set; }

        /// <summary>
        /// Name of certificate to identify this peer.
        /// </summary>
        [Input("cert")]
        public Input<string>? Cert { get; set; }

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

        /// <summary>
        /// If peer-accept is set to one, select the name of one peer to add to this authentication group. The peer must have added with the wanopt peer command.
        /// </summary>
        [Input("peer")]
        public Input<string>? Peer { get; set; }

        /// <summary>
        /// Determine if this auth group accepts, any peer, a list of defined peers, or just one peer. Valid values: `any`, `defined`, `one`.
        /// </summary>
        [Input("peerAccept")]
        public Input<string>? PeerAccept { get; set; }

        [Input("psk")]
        private Input<string>? _psk;

        /// <summary>
        /// Pre-shared key used by the peers in this authentication group.
        /// </summary>
        public Input<string>? Psk
        {
            get => _psk;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _psk = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <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 WanoptAuthgroupState()
        {
        }
        public static new WanoptAuthgroupState Empty => new WanoptAuthgroupState();
    }
}
