<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 zscaler.PulumiPackage.Zia.Firewall
{
    /// <summary>
    /// The **zia_firewall_filtering_ip_source_groups** resource allows the creation and management of ZIA Cloud Firewall IP source groups in the Zscaler Internet Access. This resource can then be associated with a ZIA cloud firewall filtering rule.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Zia = zscaler.PulumiPackage.Zia;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Add an IP address or addresses to a new IP Source Group
    ///     var example = new Zia.Firewall.FirewallFilteringSourceGroups("example", new()
    ///     {
    ///         Description = "Example",
    ///         IpAddresses = new[]
    ///         {
    ///             "192.168.100.1",
    ///             "192.168.100.2",
    ///             "192.168.100.3",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Zia = zscaler.PulumiPackage.Zia;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Add an IP address range(s) to a new IP Source Group
    ///     var example = new Zia.Firewall.FirewallFilteringSourceGroups("example", new()
    ///     {
    ///         Description = "Example",
    ///         IpAddresses = new[]
    ///         {
    ///             "192.0.2.1-192.0.2.10",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Zia = zscaler.PulumiPackage.Zia;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Add subnet to a new IP Source Group
    ///     var example = new Zia.Firewall.FirewallFilteringSourceGroups("example", new()
    ///     {
    ///         Description = "Example",
    ///         IpAddresses = new[]
    ///         {
    ///             "203.0.113.0/24",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [ZiaResourceType("zia:Firewall/firewallFilteringSourceGroups:FirewallFilteringSourceGroups")]
    public partial class FirewallFilteringSourceGroups : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Description of the source IP group
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Source IP addresses to be added to the group. Enter any number of IP addresses. You can enter:
        /// * An IP address (198.51.100.100)
        /// * A range of IP addresses 192.0.2.1-192.0.2.10
        /// * An IP address with a netmask 203.0.113.0/24
        /// </summary>
        [Output("ipAddresses")]
        public Output<ImmutableArray<string>> IpAddresses { get; private set; } = null!;

        [Output("ipSourceGroupId")]
        public Output<int> IpSourceGroupId { get; private set; } = null!;

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


        /// <summary>
        /// Create a FirewallFilteringSourceGroups 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 FirewallFilteringSourceGroups(string name, FirewallFilteringSourceGroupsArgs args, CustomResourceOptions? options = null)
            : base("zia:Firewall/firewallFilteringSourceGroups:FirewallFilteringSourceGroups", name, args ?? new FirewallFilteringSourceGroupsArgs(), MakeResourceOptions(options, ""))
        {
        }

        private FirewallFilteringSourceGroups(string name, Input<string> id, FirewallFilteringSourceGroupsState? state = null, CustomResourceOptions? options = null)
            : base("zia:Firewall/firewallFilteringSourceGroups:FirewallFilteringSourceGroups", 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/zscaler",
            };
            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 FirewallFilteringSourceGroups 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 FirewallFilteringSourceGroups Get(string name, Input<string> id, FirewallFilteringSourceGroupsState? state = null, CustomResourceOptions? options = null)
        {
            return new FirewallFilteringSourceGroups(name, id, state, options);
        }
    }

    public sealed class FirewallFilteringSourceGroupsArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the source IP group
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

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

        /// <summary>
        /// Source IP addresses to be added to the group. Enter any number of IP addresses. You can enter:
        /// * An IP address (198.51.100.100)
        /// * A range of IP addresses 192.0.2.1-192.0.2.10
        /// * An IP address with a netmask 203.0.113.0/24
        /// </summary>
        public InputList<string> IpAddresses
        {
            get => _ipAddresses ?? (_ipAddresses = new InputList<string>());
            set => _ipAddresses = value;
        }

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

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

    public sealed class FirewallFilteringSourceGroupsState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description of the source IP group
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("ipAddresses")]
        private InputList<string>? _ipAddresses;

        /// <summary>
        /// Source IP addresses to be added to the group. Enter any number of IP addresses. You can enter:
        /// * An IP address (198.51.100.100)
        /// * A range of IP addresses 192.0.2.1-192.0.2.10
        /// * An IP address with a netmask 203.0.113.0/24
        /// </summary>
        public InputList<string> IpAddresses
        {
            get => _ipAddresses ?? (_ipAddresses = new InputList<string>());
            set => _ipAddresses = value;
        }

        [Input("ipSourceGroupId")]
        public Input<int>? IpSourceGroupId { get; set; }

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

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