// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** * 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. */ export class Network extends pulumi.CustomResource { /** * Get an existing Network resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ public static get(name: string, id: pulumi.Input, state?: NetworkState, opts?: pulumi.CustomResourceOptions): Network { return new Network(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'dokploy:index/network:Network'; /** * Returns true if the given object is an instance of Network. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is Network { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Network.__pulumiType; } /** * Allow standalone containers to attach to an overlay network. */ declare public readonly attachable: pulumi.Output; /** * RFC 3339 timestamp of when the network was created. */ declare public /*out*/ readonly createdAt: pulumi.Output; /** * Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`. */ declare public readonly driver: pulumi.Output; /** * Enable IPv4 address allocation. */ declare public readonly enableIpv4: pulumi.Output; /** * Enable IPv6 address allocation. */ declare public readonly enableIpv6: pulumi.Output; /** * Isolate the network from external access. */ declare public readonly internal: pulumi.Output; /** * Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet. */ declare public readonly ipam: pulumi.Output; /** * Maximum transmission unit for the network. Leave unset to use Docker's default. */ declare public readonly mtu: pulumi.Output; /** * Name of the Docker network. */ declare public readonly name: pulumi.Output; /** * Organization that owns the network. */ declare public /*out*/ readonly organizationId: pulumi.Output; /** * Remote server to create the network on. Omit to use the Dokploy host itself. */ declare public readonly serverId: pulumi.Output; /** * Create a Network resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: NetworkArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: NetworkArgs | NetworkState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as NetworkState | undefined; resourceInputs["attachable"] = state?.attachable; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["driver"] = state?.driver; resourceInputs["enableIpv4"] = state?.enableIpv4; resourceInputs["enableIpv6"] = state?.enableIpv6; resourceInputs["internal"] = state?.internal; resourceInputs["ipam"] = state?.ipam; resourceInputs["mtu"] = state?.mtu; resourceInputs["name"] = state?.name; resourceInputs["organizationId"] = state?.organizationId; resourceInputs["serverId"] = state?.serverId; } else { const args = argsOrState as NetworkArgs | undefined; resourceInputs["attachable"] = args?.attachable; resourceInputs["driver"] = args?.driver; resourceInputs["enableIpv4"] = args?.enableIpv4; resourceInputs["enableIpv6"] = args?.enableIpv6; resourceInputs["internal"] = args?.internal; resourceInputs["ipam"] = args?.ipam; resourceInputs["mtu"] = args?.mtu; resourceInputs["name"] = args?.name; resourceInputs["serverId"] = args?.serverId; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Network.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering Network resources. */ export interface NetworkState { /** * Allow standalone containers to attach to an overlay network. */ attachable?: pulumi.Input; /** * RFC 3339 timestamp of when the network was created. */ createdAt?: pulumi.Input; /** * Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`. */ driver?: pulumi.Input; /** * Enable IPv4 address allocation. */ enableIpv4?: pulumi.Input; /** * Enable IPv6 address allocation. */ enableIpv6?: pulumi.Input; /** * Isolate the network from external access. */ internal?: pulumi.Input; /** * Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet. */ ipam?: pulumi.Input; /** * Maximum transmission unit for the network. Leave unset to use Docker's default. */ mtu?: pulumi.Input; /** * Name of the Docker network. */ name?: pulumi.Input; /** * Organization that owns the network. */ organizationId?: pulumi.Input; /** * Remote server to create the network on. Omit to use the Dokploy host itself. */ serverId?: pulumi.Input; } /** * The set of arguments for constructing a Network resource. */ export interface NetworkArgs { /** * Allow standalone containers to attach to an overlay network. */ attachable?: pulumi.Input; /** * Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`. */ driver?: pulumi.Input; /** * Enable IPv4 address allocation. */ enableIpv4?: pulumi.Input; /** * Enable IPv6 address allocation. */ enableIpv6?: pulumi.Input; /** * Isolate the network from external access. */ internal?: pulumi.Input; /** * Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet. */ ipam?: pulumi.Input; /** * Maximum transmission unit for the network. Leave unset to use Docker's default. */ mtu?: pulumi.Input; /** * Name of the Docker network. */ name?: pulumi.Input; /** * Remote server to create the network on. Omit to use the Dokploy host itself. */ serverId?: pulumi.Input; }