1. Packages
  2. threefold
  3. API Docs
  4. Network
Threefold Grid v0.8.1 published on Wednesday, Nov 6, 2024 by Threefold

threefold.Network

Explore with Pulumi AI

threefold logo
Threefold Grid v0.8.1 published on Wednesday, Nov 6, 2024 by Threefold

    Create Network Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Network(name: string, args: NetworkArgs, opts?: CustomResourceOptions);
    @overload
    def Network(resource_name: str,
                args: NetworkArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Network(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                ip_range: Optional[str] = None,
                name: Optional[str] = None,
                nodes: Optional[Sequence[Any]] = None,
                add_wg_access: Optional[bool] = None,
                mycelium: Optional[bool] = None,
                mycelium_keys: Optional[Mapping[str, str]] = None,
                solution_type: Optional[str] = None)
    func NewNetwork(ctx *Context, name string, args NetworkArgs, opts ...ResourceOption) (*Network, error)
    public Network(string name, NetworkArgs args, CustomResourceOptions? opts = null)
    public Network(String name, NetworkArgs args)
    public Network(String name, NetworkArgs args, CustomResourceOptions options)
    
    type: threefold:Network
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var networkResource = new Threefold.Network("networkResource", new()
    {
        Description = "string",
        Ip_range = "string",
        Name = "string",
        Nodes = new[]
        {
            "any",
        },
        Add_wg_access = false,
        Mycelium = false,
        Mycelium_keys = 
        {
            { "string", "string" },
        },
        Solution_type = "string",
    });
    
    example, err := threefold.NewNetwork(ctx, "networkResource", &threefold.NetworkArgs{
    	Description: pulumi.String("string"),
    	Ip_range:    pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Nodes: pulumi.Array{
    		pulumi.Any("any"),
    	},
    	Add_wg_access: pulumi.Bool(false),
    	Mycelium:      pulumi.Bool(false),
    	Mycelium_keys: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Solution_type: pulumi.String("string"),
    })
    
    var networkResource = new Network("networkResource", NetworkArgs.builder()
        .description("string")
        .ip_range("string")
        .name("string")
        .nodes("any")
        .add_wg_access(false)
        .mycelium(false)
        .mycelium_keys(Map.of("string", "string"))
        .solution_type("string")
        .build());
    
    network_resource = threefold.Network("networkResource",
        description="string",
        ip_range="string",
        name="string",
        nodes=["any"],
        add_wg_access=False,
        mycelium=False,
        mycelium_keys={
            "string": "string",
        },
        solution_type="string")
    
    const networkResource = new threefold.Network("networkResource", {
        description: "string",
        ip_range: "string",
        name: "string",
        nodes: ["any"],
        add_wg_access: false,
        mycelium: false,
        mycelium_keys: {
            string: "string",
        },
        solution_type: "string",
    });
    
    type: threefold:Network
    properties:
        add_wg_access: false
        description: string
        ip_range: string
        mycelium: false
        mycelium_keys:
            string: string
        name: string
        nodes:
            - any
        solution_type: string
    

    Network Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Network resource accepts the following input properties:

    Description string
    The description of the network workload, optional with no restrictions
    Ip_range string
    The IP range for the network, subnet should be 16
    Name string
    The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported
    Nodes List<object>
    The nodes used to deploy the network on, shouldn't be empty
    Add_wg_access bool
    A flag to support wireguard in the network
    Mycelium bool
    A flag to generate a random mycelium key to support mycelium in the network
    Mycelium_keys Dictionary<string, string>
    A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes
    Solution_type string
    The solution type of the network, displayed as project name in contract metadata
    Description string
    The description of the network workload, optional with no restrictions
    Ip_range string
    The IP range for the network, subnet should be 16
    Name string
    The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported
    Nodes []interface{}
    The nodes used to deploy the network on, shouldn't be empty
    Add_wg_access bool
    A flag to support wireguard in the network
    Mycelium bool
    A flag to generate a random mycelium key to support mycelium in the network
    Mycelium_keys map[string]string
    A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes
    Solution_type string
    The solution type of the network, displayed as project name in contract metadata
    description String
    The description of the network workload, optional with no restrictions
    ip_range String
    The IP range for the network, subnet should be 16
    name String
    The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported
    nodes List<Object>
    The nodes used to deploy the network on, shouldn't be empty
    add_wg_access Boolean
    A flag to support wireguard in the network
    mycelium Boolean
    A flag to generate a random mycelium key to support mycelium in the network
    mycelium_keys Map<String,String>
    A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes
    solution_type String
    The solution type of the network, displayed as project name in contract metadata
    description string
    The description of the network workload, optional with no restrictions
    ip_range string
    The IP range for the network, subnet should be 16
    name string
    The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported
    nodes any[]
    The nodes used to deploy the network on, shouldn't be empty
    add_wg_access boolean
    A flag to support wireguard in the network
    mycelium boolean
    A flag to generate a random mycelium key to support mycelium in the network
    mycelium_keys {[key: string]: string}
    A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes
    solution_type string
    The solution type of the network, displayed as project name in contract metadata
    description str
    The description of the network workload, optional with no restrictions
    ip_range str
    The IP range for the network, subnet should be 16
    name str
    The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported
    nodes Sequence[Any]
    The nodes used to deploy the network on, shouldn't be empty
    add_wg_access bool
    A flag to support wireguard in the network
    mycelium bool
    A flag to generate a random mycelium key to support mycelium in the network
    mycelium_keys Mapping[str, str]
    A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes
    solution_type str
    The solution type of the network, displayed as project name in contract metadata
    description String
    The description of the network workload, optional with no restrictions
    ip_range String
    The IP range for the network, subnet should be 16
    name String
    The name of the network workload, it's required and cannot exceed 50 characters. Only alphanumeric and underscores characters are supported
    nodes List<Any>
    The nodes used to deploy the network on, shouldn't be empty
    add_wg_access Boolean
    A flag to support wireguard in the network
    mycelium Boolean
    A flag to generate a random mycelium key to support mycelium in the network
    mycelium_keys Map<String>
    A map of nodes as a key and mycelium key for each node, mycelium key length should be 32. Selected nodes must be included in the network's nodes
    solution_type String
    The solution type of the network, displayed as project name in contract metadata

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Network resource produces the following output properties:

    Access_wg_config string
    Generated wireguard configuration for external user access to the network
    External_ip string
    Wireguard IP assigned for external user access
    External_sk string
    External user private key used in encryption while communicating through Wireguard network
    Id string
    The provider-assigned unique ID for this managed resource.
    Node_deployment_id Dictionary<string, int>
    Mapping from each node to its deployment id
    Nodes_ip_range Dictionary<string, string>
    Computed values of nodes' IP ranges after deployment
    Public_node_id int
    Public node id (in case it's added). Used for wireguard access and supporting hidden nodes
    Access_wg_config string
    Generated wireguard configuration for external user access to the network
    External_ip string
    Wireguard IP assigned for external user access
    External_sk string
    External user private key used in encryption while communicating through Wireguard network
    Id string
    The provider-assigned unique ID for this managed resource.
    Node_deployment_id map[string]int
    Mapping from each node to its deployment id
    Nodes_ip_range map[string]string
    Computed values of nodes' IP ranges after deployment
    Public_node_id int
    Public node id (in case it's added). Used for wireguard access and supporting hidden nodes
    access_wg_config String
    Generated wireguard configuration for external user access to the network
    external_ip String
    Wireguard IP assigned for external user access
    external_sk String
    External user private key used in encryption while communicating through Wireguard network
    id String
    The provider-assigned unique ID for this managed resource.
    node_deployment_id Map<String,Integer>
    Mapping from each node to its deployment id
    nodes_ip_range Map<String,String>
    Computed values of nodes' IP ranges after deployment
    public_node_id Integer
    Public node id (in case it's added). Used for wireguard access and supporting hidden nodes
    access_wg_config string
    Generated wireguard configuration for external user access to the network
    external_ip string
    Wireguard IP assigned for external user access
    external_sk string
    External user private key used in encryption while communicating through Wireguard network
    id string
    The provider-assigned unique ID for this managed resource.
    node_deployment_id {[key: string]: number}
    Mapping from each node to its deployment id
    nodes_ip_range {[key: string]: string}
    Computed values of nodes' IP ranges after deployment
    public_node_id number
    Public node id (in case it's added). Used for wireguard access and supporting hidden nodes
    access_wg_config str
    Generated wireguard configuration for external user access to the network
    external_ip str
    Wireguard IP assigned for external user access
    external_sk str
    External user private key used in encryption while communicating through Wireguard network
    id str
    The provider-assigned unique ID for this managed resource.
    node_deployment_id Mapping[str, int]
    Mapping from each node to its deployment id
    nodes_ip_range Mapping[str, str]
    Computed values of nodes' IP ranges after deployment
    public_node_id int
    Public node id (in case it's added). Used for wireguard access and supporting hidden nodes
    access_wg_config String
    Generated wireguard configuration for external user access to the network
    external_ip String
    Wireguard IP assigned for external user access
    external_sk String
    External user private key used in encryption while communicating through Wireguard network
    id String
    The provider-assigned unique ID for this managed resource.
    node_deployment_id Map<Number>
    Mapping from each node to its deployment id
    nodes_ip_range Map<String>
    Computed values of nodes' IP ranges after deployment
    public_node_id Number
    Public node id (in case it's added). Used for wireguard access and supporting hidden nodes

    Package Details

    Repository
    threefold threefoldtech/pulumi-threefold
    License
    Apache-2.0
    threefold logo
    Threefold Grid v0.8.1 published on Wednesday, Nov 6, 2024 by Threefold