vra 0.12.0 published on Monday, Apr 14, 2025 by vmware
vra.getZone
Explore with Pulumi AI
Example Usage
S
This is an example of how to read a zone data source.
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const test_zone = vra.getZone({
    name: _var.zone_name,
});
import pulumi
import pulumi_vra as vra
test_zone = vra.get_zone(name=var["zone_name"])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vra.LookupZone(ctx, &vra.LookupZoneArgs{
			Name: pulumi.StringRef(_var.Zone_name),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() => 
{
    var test_zone = Vra.GetZone.Invoke(new()
    {
        Name = @var.Zone_name,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetZoneArgs;
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 test-zone = VraFunctions.getZone(GetZoneArgs.builder()
            .name(var_.zone_name())
            .build());
    }
}
variables:
  test-zone:
    fn::invoke:
      function: vra:getZone
      arguments:
        name: ${var.zone_name}
A zone data source supports the following arguments:
Using getZone
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 getZone(args: GetZoneArgs, opts?: InvokeOptions): Promise<GetZoneResult>
function getZoneOutput(args: GetZoneOutputArgs, opts?: InvokeOptions): Output<GetZoneResult>def get_zone(id: Optional[str] = None,
             name: Optional[str] = None,
             tags: Optional[Sequence[GetZoneTag]] = None,
             tags_to_matches: Optional[Sequence[GetZoneTagsToMatch]] = None,
             opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(id: Optional[pulumi.Input[str]] = None,
             name: Optional[pulumi.Input[str]] = None,
             tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetZoneTagArgs]]]] = None,
             tags_to_matches: Optional[pulumi.Input[Sequence[pulumi.Input[GetZoneTagsToMatchArgs]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetZoneResult]func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput> Note: This function is named LookupZone in the Go SDK.
public static class GetZone 
{
    public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneResult> Invoke(GetZoneInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
public static Output<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
fn::invoke:
  function: vra:index/getZone:getZone
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id string
- The id of the zone resource instance.
- Name string
- A human-friendly name used as an identifier for the zone resource instance.
- 
List<GetZone Tag> 
- A set of tag keys and optional values that were set on this resource:
- 
List<GetZone Tags To Match> 
- A set of tag keys and optional values for compute resource filtering:
- Id string
- The id of the zone resource instance.
- Name string
- A human-friendly name used as an identifier for the zone resource instance.
- 
[]GetZone Tag 
- A set of tag keys and optional values that were set on this resource:
- 
[]GetZone Tags To Match 
- A set of tag keys and optional values for compute resource filtering:
- id String
- The id of the zone resource instance.
- name String
- A human-friendly name used as an identifier for the zone resource instance.
- 
List<GetZone Tag> 
- A set of tag keys and optional values that were set on this resource:
- 
List<GetZone Tags To Match> 
- A set of tag keys and optional values for compute resource filtering:
- id string
- The id of the zone resource instance.
- name string
- A human-friendly name used as an identifier for the zone resource instance.
- 
GetZone Tag[] 
- A set of tag keys and optional values that were set on this resource:
- 
GetZone Tags To Match[] 
- A set of tag keys and optional values for compute resource filtering:
- id str
- The id of the zone resource instance.
- name str
- A human-friendly name used as an identifier for the zone resource instance.
- 
Sequence[GetZone Tag] 
- A set of tag keys and optional values that were set on this resource:
- 
Sequence[GetZone Tags To Match] 
- A set of tag keys and optional values for compute resource filtering:
- id String
- The id of the zone resource instance.
- name String
- A human-friendly name used as an identifier for the zone resource instance.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource:
- List<Property Map>
- A set of tag keys and optional values for compute resource filtering:
getZone Result
The following output properties are available:
- CloudAccount stringId 
- The ID of the cloud account this zone belongs to.
- ComputeIds List<string>
- The ids of the compute resources that has been explicitly assigned to this zone.
- CreatedAt string
- Date when the entity was created. The date is in ISO 8601 and UTC.
- CustomProperties Dictionary<string, string>
- A list of key value pair of properties that will be used.
- Description string
- A human-friendly description.
- ExternalRegion stringId 
- The id of the region for which this zone is defined.
- Folder string
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- Id string
- Links
List<GetZone Link> 
- HATEOAS of the entity.
- Name string
- OrgId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- PlacementPolicy string
- The placement policy for the zone. One of DEFAULT,SPREADorBINPACK.
- UpdatedAt string
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- 
List<GetZone Tag> 
- A set of tag keys and optional values that were set on this resource:
- 
List<GetZone Tags To Match> 
- A set of tag keys and optional values for compute resource filtering:
- CloudAccount stringId 
- The ID of the cloud account this zone belongs to.
- ComputeIds []string
- The ids of the compute resources that has been explicitly assigned to this zone.
- CreatedAt string
- Date when the entity was created. The date is in ISO 8601 and UTC.
- CustomProperties map[string]string
- A list of key value pair of properties that will be used.
- Description string
- A human-friendly description.
- ExternalRegion stringId 
- The id of the region for which this zone is defined.
- Folder string
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- Id string
- Links
[]GetZone Link 
- HATEOAS of the entity.
- Name string
- OrgId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- PlacementPolicy string
- The placement policy for the zone. One of DEFAULT,SPREADorBINPACK.
- UpdatedAt string
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- 
[]GetZone Tag 
- A set of tag keys and optional values that were set on this resource:
- 
[]GetZone Tags To Match 
- A set of tag keys and optional values for compute resource filtering:
- cloudAccount StringId 
- The ID of the cloud account this zone belongs to.
- computeIds List<String>
- The ids of the compute resources that has been explicitly assigned to this zone.
- createdAt String
- Date when the entity was created. The date is in ISO 8601 and UTC.
- customProperties Map<String,String>
- A list of key value pair of properties that will be used.
- description String
- A human-friendly description.
- externalRegion StringId 
- The id of the region for which this zone is defined.
- folder String
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id String
- links
List<GetZone Link> 
- HATEOAS of the entity.
- name String
- orgId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- placementPolicy String
- The placement policy for the zone. One of DEFAULT,SPREADorBINPACK.
- updatedAt String
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- 
List<GetZone Tag> 
- A set of tag keys and optional values that were set on this resource:
- 
List<GetZone Tags To Match> 
- A set of tag keys and optional values for compute resource filtering:
- cloudAccount stringId 
- The ID of the cloud account this zone belongs to.
- computeIds string[]
- The ids of the compute resources that has been explicitly assigned to this zone.
- createdAt string
- Date when the entity was created. The date is in ISO 8601 and UTC.
- customProperties {[key: string]: string}
- A list of key value pair of properties that will be used.
- description string
- A human-friendly description.
- externalRegion stringId 
- The id of the region for which this zone is defined.
- folder string
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id string
- links
GetZone Link[] 
- HATEOAS of the entity.
- name string
- orgId string
- The id of the organization this entity belongs to.
- owner string
- Email of the user that owns the entity.
- placementPolicy string
- The placement policy for the zone. One of DEFAULT,SPREADorBINPACK.
- updatedAt string
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- 
GetZone Tag[] 
- A set of tag keys and optional values that were set on this resource:
- 
GetZone Tags To Match[] 
- A set of tag keys and optional values for compute resource filtering:
- cloud_account_ strid 
- The ID of the cloud account this zone belongs to.
- compute_ids Sequence[str]
- The ids of the compute resources that has been explicitly assigned to this zone.
- created_at str
- Date when the entity was created. The date is in ISO 8601 and UTC.
- custom_properties Mapping[str, str]
- A list of key value pair of properties that will be used.
- description str
- A human-friendly description.
- external_region_ strid 
- The id of the region for which this zone is defined.
- folder str
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id str
- links
Sequence[GetZone Link] 
- HATEOAS of the entity.
- name str
- org_id str
- The id of the organization this entity belongs to.
- owner str
- Email of the user that owns the entity.
- placement_policy str
- The placement policy for the zone. One of DEFAULT,SPREADorBINPACK.
- updated_at str
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- 
Sequence[GetZone Tag] 
- A set of tag keys and optional values that were set on this resource:
- 
Sequence[GetZone Tags To Match] 
- A set of tag keys and optional values for compute resource filtering:
- cloudAccount StringId 
- The ID of the cloud account this zone belongs to.
- computeIds List<String>
- The ids of the compute resources that has been explicitly assigned to this zone.
- createdAt String
- Date when the entity was created. The date is in ISO 8601 and UTC.
- customProperties Map<String>
- A list of key value pair of properties that will be used.
- description String
- A human-friendly description.
- externalRegion StringId 
- The id of the region for which this zone is defined.
- folder String
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id String
- links List<Property Map>
- HATEOAS of the entity.
- name String
- orgId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- placementPolicy String
- The placement policy for the zone. One of DEFAULT,SPREADorBINPACK.
- updatedAt String
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource:
- List<Property Map>
- A set of tag keys and optional values for compute resource filtering:
Supporting Types
GetZoneLink  
GetZoneTag  
GetZoneTagsToMatch    
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the vraTerraform Provider.