vmc 1.15.5 published on Wednesday, May 14, 2025 by vmware
vmc.getCustomerSubnets
The customer subnets data source retrieves information about customer’s compatible subnets for account linking.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vmc from "@pulumi/vmc";
const mySubnets = vmc.getCustomerSubnets({
connectedAccountId: data.vmc_connected_accounts.my_accounts.id,
region: _var.sddc_region,
});
import pulumi
import pulumi_vmc as vmc
my_subnets = vmc.get_customer_subnets(connected_account_id=data["vmc_connected_accounts"]["my_accounts"]["id"],
region=var["sddc_region"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vmc/vmc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vmc.GetCustomerSubnets(ctx, &vmc.GetCustomerSubnetsArgs{
ConnectedAccountId: pulumi.StringRef(data.Vmc_connected_accounts.My_accounts.Id),
Region: _var.Sddc_region,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vmc = Pulumi.Vmc;
return await Deployment.RunAsync(() =>
{
var mySubnets = Vmc.GetCustomerSubnets.Invoke(new()
{
ConnectedAccountId = data.Vmc_connected_accounts.My_accounts.Id,
Region = @var.Sddc_region,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vmc.VmcFunctions;
import com.pulumi.vmc.inputs.GetCustomerSubnetsArgs;
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 mySubnets = VmcFunctions.getCustomerSubnets(GetCustomerSubnetsArgs.builder()
.connectedAccountId(data.vmc_connected_accounts().my_accounts().id())
.region(var_.sddc_region())
.build());
}
}
variables:
mySubnets:
fn::invoke:
function: vmc:getCustomerSubnets
arguments:
connectedAccountId: ${data.vmc_connected_accounts.my_accounts.id}
region: ${var.sddc_region}
Using getCustomerSubnets
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 getCustomerSubnets(args: GetCustomerSubnetsArgs, opts?: InvokeOptions): Promise<GetCustomerSubnetsResult>
function getCustomerSubnetsOutput(args: GetCustomerSubnetsOutputArgs, opts?: InvokeOptions): Output<GetCustomerSubnetsResult>def get_customer_subnets(connected_account_id: Optional[str] = None,
force_refresh: Optional[bool] = None,
id: Optional[str] = None,
instance_type: Optional[str] = None,
num_hosts: Optional[float] = None,
region: Optional[str] = None,
sddc_id: Optional[str] = None,
sddc_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCustomerSubnetsResult
def get_customer_subnets_output(connected_account_id: Optional[pulumi.Input[str]] = None,
force_refresh: Optional[pulumi.Input[bool]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_type: Optional[pulumi.Input[str]] = None,
num_hosts: Optional[pulumi.Input[float]] = None,
region: Optional[pulumi.Input[str]] = None,
sddc_id: Optional[pulumi.Input[str]] = None,
sddc_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCustomerSubnetsResult]func GetCustomerSubnets(ctx *Context, args *GetCustomerSubnetsArgs, opts ...InvokeOption) (*GetCustomerSubnetsResult, error)
func GetCustomerSubnetsOutput(ctx *Context, args *GetCustomerSubnetsOutputArgs, opts ...InvokeOption) GetCustomerSubnetsResultOutput> Note: This function is named GetCustomerSubnets in the Go SDK.
public static class GetCustomerSubnets
{
public static Task<GetCustomerSubnetsResult> InvokeAsync(GetCustomerSubnetsArgs args, InvokeOptions? opts = null)
public static Output<GetCustomerSubnetsResult> Invoke(GetCustomerSubnetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCustomerSubnetsResult> getCustomerSubnets(GetCustomerSubnetsArgs args, InvokeOptions options)
public static Output<GetCustomerSubnetsResult> getCustomerSubnets(GetCustomerSubnetsArgs args, InvokeOptions options)
fn::invoke:
function: vmc:index/getCustomerSubnets:getCustomerSubnets
arguments:
# arguments dictionaryThe following arguments are supported:
- Region string
- The AWS specific (e.g.,
us-west-2) or VMC specific region (e.g.,US_WEST_2) of the cloud resources to work in. - Connected
Account stringId - The linked connected account identifier.
- Force
Refresh bool - Specifies to force the mappings for datacenters to be refreshed for the connected account.
- Id string
- Instance
Type string - The server instance type to be used.
- Num
Hosts double - The number of ESX hosts.
- Sddc
Id string - The SDDC identifier.
- Sddc
Type string - The SDDC type to be used. One of:
1NODE,SingleAZ, orMultiAZ.
- Region string
- The AWS specific (e.g.,
us-west-2) or VMC specific region (e.g.,US_WEST_2) of the cloud resources to work in. - Connected
Account stringId - The linked connected account identifier.
- Force
Refresh bool - Specifies to force the mappings for datacenters to be refreshed for the connected account.
- Id string
- Instance
Type string - The server instance type to be used.
- Num
Hosts float64 - The number of ESX hosts.
- Sddc
Id string - The SDDC identifier.
- Sddc
Type string - The SDDC type to be used. One of:
1NODE,SingleAZ, orMultiAZ.
- region String
- The AWS specific (e.g.,
us-west-2) or VMC specific region (e.g.,US_WEST_2) of the cloud resources to work in. - connected
Account StringId - The linked connected account identifier.
- force
Refresh Boolean - Specifies to force the mappings for datacenters to be refreshed for the connected account.
- id String
- instance
Type String - The server instance type to be used.
- num
Hosts Double - The number of ESX hosts.
- sddc
Id String - The SDDC identifier.
- sddc
Type String - The SDDC type to be used. One of:
1NODE,SingleAZ, orMultiAZ.
- region string
- The AWS specific (e.g.,
us-west-2) or VMC specific region (e.g.,US_WEST_2) of the cloud resources to work in. - connected
Account stringId - The linked connected account identifier.
- force
Refresh boolean - Specifies to force the mappings for datacenters to be refreshed for the connected account.
- id string
- instance
Type string - The server instance type to be used.
- num
Hosts number - The number of ESX hosts.
- sddc
Id string - The SDDC identifier.
- sddc
Type string - The SDDC type to be used. One of:
1NODE,SingleAZ, orMultiAZ.
- region str
- The AWS specific (e.g.,
us-west-2) or VMC specific region (e.g.,US_WEST_2) of the cloud resources to work in. - connected_
account_ strid - The linked connected account identifier.
- force_
refresh bool - Specifies to force the mappings for datacenters to be refreshed for the connected account.
- id str
- instance_
type str - The server instance type to be used.
- num_
hosts float - The number of ESX hosts.
- sddc_
id str - The SDDC identifier.
- sddc_
type str - The SDDC type to be used. One of:
1NODE,SingleAZ, orMultiAZ.
- region String
- The AWS specific (e.g.,
us-west-2) or VMC specific region (e.g.,US_WEST_2) of the cloud resources to work in. - connected
Account StringId - The linked connected account identifier.
- force
Refresh Boolean - Specifies to force the mappings for datacenters to be refreshed for the connected account.
- id String
- instance
Type String - The server instance type to be used.
- num
Hosts Number - The number of ESX hosts.
- sddc
Id String - The SDDC identifier.
- sddc
Type String - The SDDC type to be used. One of:
1NODE,SingleAZ, orMultiAZ.
getCustomerSubnets Result
The following output properties are available:
- Customer
Available List<string>Zones - A list of AWS availability zones.
- Id string
- Ids List<string>
- A list of AWS subnet IDs to create links to in the customer's account.
- Region string
- Vpc
Map Dictionary<string, string> - Connected
Account stringId - Force
Refresh bool - Instance
Type string - Num
Hosts double - Sddc
Id string - Sddc
Type string
- Customer
Available []stringZones - A list of AWS availability zones.
- Id string
- Ids []string
- A list of AWS subnet IDs to create links to in the customer's account.
- Region string
- Vpc
Map map[string]string - Connected
Account stringId - Force
Refresh bool - Instance
Type string - Num
Hosts float64 - Sddc
Id string - Sddc
Type string
- customer
Available List<String>Zones - A list of AWS availability zones.
- id String
- ids List<String>
- A list of AWS subnet IDs to create links to in the customer's account.
- region String
- vpc
Map Map<String,String> - connected
Account StringId - force
Refresh Boolean - instance
Type String - num
Hosts Double - sddc
Id String - sddc
Type String
- customer
Available string[]Zones - A list of AWS availability zones.
- id string
- ids string[]
- A list of AWS subnet IDs to create links to in the customer's account.
- region string
- vpc
Map {[key: string]: string} - connected
Account stringId - force
Refresh boolean - instance
Type string - num
Hosts number - sddc
Id string - sddc
Type string
- customer_
available_ Sequence[str]zones - A list of AWS availability zones.
- id str
- ids Sequence[str]
- A list of AWS subnet IDs to create links to in the customer's account.
- region str
- vpc_
map Mapping[str, str] - connected_
account_ strid - force_
refresh bool - instance_
type str - num_
hosts float - sddc_
id str - sddc_
type str
- customer
Available List<String>Zones - A list of AWS availability zones.
- id String
- ids List<String>
- A list of AWS subnet IDs to create links to in the customer's account.
- region String
- vpc
Map Map<String> - connected
Account StringId - force
Refresh Boolean - instance
Type String - num
Hosts Number - sddc
Id String - sddc
Type String
Package Details
- Repository
- vmc vmware/terraform-provider-vmc
- License
- Notes
- This Pulumi package is based on the
vmcTerraform Provider.
