1. Registry
  2. Packages
  3. Gcore Provider
  4. API Docs
  5. Network
Viewing docs for gcore 0.36.0
published on Friday, Aug 28, 2026 by g-core
Viewing docs for gcore 0.36.0
published on Friday, Aug 28, 2026 by g-core

    Represent network. A network is a software-defined network in a cloud computing infrastructure

    Example Usage

    Prerequisite

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const project = gcore.getProject({
        name: "Default",
    });
    const region = gcore.getRegion({
        name: "Luxembourg-2",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    project = gcore.get_project(name="Default")
    region = gcore.get_region(name="Luxembourg-2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
    			Name: "Default",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = gcore.GetRegion(ctx, &gcore.GetRegionArgs{
    			Name: "Luxembourg-2",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var project = Gcore.GetProject.Invoke(new()
        {
            Name = "Default",
        });
    
        var region = Gcore.GetRegion.Invoke(new()
        {
            Name = "Luxembourg-2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetProjectArgs;
    import com.pulumi.gcore.inputs.GetRegionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var project = GcoreFunctions.getProject(GetProjectArgs.builder()
                .name("Default")
                .build());
    
            final var region = GcoreFunctions.getRegion(GetRegionArgs.builder()
                .name("Luxembourg-2")
                .build());
    
        }
    }
    
    variables:
      project:
        fn::invoke:
          function: gcore:getProject
          arguments:
            name: Default
      region:
        fn::invoke:
          function: gcore:getRegion
          arguments:
            name: Luxembourg-2
    
    Example coming soon!
    

    Basic Network

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const basic = new gcore.Network("basic", {
        projectId: project.id,
        regionId: region.id,
        name: "my-network",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    basic = gcore.Network("basic",
        project_id=project["id"],
        region_id=region["id"],
        name="my-network")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewNetwork(ctx, "basic", &gcore.NetworkArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RegionId:  pulumi.Any(region.Id),
    			Name:      pulumi.String("my-network"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var basic = new Gcore.Network("basic", new()
        {
            ProjectId = project.Id,
            RegionId = region.Id,
            Name = "my-network",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Network;
    import com.pulumi.gcore.NetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var basic = new Network("basic", NetworkArgs.builder()
                .projectId(project.id())
                .regionId(region.id())
                .name("my-network")
                .build());
    
        }
    }
    
    resources:
      basic:
        type: gcore:Network
        properties:
          projectId: ${project.id}
          regionId: ${region.id}
          name: my-network
    
    Example coming soon!
    

    Network with Metadata

    Creates a network with custom metadata tags for organization and management.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const withMetadata = new gcore.Network("with_metadata", {
        projectId: project.id,
        regionId: region.id,
        name: "my-tagged-network",
        metadataMap: {
            environment: "production",
            team: "platform",
            managed_by: "terraform",
        },
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    with_metadata = gcore.Network("with_metadata",
        project_id=project["id"],
        region_id=region["id"],
        name="my-tagged-network",
        metadata_map={
            "environment": "production",
            "team": "platform",
            "managed_by": "terraform",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewNetwork(ctx, "with_metadata", &gcore.NetworkArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RegionId:  pulumi.Any(region.Id),
    			Name:      pulumi.String("my-tagged-network"),
    			MetadataMap: pulumi.StringMap{
    				"environment": pulumi.String("production"),
    				"team":        pulumi.String("platform"),
    				"managed_by":  pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var withMetadata = new Gcore.Network("with_metadata", new()
        {
            ProjectId = project.Id,
            RegionId = region.Id,
            Name = "my-tagged-network",
            MetadataMap = 
            {
                { "environment", "production" },
                { "team", "platform" },
                { "managed_by", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Network;
    import com.pulumi.gcore.NetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var withMetadata = new Network("withMetadata", NetworkArgs.builder()
                .projectId(project.id())
                .regionId(region.id())
                .name("my-tagged-network")
                .metadataMap(Map.ofEntries(
                    Map.entry("environment", "production"),
                    Map.entry("team", "platform"),
                    Map.entry("managed_by", "terraform")
                ))
                .build());
    
        }
    }
    
    resources:
      withMetadata:
        type: gcore:Network
        name: with_metadata
        properties:
          projectId: ${project.id}
          regionId: ${region.id}
          name: my-tagged-network
          metadataMap:
            environment: production
            team: platform
            managed_by: terraform
    
    Example coming soon!
    

    Network without Router

    Creates an isolated network without automatic external router creation. Useful for internal-only networks.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const isolated = new gcore.Network("isolated", {
        projectId: project.id,
        regionId: region.id,
        name: "isolated-network",
        createRouter: false,
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    isolated = gcore.Network("isolated",
        project_id=project["id"],
        region_id=region["id"],
        name="isolated-network",
        create_router=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.NewNetwork(ctx, "isolated", &gcore.NetworkArgs{
    			ProjectId:    pulumi.Any(project.Id),
    			RegionId:     pulumi.Any(region.Id),
    			Name:         pulumi.String("isolated-network"),
    			CreateRouter: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var isolated = new Gcore.Network("isolated", new()
        {
            ProjectId = project.Id,
            RegionId = region.Id,
            Name = "isolated-network",
            CreateRouter = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Network;
    import com.pulumi.gcore.NetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var isolated = new Network("isolated", NetworkArgs.builder()
                .projectId(project.id())
                .regionId(region.id())
                .name("isolated-network")
                .createRouter(false)
                .build());
    
        }
    }
    
    resources:
      isolated:
        type: gcore:Network
        properties:
          projectId: ${project.id}
          regionId: ${region.id}
          name: isolated-network
          createRouter: false
    
    Example coming soon!
    

    Complete Setup

    Full example creating a network with a subnet, demonstrating a typical workflow.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    // Complete example: Network with subnet
    // 1. Create the network
    const main = new gcore.Network("main", {
        projectId: project.id,
        regionId: region.id,
        name: "my-application-network",
        metadataMap: {
            environment: "production",
            managed_by: "terraform",
        },
    });
    // 2. Create a subnet in the network
    const mainSubnet = new gcore.Subnet("main", {
        projectId: project.id,
        regionId: region.id,
        name: "my-application-subnet",
        cidr: "192.168.0.0/24",
        networkId: main.networkId,
        gatewayIp: "192.168.0.1",
        dnsNameservers: [
            "8.8.8.8",
            "8.8.4.4",
        ],
    });
    export const networkId = main.networkId;
    export const subnetId = mainSubnet.subnetId;
    
    import pulumi
    import pulumi_gcore as gcore
    
    # Complete example: Network with subnet
    # 1. Create the network
    main = gcore.Network("main",
        project_id=project["id"],
        region_id=region["id"],
        name="my-application-network",
        metadata_map={
            "environment": "production",
            "managed_by": "terraform",
        })
    # 2. Create a subnet in the network
    main_subnet = gcore.Subnet("main",
        project_id=project["id"],
        region_id=region["id"],
        name="my-application-subnet",
        cidr="192.168.0.0/24",
        network_id=main.network_id,
        gateway_ip="192.168.0.1",
        dns_nameservers=[
            "8.8.8.8",
            "8.8.4.4",
        ])
    pulumi.export("networkId", main.network_id)
    pulumi.export("subnetId", main_subnet.subnet_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Complete example: Network with subnet
    		// 1. Create the network
    		main, err := gcore.NewNetwork(ctx, "main", &gcore.NetworkArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RegionId:  pulumi.Any(region.Id),
    			Name:      pulumi.String("my-application-network"),
    			MetadataMap: pulumi.StringMap{
    				"environment": pulumi.String("production"),
    				"managed_by":  pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// 2. Create a subnet in the network
    		mainSubnet, err := gcore.NewSubnet(ctx, "main", &gcore.SubnetArgs{
    			ProjectId: pulumi.Any(project.Id),
    			RegionId:  pulumi.Any(region.Id),
    			Name:      pulumi.String("my-application-subnet"),
    			Cidr:      pulumi.String("192.168.0.0/24"),
    			NetworkId: main.NetworkId,
    			GatewayIp: pulumi.String("192.168.0.1"),
    			DnsNameservers: pulumi.StringArray{
    				pulumi.String("8.8.8.8"),
    				pulumi.String("8.8.4.4"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("networkId", main.NetworkId)
    		ctx.Export("subnetId", mainSubnet.SubnetId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        // Complete example: Network with subnet
        // 1. Create the network
        var main = new Gcore.Network("main", new()
        {
            ProjectId = project.Id,
            RegionId = region.Id,
            Name = "my-application-network",
            MetadataMap = 
            {
                { "environment", "production" },
                { "managed_by", "terraform" },
            },
        });
    
        // 2. Create a subnet in the network
        var mainSubnet = new Gcore.Subnet("main", new()
        {
            ProjectId = project.Id,
            RegionId = region.Id,
            Name = "my-application-subnet",
            Cidr = "192.168.0.0/24",
            NetworkId = main.NetworkId,
            GatewayIp = "192.168.0.1",
            DnsNameservers = new[]
            {
                "8.8.8.8",
                "8.8.4.4",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["networkId"] = main.NetworkId,
            ["subnetId"] = mainSubnet.SubnetId,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Network;
    import com.pulumi.gcore.NetworkArgs;
    import com.pulumi.gcore.Subnet;
    import com.pulumi.gcore.SubnetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Complete example: Network with subnet
            // 1. Create the network
            var main = new Network("main", NetworkArgs.builder()
                .projectId(project.id())
                .regionId(region.id())
                .name("my-application-network")
                .metadataMap(Map.ofEntries(
                    Map.entry("environment", "production"),
                    Map.entry("managed_by", "terraform")
                ))
                .build());
    
            // 2. Create a subnet in the network
            var mainSubnet = new Subnet("mainSubnet", SubnetArgs.builder()
                .projectId(project.id())
                .regionId(region.id())
                .name("my-application-subnet")
                .cidr("192.168.0.0/24")
                .networkId(main.networkId())
                .gatewayIp("192.168.0.1")
                .dnsNameservers(            
                    "8.8.8.8",
                    "8.8.4.4")
                .build());
    
            ctx.export("networkId", main.networkId());
            ctx.export("subnetId", mainSubnet.subnetId());
        }
    }
    
    resources:
      # Complete example: Network with subnet
    
      # 1. Create the network
      main:
        type: gcore:Network
        properties:
          projectId: ${project.id}
          regionId: ${region.id}
          name: my-application-network
          metadataMap:
            environment: production
            managed_by: terraform
      # 2. Create a subnet in the network
      mainSubnet:
        type: gcore:Subnet
        name: main
        properties:
          projectId: ${project.id}
          regionId: ${region.id}
          name: my-application-subnet
          cidr: 192.168.0.0/24
          networkId: ${main.networkId}
          gatewayIp: 192.168.0.1
          dnsNameservers:
            - 8.8.8.8
            - 8.8.4.4
    outputs:
      # Outputs
      networkId: ${main.networkId}
      subnetId: ${mainSubnet.subnetId}
    
    Example coming soon!
    

    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: Optional[NetworkArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Network(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                create_router: Optional[bool] = None,
                metadata_map: Optional[Mapping[str, str]] = None,
                name: Optional[str] = None,
                network_id: Optional[str] = None,
                project_id: Optional[float] = None,
                project_name: Optional[str] = None,
                region_id: Optional[float] = None,
                region_name: Optional[str] = None,
                type: Optional[str] = None)
    func NewNetwork(ctx *Context, name string, args *NetworkArgs, opts ...ResourceOption) (*Network, error)
    public Network(string name, NetworkArgs? args = null, CustomResourceOptions? opts = null)
    public Network(String name, NetworkArgs args)
    public Network(String name, NetworkArgs args, CustomResourceOptions options)
    
    type: gcore:Network
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcore_network" "name" {
        # resource properties
    }

    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 Gcore.Network("networkResource", new()
    {
        CreateRouter = false,
        MetadataMap = 
        {
            { "string", "string" },
        },
        Name = "string",
        NetworkId = "string",
        ProjectId = 0.0,
        ProjectName = "string",
        RegionId = 0.0,
        RegionName = "string",
        Type = "string",
    });
    
    example, err := gcore.NewNetwork(ctx, "networkResource", &gcore.NetworkArgs{
    	CreateRouter: pulumi.Bool(false),
    	MetadataMap: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:        pulumi.String("string"),
    	NetworkId:   pulumi.String("string"),
    	ProjectId:   pulumi.Float64(0),
    	ProjectName: pulumi.String("string"),
    	RegionId:    pulumi.Float64(0),
    	RegionName:  pulumi.String("string"),
    	Type:        pulumi.String("string"),
    })
    
    resource "gcore_network" "networkResource" {
      lifecycle {
        create_before_destroy = true
      }
      create_router = false
      metadata_map = {
        "string" = "string"
      }
      name         = "string"
      network_id   = "string"
      project_id   = 0
      project_name = "string"
      region_id    = 0
      region_name  = "string"
      type         = "string"
    }
    
    var networkResource = new Network("networkResource", NetworkArgs.builder()
        .createRouter(false)
        .metadataMap(Map.of("string", "string"))
        .name("string")
        .networkId("string")
        .projectId(0.0)
        .projectName("string")
        .regionId(0.0)
        .regionName("string")
        .type("string")
        .build());
    
    network_resource = gcore.Network("networkResource",
        create_router=False,
        metadata_map={
            "string": "string",
        },
        name="string",
        network_id="string",
        project_id=float(0),
        project_name="string",
        region_id=float(0),
        region_name="string",
        type="string")
    
    const networkResource = new gcore.Network("networkResource", {
        createRouter: false,
        metadataMap: {
            string: "string",
        },
        name: "string",
        networkId: "string",
        projectId: 0,
        projectName: "string",
        regionId: 0,
        regionName: "string",
        type: "string",
    });
    
    type: gcore:Network
    properties:
        createRouter: false
        metadataMap:
            string: string
        name: string
        networkId: string
        projectId: 0
        projectName: string
        regionId: 0
        regionName: string
        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:

    CreateRouter bool
    Create external router to the network, default true
    MetadataMap Dictionary<string, string>
    A map of metadata key-value pairs to associate with the network.
    Name string
    The name of the network.
    NetworkId string
    The ID of this resource.
    ProjectId double
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    CreateRouter bool
    Create external router to the network, default true
    MetadataMap map[string]string
    A map of metadata key-value pairs to associate with the network.
    Name string
    The name of the network.
    NetworkId string
    The ID of this resource.
    ProjectId float64
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    create_router bool
    Create external router to the network, default true
    metadata_map map(string)
    A map of metadata key-value pairs to associate with the network.
    name string
    The name of the network.
    network_id string
    The ID of this resource.
    project_id number
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    project_name string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id number
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    region_name string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    createRouter Boolean
    Create external router to the network, default true
    metadataMap Map<String,String>
    A map of metadata key-value pairs to associate with the network.
    name String
    The name of the network.
    networkId String
    The ID of this resource.
    projectId Double
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type String
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    createRouter boolean
    Create external router to the network, default true
    metadataMap {[key: string]: string}
    A map of metadata key-value pairs to associate with the network.
    name string
    The name of the network.
    networkId string
    The ID of this resource.
    projectId number
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    create_router bool
    Create external router to the network, default true
    metadata_map Mapping[str, str]
    A map of metadata key-value pairs to associate with the network.
    name str
    The name of the network.
    network_id str
    The ID of this resource.
    project_id float
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type str
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    createRouter Boolean
    Create external router to the network, default true
    metadataMap Map<String>
    A map of metadata key-value pairs to associate with the network.
    name String
    The name of the network.
    networkId String
    The ID of this resource.
    projectId Number
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type String
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    The timestamp of the last update.
    MetadataReadOnlies List<NetworkMetadataReadOnly>
    A list of read-only metadata items, e.g. tags set by the platform.
    Mtu double
    Maximum transmission unit (MTU) for the network.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    The timestamp of the last update.
    MetadataReadOnlies []NetworkMetadataReadOnly
    A list of read-only metadata items, e.g. tags set by the platform.
    Mtu float64
    Maximum transmission unit (MTU) for the network.
    id string
    The provider-assigned unique ID for this managed resource.
    last_updated string
    The timestamp of the last update.
    metadata_read_onlies list(object)
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu number
    Maximum transmission unit (MTU) for the network.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    The timestamp of the last update.
    metadataReadOnlies List<NetworkMetadataReadOnly>
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu Double
    Maximum transmission unit (MTU) for the network.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    The timestamp of the last update.
    metadataReadOnlies NetworkMetadataReadOnly[]
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu number
    Maximum transmission unit (MTU) for the network.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    The timestamp of the last update.
    metadata_read_onlies Sequence[NetworkMetadataReadOnly]
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu float
    Maximum transmission unit (MTU) for the network.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    The timestamp of the last update.
    metadataReadOnlies List<Property Map>
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu Number
    Maximum transmission unit (MTU) for the network.

    Look up Existing Network Resource

    Get an existing Network resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NetworkState, opts?: CustomResourceOptions): Network
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_router: Optional[bool] = None,
            last_updated: Optional[str] = None,
            metadata_map: Optional[Mapping[str, str]] = None,
            metadata_read_onlies: Optional[Sequence[NetworkMetadataReadOnlyArgs]] = None,
            mtu: Optional[float] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            project_id: Optional[float] = None,
            project_name: Optional[str] = None,
            region_id: Optional[float] = None,
            region_name: Optional[str] = None,
            type: Optional[str] = None) -> Network
    func GetNetwork(ctx *Context, name string, id IDInput, state *NetworkState, opts ...ResourceOption) (*Network, error)
    public static Network Get(string name, Input<string> id, NetworkState? state, CustomResourceOptions? opts = null)
    public static Network get(String name, Output<String> id, NetworkState state, CustomResourceOptions options)
    resources:  _:    type: gcore:Network    get:      id: ${id}
    import {
      to = gcore_network.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateRouter bool
    Create external router to the network, default true
    LastUpdated string
    The timestamp of the last update.
    MetadataMap Dictionary<string, string>
    A map of metadata key-value pairs to associate with the network.
    MetadataReadOnlies List<NetworkMetadataReadOnly>
    A list of read-only metadata items, e.g. tags set by the platform.
    Mtu double
    Maximum transmission unit (MTU) for the network.
    Name string
    The name of the network.
    NetworkId string
    The ID of this resource.
    ProjectId double
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    CreateRouter bool
    Create external router to the network, default true
    LastUpdated string
    The timestamp of the last update.
    MetadataMap map[string]string
    A map of metadata key-value pairs to associate with the network.
    MetadataReadOnlies []NetworkMetadataReadOnlyArgs
    A list of read-only metadata items, e.g. tags set by the platform.
    Mtu float64
    Maximum transmission unit (MTU) for the network.
    Name string
    The name of the network.
    NetworkId string
    The ID of this resource.
    ProjectId float64
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    create_router bool
    Create external router to the network, default true
    last_updated string
    The timestamp of the last update.
    metadata_map map(string)
    A map of metadata key-value pairs to associate with the network.
    metadata_read_onlies list(object)
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu number
    Maximum transmission unit (MTU) for the network.
    name string
    The name of the network.
    network_id string
    The ID of this resource.
    project_id number
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    project_name string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id number
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    region_name string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    createRouter Boolean
    Create external router to the network, default true
    lastUpdated String
    The timestamp of the last update.
    metadataMap Map<String,String>
    A map of metadata key-value pairs to associate with the network.
    metadataReadOnlies List<NetworkMetadataReadOnly>
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu Double
    Maximum transmission unit (MTU) for the network.
    name String
    The name of the network.
    networkId String
    The ID of this resource.
    projectId Double
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type String
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    createRouter boolean
    Create external router to the network, default true
    lastUpdated string
    The timestamp of the last update.
    metadataMap {[key: string]: string}
    A map of metadata key-value pairs to associate with the network.
    metadataReadOnlies NetworkMetadataReadOnly[]
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu number
    Maximum transmission unit (MTU) for the network.
    name string
    The name of the network.
    networkId string
    The ID of this resource.
    projectId number
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    create_router bool
    Create external router to the network, default true
    last_updated str
    The timestamp of the last update.
    metadata_map Mapping[str, str]
    A map of metadata key-value pairs to associate with the network.
    metadata_read_onlies Sequence[NetworkMetadataReadOnlyArgs]
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu float
    Maximum transmission unit (MTU) for the network.
    name str
    The name of the network.
    network_id str
    The ID of this resource.
    project_id float
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type str
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    createRouter Boolean
    Create external router to the network, default true
    lastUpdated String
    The timestamp of the last update.
    metadataMap Map<String>
    A map of metadata key-value pairs to associate with the network.
    metadataReadOnlies List<Property Map>
    A list of read-only metadata items, e.g. tags set by the platform.
    mtu Number
    Maximum transmission unit (MTU) for the network.
    name String
    The name of the network.
    networkId String
    The ID of this resource.
    projectId Number
    The id of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The id of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    type String
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'

    Supporting Types

    NetworkMetadataReadOnly, NetworkMetadataReadOnlyArgs

    Key string
    ReadOnly bool
    Value string
    Key string
    ReadOnly bool
    Value string
    key string
    read_only bool
    value string
    key String
    readOnly Boolean
    value String
    key string
    readOnly boolean
    value string
    key str
    read_only bool
    value str
    key String
    readOnly Boolean
    value String

    Import

    import using <project_id>:<region_id>:<network_id> format

    $ pulumi import gcore:index/network:Network metwork1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    Viewing docs for gcore 0.36.0
    published on Friday, Aug 28, 2026 by g-core

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial