// *** WARNING: this file was generated by pulumi-language-dotnet. ***
// *** 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 Maxvojtkov.Dokploy
{
///
/// A Docker network managed by Dokploy.
///
/// Attach services to it with `NetworkIds` on `dokploy.Application`, `dokploy.Compose` and the database resources. Every service also joins the shared `dokploy-network` unless `DetachDokployNetwork` is set.
///
/// > Docker networks are immutable. Dokploy has no update endpoint, so changing any attribute replaces the network — which detaches the services currently using it until they redeploy.
///
[DokployResourceType("dokploy:index/network:Network")]
public partial class Network : global::Pulumi.CustomResource
{
///
/// Allow standalone containers to attach to an overlay network.
///
[Output("attachable")]
public Output Attachable { get; private set; } = null!;
///
/// RFC 3339 timestamp of when the network was created.
///
[Output("createdAt")]
public Output CreatedAt { get; private set; } = null!;
///
/// Network driver. Use `Overlay` for multi-node Swarm clusters and `Bridge` for a single host. Valid values: `Bridge`, `Overlay`.
///
[Output("driver")]
public Output Driver { get; private set; } = null!;
///
/// Enable IPv4 address allocation.
///
[Output("enableIpv4")]
public Output EnableIpv4 { get; private set; } = null!;
///
/// Enable IPv6 address allocation.
///
[Output("enableIpv6")]
public Output EnableIpv6 { get; private set; } = null!;
///
/// Isolate the network from external access.
///
[Output("internal")]
public Output Internal { get; private set; } = null!;
///
/// Custom IP address management, as a JSON object with `Subnet`, `Gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
///
[Output("ipam")]
public Output Ipam { get; private set; } = null!;
///
/// Maximum transmission unit for the network. Leave unset to use Docker's default.
///
[Output("mtu")]
public Output Mtu { get; private set; } = null!;
///
/// Name of the Docker network.
///
[Output("name")]
public Output Name { get; private set; } = null!;
///
/// Organization that owns the network.
///
[Output("organizationId")]
public Output OrganizationId { get; private set; } = null!;
///
/// Remote server to create the network on. Omit to use the Dokploy host itself.
///
[Output("serverId")]
public Output ServerId { get; private set; } = null!;
///
/// Create a Network resource with the given unique name, arguments, and options.
///
///
/// The unique name of the resource
/// The arguments used to populate this resource's properties
/// A bag of options that control this resource's behavior
public Network(string name, NetworkArgs? args = null, CustomResourceOptions? options = null)
: base("dokploy:index/network:Network", name, args ?? new NetworkArgs(), MakeResourceOptions(options, ""))
{
}
private Network(string name, Input id, NetworkState? state = null, CustomResourceOptions? options = null)
: base("dokploy:index/network:Network", name, state, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${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;
}
///
/// Get an existing Network resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
///
///
/// The unique name of the resulting resource.
/// The unique provider ID of the resource to lookup.
/// Any extra arguments used during the lookup.
/// A bag of options that control this resource's behavior
public static Network Get(string name, Input id, NetworkState? state = null, CustomResourceOptions? options = null)
{
return new Network(name, id, state, options);
}
}
public sealed class NetworkArgs : global::Pulumi.ResourceArgs
{
///
/// Allow standalone containers to attach to an overlay network.
///
[Input("attachable")]
public Input? Attachable { get; set; }
///
/// Network driver. Use `Overlay` for multi-node Swarm clusters and `Bridge` for a single host. Valid values: `Bridge`, `Overlay`.
///
[Input("driver")]
public Input? Driver { get; set; }
///
/// Enable IPv4 address allocation.
///
[Input("enableIpv4")]
public Input? EnableIpv4 { get; set; }
///
/// Enable IPv6 address allocation.
///
[Input("enableIpv6")]
public Input? EnableIpv6 { get; set; }
///
/// Isolate the network from external access.
///
[Input("internal")]
public Input? Internal { get; set; }
///
/// Custom IP address management, as a JSON object with `Subnet`, `Gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
///
[Input("ipam")]
public Input? Ipam { get; set; }
///
/// Maximum transmission unit for the network. Leave unset to use Docker's default.
///
[Input("mtu")]
public Input? Mtu { get; set; }
///
/// Name of the Docker network.
///
[Input("name")]
public Input? Name { get; set; }
///
/// Remote server to create the network on. Omit to use the Dokploy host itself.
///
[Input("serverId")]
public Input? ServerId { get; set; }
public NetworkArgs()
{
}
public static new NetworkArgs Empty => new NetworkArgs();
}
public sealed class NetworkState : global::Pulumi.ResourceArgs
{
///
/// Allow standalone containers to attach to an overlay network.
///
[Input("attachable")]
public Input? Attachable { get; set; }
///
/// RFC 3339 timestamp of when the network was created.
///
[Input("createdAt")]
public Input? CreatedAt { get; set; }
///
/// Network driver. Use `Overlay` for multi-node Swarm clusters and `Bridge` for a single host. Valid values: `Bridge`, `Overlay`.
///
[Input("driver")]
public Input? Driver { get; set; }
///
/// Enable IPv4 address allocation.
///
[Input("enableIpv4")]
public Input? EnableIpv4 { get; set; }
///
/// Enable IPv6 address allocation.
///
[Input("enableIpv6")]
public Input? EnableIpv6 { get; set; }
///
/// Isolate the network from external access.
///
[Input("internal")]
public Input? Internal { get; set; }
///
/// Custom IP address management, as a JSON object with `Subnet`, `Gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
///
[Input("ipam")]
public Input? Ipam { get; set; }
///
/// Maximum transmission unit for the network. Leave unset to use Docker's default.
///
[Input("mtu")]
public Input? Mtu { get; set; }
///
/// Name of the Docker network.
///
[Input("name")]
public Input? Name { get; set; }
///
/// Organization that owns the network.
///
[Input("organizationId")]
public Input? OrganizationId { get; set; }
///
/// Remote server to create the network on. Omit to use the Dokploy host itself.
///
[Input("serverId")]
public Input? ServerId { get; set; }
public NetworkState()
{
}
public static new NetworkState Empty => new NetworkState();
}
}