gcp.edgenetwork.Network
Explore with Pulumi AI
A Distributed Cloud Edge network, which provides L3 isolation within a zone.
To get more information about Network, see:
- API documentation
- How-to Guides
Example Usage
Edgenetwork Network
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const exampleNetwork = new gcp.edgenetwork.Network("example_network", {
networkId: "example-network",
location: "us-west1",
zone: "",
description: "Example network.",
mtu: 9000,
labels: {
environment: "dev",
},
});
import pulumi
import pulumi_gcp as gcp
example_network = gcp.edgenetwork.Network("example_network",
network_id="example-network",
location="us-west1",
zone="",
description="Example network.",
mtu=9000,
labels={
"environment": "dev",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/edgenetwork"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := edgenetwork.NewNetwork(ctx, "example_network", &edgenetwork.NetworkArgs{
NetworkId: pulumi.String("example-network"),
Location: pulumi.String("us-west1"),
Zone: pulumi.String(""),
Description: pulumi.String("Example network."),
Mtu: pulumi.Int(9000),
Labels: pulumi.StringMap{
"environment": pulumi.String("dev"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var exampleNetwork = new Gcp.EdgeNetwork.Network("example_network", new()
{
NetworkId = "example-network",
Location = "us-west1",
Zone = "",
Description = "Example network.",
Mtu = 9000,
Labels =
{
{ "environment", "dev" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.edgenetwork.Network;
import com.pulumi.gcp.edgenetwork.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 exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.networkId("example-network")
.location("us-west1")
.zone("")
.description("Example network.")
.mtu(9000)
.labels(Map.of("environment", "dev"))
.build());
}
}
resources:
exampleNetwork:
type: gcp:edgenetwork:Network
name: example_network
properties:
networkId: example-network
location: us-west1
zone:
description: Example network.
mtu: 9000
labels:
environment: dev
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,
location: Optional[str] = None,
network_id: Optional[str] = None,
zone: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
mtu: Optional[int] = None,
project: 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: gcp:edgenetwork: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 gcpNetworkResource = new Gcp.EdgeNetwork.Network("gcpNetworkResource", new()
{
Location = "string",
NetworkId = "string",
Zone = "string",
Description = "string",
Labels =
{
{ "string", "string" },
},
Mtu = 0,
Project = "string",
});
example, err := edgenetwork.NewNetwork(ctx, "gcpNetworkResource", &edgenetwork.NetworkArgs{
Location: pulumi.String("string"),
NetworkId: pulumi.String("string"),
Zone: pulumi.String("string"),
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Mtu: pulumi.Int(0),
Project: pulumi.String("string"),
})
var gcpNetworkResource = new Network("gcpNetworkResource", NetworkArgs.builder()
.location("string")
.networkId("string")
.zone("string")
.description("string")
.labels(Map.of("string", "string"))
.mtu(0)
.project("string")
.build());
gcp_network_resource = gcp.edgenetwork.Network("gcpNetworkResource",
location="string",
network_id="string",
zone="string",
description="string",
labels={
"string": "string",
},
mtu=0,
project="string")
const gcpNetworkResource = new gcp.edgenetwork.Network("gcpNetworkResource", {
location: "string",
networkId: "string",
zone: "string",
description: "string",
labels: {
string: "string",
},
mtu: 0,
project: "string",
});
type: gcp:edgenetwork:Network
properties:
description: string
labels:
string: string
location: string
mtu: 0
networkId: string
project: string
zone: 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
The Network resource accepts the following input properties:
- Location string
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- Network
Id string - A unique ID that identifies this network.
- Zone string
- The name of the target Distributed Cloud Edge zone.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Labels Dictionary<string, string>
- Labels associated with this resource.
- Mtu int
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- Network
Id string - A unique ID that identifies this network.
- Zone string
- The name of the target Distributed Cloud Edge zone.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Labels map[string]string
- Labels associated with this resource.
- Mtu int
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- network
Id String - A unique ID that identifies this network.
- zone String
- The name of the target Distributed Cloud Edge zone.
- description String
- A free-text description of the resource. Max length 1024 characters.
- labels Map<String,String>
- Labels associated with this resource.
- mtu Integer
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- network
Id string - A unique ID that identifies this network.
- zone string
- The name of the target Distributed Cloud Edge zone.
- description string
- A free-text description of the resource. Max length 1024 characters.
- labels {[key: string]: string}
- Labels associated with this resource.
- mtu number
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- network_
id str - A unique ID that identifies this network.
- zone str
- The name of the target Distributed Cloud Edge zone.
- description str
- A free-text description of the resource. Max length 1024 characters.
- labels Mapping[str, str]
- Labels associated with this resource.
- mtu int
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- network
Id String - A unique ID that identifies this network.
- zone String
- The name of the target Distributed Cloud Edge zone.
- description String
- A free-text description of the resource. Max length 1024 characters.
- labels Map<String>
- Labels associated with this resource.
- mtu Number
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Network resource produces the following output properties:
- Create
Time string - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- Update
Time string - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
.
- Create
Time string - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- Update
Time string - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
.
- create
Time String - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - id String
- The provider-assigned unique ID for this managed resource.
- name String
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- update
Time String - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
.
- create
Time string - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - id string
- The provider-assigned unique ID for this managed resource.
- name string
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- update
Time string - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
.
- create_
time str - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - id str
- The provider-assigned unique ID for this managed resource.
- name str
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- update_
time str - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
.
- create
Time String - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - id String
- The provider-assigned unique ID for this managed resource.
- name String
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- update
Time String - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
.
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_time: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
mtu: Optional[int] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
project: Optional[str] = None,
update_time: Optional[str] = None,
zone: 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)
Resource lookup is not supported in YAML
- 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.
- Create
Time string - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - Description string
- A free-text description of the resource. Max length 1024 characters.
- Labels Dictionary<string, string>
- Labels associated with this resource.
- Location string
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- Mtu int
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - Name string
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- Network
Id string - A unique ID that identifies this network.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Update
Time string - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - Zone string
- The name of the target Distributed Cloud Edge zone.
- Create
Time string - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - Description string
- A free-text description of the resource. Max length 1024 characters.
- Labels map[string]string
- Labels associated with this resource.
- Location string
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- Mtu int
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - Name string
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- Network
Id string - A unique ID that identifies this network.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Update
Time string - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - Zone string
- The name of the target Distributed Cloud Edge zone.
- create
Time String - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - description String
- A free-text description of the resource. Max length 1024 characters.
- labels Map<String,String>
- Labels associated with this resource.
- location String
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- mtu Integer
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - name String
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- network
Id String - A unique ID that identifies this network.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time String - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - zone String
- The name of the target Distributed Cloud Edge zone.
- create
Time string - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - description string
- A free-text description of the resource. Max length 1024 characters.
- labels {[key: string]: string}
- Labels associated with this resource.
- location string
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- mtu number
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - name string
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- network
Id string - A unique ID that identifies this network.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time string - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - zone string
- The name of the target Distributed Cloud Edge zone.
- create_
time str - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - description str
- A free-text description of the resource. Max length 1024 characters.
- labels Mapping[str, str]
- Labels associated with this resource.
- location str
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- mtu int
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - name str
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- network_
id str - A unique ID that identifies this network.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update_
time str - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - zone str
- The name of the target Distributed Cloud Edge zone.
- create
Time String - The time when the subnet was created.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - description String
- A free-text description of the resource. Max length 1024 characters.
- labels Map<String>
- Labels associated with this resource.
- location String
- The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
- mtu Number
- IP (L3) MTU value of the network. Default value is
1500
. Possible values are:1500
,9000
. - name String
- The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
- network
Id String - A unique ID that identifies this network.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time String - The time when the subnet was last updated.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples:
2014-10-02T15:01:23Z
and2014-10-02T15:01:23.045123456Z
. - zone String
- The name of the target Distributed Cloud Edge zone.
Import
Network can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
{{project}}/{{location}}/{{zone}}/{{network_id}}
{{location}}/{{zone}}/{{network_id}}
{{location}}/{{network_id}}
{{name}}
When using the pulumi import
command, Network can be imported using one of the formats above. For example:
$ pulumi import gcp:edgenetwork/network:Network default projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
$ pulumi import gcp:edgenetwork/network:Network default {{project}}/{{location}}/{{zone}}/{{network_id}}
$ pulumi import gcp:edgenetwork/network:Network default {{location}}/{{zone}}/{{network_id}}
$ pulumi import gcp:edgenetwork/network:Network default {{location}}/{{network_id}}
$ pulumi import gcp:edgenetwork/network:Network default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.