GetSubnetwork

Get a subnetwork within GCE from its name and region.

Using GetSubnetwork

function getSubnetwork(args: GetSubnetworkArgs, opts?: InvokeOptions): Promise<GetSubnetworkResult>
function  get_subnetwork(name=None, project=None, region=None, self_link=None, opts=None)
func LookupSubnetwork(ctx *Context, args *LookupSubnetworkArgs, opts ...InvokeOption) (*LookupSubnetworkResult, error)

Note: This function is named LookupSubnetwork in the Go SDK.

public static class GetSubnetwork {
    public static Task<GetSubnetworkResult> InvokeAsync(GetSubnetworkArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the subnetwork. One of name or self_link must be specified.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.

SelfLink string

The self link of the subnetwork. If self_link is specified, name, project, and region are ignored.

Name string

The name of the subnetwork. One of name or self_link must be specified.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.

SelfLink string

The self link of the subnetwork. If self_link is specified, name, project, and region are ignored.

name string

The name of the subnetwork. One of name or self_link must be specified.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region string

The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.

selfLink string

The self link of the subnetwork. If self_link is specified, name, project, and region are ignored.

name str

The name of the subnetwork. One of name or self_link must be specified.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region str

The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.

self_link str

The self link of the subnetwork. If self_link is specified, name, project, and region are ignored.

GetSubnetwork Result

The following output properties are available:

Description string

Description of this subnetwork.

GatewayAddress string

The IP address of the gateway.

Id string

The provider-assigned unique ID for this managed resource.

IpCidrRange string

The range of IP addresses belonging to this subnetwork secondary range.

Network string

The network name or resource link to the parent network of this subnetwork.

PrivateIpGoogleAccess bool

Whether the VMs in this subnet can access Google services without assigned external IP addresses.

Project string
Region string
SecondaryIpRanges List<GetSubnetworkSecondaryIpRange>

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.

SelfLink string
Name string
Description string

Description of this subnetwork.

GatewayAddress string

The IP address of the gateway.

Id string

The provider-assigned unique ID for this managed resource.

IpCidrRange string

The range of IP addresses belonging to this subnetwork secondary range.

Network string

The network name or resource link to the parent network of this subnetwork.

PrivateIpGoogleAccess bool

Whether the VMs in this subnet can access Google services without assigned external IP addresses.

Project string
Region string
SecondaryIpRanges []GetSubnetworkSecondaryIpRange

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.

SelfLink string
Name string
description string

Description of this subnetwork.

gatewayAddress string

The IP address of the gateway.

id string

The provider-assigned unique ID for this managed resource.

ipCidrRange string

The range of IP addresses belonging to this subnetwork secondary range.

network string

The network name or resource link to the parent network of this subnetwork.

privateIpGoogleAccess boolean

Whether the VMs in this subnet can access Google services without assigned external IP addresses.

project string
region string
secondaryIpRanges GetSubnetworkSecondaryIpRange[]

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.

selfLink string
name string
description str

Description of this subnetwork.

gateway_address str

The IP address of the gateway.

id str

The provider-assigned unique ID for this managed resource.

ip_cidr_range str

The range of IP addresses belonging to this subnetwork secondary range.

network str

The network name or resource link to the parent network of this subnetwork.

private_ip_google_access bool

Whether the VMs in this subnet can access Google services without assigned external IP addresses.

project str
region str
secondary_ip_ranges List[GetSubnetworkSecondaryIpRange]

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.

self_link str
name str

Supporting Types

GetSubnetworkSecondaryIpRange

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

IpCidrRange string

The range of IP addresses belonging to this subnetwork secondary range.

RangeName string

The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.

IpCidrRange string

The range of IP addresses belonging to this subnetwork secondary range.

RangeName string

The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.

ipCidrRange string

The range of IP addresses belonging to this subnetwork secondary range.

rangeName string

The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.

ip_cidr_range str

The range of IP addresses belonging to this subnetwork secondary range.

rangeName str

The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.