// *** 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 luxifer.Scaleway
{
    /// <summary>
    /// Creates and manages the [Scaleway DHCP Reservations](https://www.scaleway.com/en/docs/network/vpc/concepts/#dhcp).
    /// 
    /// The static associations are used to assign IP addresses based on the MAC addresses of the Instance.
    /// 
    /// Statically assigned IP addresses should fall within the configured subnet, but be outside of the dynamic range.
    /// 
    /// For more information, see [the documentation](https://developers.scaleway.com/en/products/vpc-gw/api/v1/#dhcp-c05544) and [configuration guide](https://www.scaleway.com/en/docs/network/vpc/how-to/configure-a-public-gateway/#how-to-review-and-configure-dhcp).
    /// 
    /// [DHCP reservations](https://developers.scaleway.com/en/products/vpc-gw/api/v1/#dhcp-entries-e40fb6) hold both dynamic DHCP leases (IP addresses dynamically assigned by the gateway to instances) and static user-created DHCP reservations.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Scaleway = luxifer.Scaleway;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var mainVpcPrivateNetwork = new Scaleway.VpcPrivateNetwork("mainVpcPrivateNetwork");
    /// 
    ///     var mainInstanceServer = new Scaleway.InstanceServer("mainInstanceServer", new()
    ///     {
    ///         Image = "ubuntu_jammy",
    ///         Type = "DEV1-S",
    ///         Zone = "fr-par-1",
    ///         PrivateNetworks = new[]
    ///         {
    ///             new Scaleway.Inputs.InstanceServerPrivateNetworkArgs
    ///             {
    ///                 PnId = mainVpcPrivateNetwork.Id,
    ///             },
    ///         },
    ///     });
    /// 
    ///     var mainVpcPublicGatewayIp = new Scaleway.VpcPublicGatewayIp("mainVpcPublicGatewayIp");
    /// 
    ///     var mainVpcPublicGatewayDhcp = new Scaleway.VpcPublicGatewayDhcp("mainVpcPublicGatewayDhcp", new()
    ///     {
    ///         Subnet = "192.168.1.0/24",
    ///     });
    /// 
    ///     var mainVpcPublicGateway = new Scaleway.VpcPublicGateway("mainVpcPublicGateway", new()
    ///     {
    ///         Type = "VPC-GW-S",
    ///         IpId = mainVpcPublicGatewayIp.Id,
    ///     });
    /// 
    ///     var mainVpcGatewayNetwork = new Scaleway.VpcGatewayNetwork("mainVpcGatewayNetwork", new()
    ///     {
    ///         GatewayId = mainVpcPublicGateway.Id,
    ///         PrivateNetworkId = mainVpcPrivateNetwork.Id,
    ///         DhcpId = mainVpcPublicGatewayDhcp.Id,
    ///         CleanupDhcp = true,
    ///         EnableMasquerade = true,
    ///     }, new CustomResourceOptions
    ///     {
    ///         DependsOn = new[]
    ///         {
    ///             mainVpcPublicGatewayIp,
    ///             mainVpcPrivateNetwork,
    ///         },
    ///     });
    /// 
    ///     var mainVpcPublicGatewayDhcpReservation = new Scaleway.VpcPublicGatewayDhcpReservation("mainVpcPublicGatewayDhcpReservation", new()
    ///     {
    ///         GatewayNetworkId = mainVpcGatewayNetwork.Id,
    ///         MacAddress = mainInstanceServer.PrivateNetworks.Apply(privateNetworks =&gt; privateNetworks[0]?.MacAddress),
    ///         IpAddress = "192.168.1.1",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Public gateway DHCP Reservation config can be imported using the `{zone}/{id}`, e.g. bash
    /// 
    /// ```sh
    ///  $ pulumi import scaleway:index/vpcPublicGatewayDhcpReservation:VpcPublicGatewayDhcpReservation main fr-par-1/11111111-1111-1111-1111-111111111111
    /// ```
    /// </summary>
    [ScalewayResourceType("scaleway:index/vpcPublicGatewayDhcpReservation:VpcPublicGatewayDhcpReservation")]
    public partial class VpcPublicGatewayDhcpReservation : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The date and time of the creation of the public gateway DHCP config.
        /// </summary>
        [Output("createdAt")]
        public Output<string> CreatedAt { get; private set; } = null!;

        /// <summary>
        /// The ID of the owning GatewayNetwork.
        /// </summary>
        [Output("gatewayNetworkId")]
        public Output<string> GatewayNetworkId { get; private set; } = null!;

        /// <summary>
        /// The Hostname of the client machine.
        /// </summary>
        [Output("hostname")]
        public Output<string> Hostname { get; private set; } = null!;

        /// <summary>
        /// The IP address to give to the machine (IP address).
        /// </summary>
        [Output("ipAddress")]
        public Output<string> IpAddress { get; private set; } = null!;

        /// <summary>
        /// The MAC address to give a static entry to.
        /// </summary>
        [Output("macAddress")]
        public Output<string> MacAddress { get; private set; } = null!;

        /// <summary>
        /// The reservation type, either static (DHCP reservation) or dynamic (DHCP lease). Possible values are reservation and lease.
        /// </summary>
        [Output("type")]
        public Output<string> Type { get; private set; } = null!;

        /// <summary>
        /// The date and time of the last update of the public gateway DHCP config.
        /// </summary>
        [Output("updatedAt")]
        public Output<string> UpdatedAt { get; private set; } = null!;

        /// <summary>
        /// `zone`) The zone in which the public gateway DHCP config should be created.
        /// </summary>
        [Output("zone")]
        public Output<string> Zone { get; private set; } = null!;


        /// <summary>
        /// Create a VpcPublicGatewayDhcpReservation 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 VpcPublicGatewayDhcpReservation(string name, VpcPublicGatewayDhcpReservationArgs args, CustomResourceOptions? options = null)
            : base("scaleway:index/vpcPublicGatewayDhcpReservation:VpcPublicGatewayDhcpReservation", name, args ?? new VpcPublicGatewayDhcpReservationArgs(), MakeResourceOptions(options, ""))
        {
        }

        private VpcPublicGatewayDhcpReservation(string name, Input<string> id, VpcPublicGatewayDhcpReservationState? state = null, CustomResourceOptions? options = null)
            : base("scaleway:index/vpcPublicGatewayDhcpReservation:VpcPublicGatewayDhcpReservation", 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/luxifer/pulumi-scaleway",
            };
            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 VpcPublicGatewayDhcpReservation 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 VpcPublicGatewayDhcpReservation Get(string name, Input<string> id, VpcPublicGatewayDhcpReservationState? state = null, CustomResourceOptions? options = null)
        {
            return new VpcPublicGatewayDhcpReservation(name, id, state, options);
        }
    }

    public sealed class VpcPublicGatewayDhcpReservationArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the owning GatewayNetwork.
        /// </summary>
        [Input("gatewayNetworkId", required: true)]
        public Input<string> GatewayNetworkId { get; set; } = null!;

        /// <summary>
        /// The IP address to give to the machine (IP address).
        /// </summary>
        [Input("ipAddress", required: true)]
        public Input<string> IpAddress { get; set; } = null!;

        /// <summary>
        /// The MAC address to give a static entry to.
        /// </summary>
        [Input("macAddress", required: true)]
        public Input<string> MacAddress { get; set; } = null!;

        /// <summary>
        /// `zone`) The zone in which the public gateway DHCP config should be created.
        /// </summary>
        [Input("zone")]
        public Input<string>? Zone { get; set; }

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

    public sealed class VpcPublicGatewayDhcpReservationState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The date and time of the creation of the public gateway DHCP config.
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

        /// <summary>
        /// The ID of the owning GatewayNetwork.
        /// </summary>
        [Input("gatewayNetworkId")]
        public Input<string>? GatewayNetworkId { get; set; }

        /// <summary>
        /// The Hostname of the client machine.
        /// </summary>
        [Input("hostname")]
        public Input<string>? Hostname { get; set; }

        /// <summary>
        /// The IP address to give to the machine (IP address).
        /// </summary>
        [Input("ipAddress")]
        public Input<string>? IpAddress { get; set; }

        /// <summary>
        /// The MAC address to give a static entry to.
        /// </summary>
        [Input("macAddress")]
        public Input<string>? MacAddress { get; set; }

        /// <summary>
        /// The reservation type, either static (DHCP reservation) or dynamic (DHCP lease). Possible values are reservation and lease.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        /// <summary>
        /// The date and time of the last update of the public gateway DHCP config.
        /// </summary>
        [Input("updatedAt")]
        public Input<string>? UpdatedAt { get; set; }

        /// <summary>
        /// `zone`) The zone in which the public gateway DHCP config should be created.
        /// </summary>
        [Input("zone")]
        public Input<string>? Zone { get; set; }

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