Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.vmwareengine.getSubnet
Explore with Pulumi AI
Use this data source to get details about a subnet. Management subnets support only read operations and should be configured through this data source. User defined subnets can be configured using the resource as well as the datasource.
To get more information about private cloud subnet, see:
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const mySubnet = gcp.vmwareengine.getSubnet({
name: "service-1",
parent: "project/my-project/locations/us-west1-a/privateClouds/my-cloud",
});
import pulumi
import pulumi_gcp as gcp
my_subnet = gcp.vmwareengine.get_subnet(name="service-1",
parent="project/my-project/locations/us-west1-a/privateClouds/my-cloud")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/vmwareengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vmwareengine.LookupSubnet(ctx, &vmwareengine.LookupSubnetArgs{
Name: "service-1",
Parent: "project/my-project/locations/us-west1-a/privateClouds/my-cloud",
}, nil)
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 mySubnet = Gcp.VMwareEngine.GetSubnet.Invoke(new()
{
Name = "service-1",
Parent = "project/my-project/locations/us-west1-a/privateClouds/my-cloud",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vmwareengine.VmwareengineFunctions;
import com.pulumi.gcp.vmwareengine.inputs.GetSubnetArgs;
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 mySubnet = VmwareengineFunctions.getSubnet(GetSubnetArgs.builder()
.name("service-1")
.parent("project/my-project/locations/us-west1-a/privateClouds/my-cloud")
.build());
}
}
variables:
mySubnet:
fn::invoke:
Function: gcp:vmwareengine:getSubnet
Arguments:
name: service-1
parent: project/my-project/locations/us-west1-a/privateClouds/my-cloud
Using getSubnet
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSubnet(args: GetSubnetArgs, opts?: InvokeOptions): Promise<GetSubnetResult>
function getSubnetOutput(args: GetSubnetOutputArgs, opts?: InvokeOptions): Output<GetSubnetResult>
def get_subnet(name: Optional[str] = None,
parent: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetResult
def get_subnet_output(name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubnetResult]
func LookupSubnet(ctx *Context, args *LookupSubnetArgs, opts ...InvokeOption) (*LookupSubnetResult, error)
func LookupSubnetOutput(ctx *Context, args *LookupSubnetOutputArgs, opts ...InvokeOption) LookupSubnetResultOutput
> Note: This function is named LookupSubnet
in the Go SDK.
public static class GetSubnet
{
public static Task<GetSubnetResult> InvokeAsync(GetSubnetArgs args, InvokeOptions? opts = null)
public static Output<GetSubnetResult> Invoke(GetSubnetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:vmwareengine/getSubnet:getSubnet
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name of the resource. UserDefined subnets are named in the format of "service-n", where n ranges from 1 to 5. Management subnets have arbitary names including "vmotion", "vsan", "system-management" etc. More details about subnet names can be found on the cloud console.
- Parent string
- The resource name of the private cloud that this subnet belongs.
- Name string
- Name of the resource. UserDefined subnets are named in the format of "service-n", where n ranges from 1 to 5. Management subnets have arbitary names including "vmotion", "vsan", "system-management" etc. More details about subnet names can be found on the cloud console.
- Parent string
- The resource name of the private cloud that this subnet belongs.
- name String
- Name of the resource. UserDefined subnets are named in the format of "service-n", where n ranges from 1 to 5. Management subnets have arbitary names including "vmotion", "vsan", "system-management" etc. More details about subnet names can be found on the cloud console.
- parent String
- The resource name of the private cloud that this subnet belongs.
- name string
- Name of the resource. UserDefined subnets are named in the format of "service-n", where n ranges from 1 to 5. Management subnets have arbitary names including "vmotion", "vsan", "system-management" etc. More details about subnet names can be found on the cloud console.
- parent string
- The resource name of the private cloud that this subnet belongs.
- name str
- Name of the resource. UserDefined subnets are named in the format of "service-n", where n ranges from 1 to 5. Management subnets have arbitary names including "vmotion", "vsan", "system-management" etc. More details about subnet names can be found on the cloud console.
- parent str
- The resource name of the private cloud that this subnet belongs.
- name String
- Name of the resource. UserDefined subnets are named in the format of "service-n", where n ranges from 1 to 5. Management subnets have arbitary names including "vmotion", "vsan", "system-management" etc. More details about subnet names can be found on the cloud console.
- parent String
- The resource name of the private cloud that this subnet belongs.
getSubnet Result
The following output properties are available:
- Create
Time string - Dhcp
Address List<GetRanges Subnet Dhcp Address Range> - Gateway
Id string - Gateway
Ip string - Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Cidr stringRange - Name string
- Parent string
- Standard
Config bool - State string
- Type string
- Uid string
- Update
Time string - Vlan
Id int
- Create
Time string - Dhcp
Address []GetRanges Subnet Dhcp Address Range - Gateway
Id string - Gateway
Ip string - Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Cidr stringRange - Name string
- Parent string
- Standard
Config bool - State string
- Type string
- Uid string
- Update
Time string - Vlan
Id int
- create
Time String - dhcp
Address List<GetRanges Subnet Dhcp Address Range> - gateway
Id String - gateway
Ip String - id String
- The provider-assigned unique ID for this managed resource.
- ip
Cidr StringRange - name String
- parent String
- standard
Config Boolean - state String
- type String
- uid String
- update
Time String - vlan
Id Integer
- create
Time string - dhcp
Address GetRanges Subnet Dhcp Address Range[] - gateway
Id string - gateway
Ip string - id string
- The provider-assigned unique ID for this managed resource.
- ip
Cidr stringRange - name string
- parent string
- standard
Config boolean - state string
- type string
- uid string
- update
Time string - vlan
Id number
- create_
time str - dhcp_
address_ Sequence[Getranges Subnet Dhcp Address Range] - gateway_
id str - gateway_
ip str - id str
- The provider-assigned unique ID for this managed resource.
- ip_
cidr_ strrange - name str
- parent str
- standard_
config bool - state str
- type str
- uid str
- update_
time str - vlan_
id int
- create
Time String - dhcp
Address List<Property Map>Ranges - gateway
Id String - gateway
Ip String - id String
- The provider-assigned unique ID for this managed resource.
- ip
Cidr StringRange - name String
- parent String
- standard
Config Boolean - state String
- type String
- uid String
- update
Time String - vlan
Id Number
Supporting Types
GetSubnetDhcpAddressRange
- First
Address string - The first IP address of the range.
- Last
Address string - The last IP address of the range.
- First
Address string - The first IP address of the range.
- Last
Address string - The last IP address of the range.
- first
Address String - The first IP address of the range.
- last
Address String - The last IP address of the range.
- first
Address string - The first IP address of the range.
- last
Address string - The last IP address of the range.
- first_
address str - The first IP address of the range.
- last_
address str - The last IP address of the range.
- first
Address String - The first IP address of the range.
- last
Address String - The last IP address of the range.
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.