vra.getRegion
Explore with Pulumi AI
This is an example of how to lookup a region data source:
Region data source by id:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getRegion({
    id: _var.vra_region_id,
});
import pulumi
import pulumi_vra as vra
this = vra.get_region(id=var["vra_region_id"])
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.GetRegion(ctx, &vra.GetRegionArgs{
			Id: pulumi.StringRef(_var.Vra_region_id),
		}, 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 @this = Vra.GetRegion.Invoke(new()
    {
        Id = @var.Vra_region_id,
    });
});
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.GetRegionArgs;
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 this = VraFunctions.getRegion(GetRegionArgs.builder()
            .id(var_.vra_region_id())
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getRegion
      arguments:
        id: ${var.vra_region_id}
Region data source by filter:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getRegion({
    filter: `name eq '${_var.vra_region_name}'`,
});
import pulumi
import pulumi_vra as vra
this = vra.get_region(filter=f"name eq '{var['vra_region_name']}'")
package main
import (
	"fmt"
	"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.GetRegion(ctx, &vra.GetRegionArgs{
			Filter: pulumi.StringRef(fmt.Sprintf("name eq '%v'", _var.Vra_region_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 @this = Vra.GetRegion.Invoke(new()
    {
        Filter = $"name eq '{@var.Vra_region_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.GetRegionArgs;
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 this = VraFunctions.getRegion(GetRegionArgs.builder()
            .filter(String.format("name eq '%s'", var_.vra_region_name()))
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getRegion
      arguments:
        filter: name eq '${var.vra_region_name}'
Region data source by cloud account id and region:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getRegion({
    cloudAccountId: _var.vra_cloud_account_id,
    region: _var.vra_region_external_id,
});
import pulumi
import pulumi_vra as vra
this = vra.get_region(cloud_account_id=var["vra_cloud_account_id"],
    region=var["vra_region_external_id"])
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.GetRegion(ctx, &vra.GetRegionArgs{
			CloudAccountId: pulumi.StringRef(_var.Vra_cloud_account_id),
			Region:         pulumi.StringRef(_var.Vra_region_external_id),
		}, 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 @this = Vra.GetRegion.Invoke(new()
    {
        CloudAccountId = @var.Vra_cloud_account_id,
        Region = @var.Vra_region_external_id,
    });
});
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.GetRegionArgs;
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 this = VraFunctions.getRegion(GetRegionArgs.builder()
            .cloudAccountId(var_.vra_cloud_account_id())
            .region(var_.vra_region_external_id())
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getRegion
      arguments:
        cloudAccountId: ${var.vra_cloud_account_id}
        region: ${var.vra_region_external_id}
Using getRegion
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 getRegion(args: GetRegionArgs, opts?: InvokeOptions): Promise<GetRegionResult>
function getRegionOutput(args: GetRegionOutputArgs, opts?: InvokeOptions): Output<GetRegionResult>def get_region(cloud_account_id: Optional[str] = None,
               filter: Optional[str] = None,
               id: Optional[str] = None,
               region: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetRegionResult
def get_region_output(cloud_account_id: Optional[pulumi.Input[str]] = None,
               filter: Optional[pulumi.Input[str]] = None,
               id: Optional[pulumi.Input[str]] = None,
               region: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetRegionResult]func GetRegion(ctx *Context, args *GetRegionArgs, opts ...InvokeOption) (*GetRegionResult, error)
func GetRegionOutput(ctx *Context, args *GetRegionOutputArgs, opts ...InvokeOption) GetRegionResultOutput> Note: This function is named GetRegion in the Go SDK.
public static class GetRegion 
{
    public static Task<GetRegionResult> InvokeAsync(GetRegionArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionResult> Invoke(GetRegionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRegionResult> getRegion(GetRegionArgs args, InvokeOptions options)
public static Output<GetRegionResult> getRegion(GetRegionArgs args, InvokeOptions options)
fn::invoke:
  function: vra:index/getRegion:getRegion
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CloudAccount stringId 
- The id of the cloud account the region belongs to.
- Filter string
- Search criteria to narrow down Regions.
- Id string
- The id of the region instance.
- Region string
- The specific region associated with the cloud account. On vSphere, this is the external ID. - Note: One of - id,- filteror- cloud_account_idand- regionmust be specified.
- CloudAccount stringId 
- The id of the cloud account the region belongs to.
- Filter string
- Search criteria to narrow down Regions.
- Id string
- The id of the region instance.
- Region string
- The specific region associated with the cloud account. On vSphere, this is the external ID. - Note: One of - id,- filteror- cloud_account_idand- regionmust be specified.
- cloudAccount StringId 
- The id of the cloud account the region belongs to.
- filter String
- Search criteria to narrow down Regions.
- id String
- The id of the region instance.
- region String
- The specific region associated with the cloud account. On vSphere, this is the external ID. - Note: One of - id,- filteror- cloud_account_idand- regionmust be specified.
- cloudAccount stringId 
- The id of the cloud account the region belongs to.
- filter string
- Search criteria to narrow down Regions.
- id string
- The id of the region instance.
- region string
- The specific region associated with the cloud account. On vSphere, this is the external ID. - Note: One of - id,- filteror- cloud_account_idand- regionmust be specified.
- cloud_account_ strid 
- The id of the cloud account the region belongs to.
- filter str
- Search criteria to narrow down Regions.
- id str
- The id of the region instance.
- region str
- The specific region associated with the cloud account. On vSphere, this is the external ID. - Note: One of - id,- filteror- cloud_account_idand- regionmust be specified.
- cloudAccount StringId 
- The id of the cloud account the region belongs to.
- filter String
- Search criteria to narrow down Regions.
- id String
- The id of the region instance.
- region String
- The specific region associated with the cloud account. On vSphere, this is the external ID. - Note: One of - id,- filteror- cloud_account_idand- regionmust be specified.
getRegion Result
The following output properties are available:
- CloudAccount stringId 
- CreatedAt string
- Date when the entity was created. The date is in ISO 8601 and UTC.
- ExternalRegion stringId 
- Unique identifier of region on the provider side.
- Id string
- Name string
- Name of region on the provider side. In vSphere, the name of the region is different from its id.
- OrgId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- UpdatedAt string
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- Filter string
- Region string
- CloudAccount stringId 
- CreatedAt string
- Date when the entity was created. The date is in ISO 8601 and UTC.
- ExternalRegion stringId 
- Unique identifier of region on the provider side.
- Id string
- Name string
- Name of region on the provider side. In vSphere, the name of the region is different from its id.
- OrgId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- UpdatedAt string
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- Filter string
- Region string
- cloudAccount StringId 
- createdAt String
- Date when the entity was created. The date is in ISO 8601 and UTC.
- externalRegion StringId 
- Unique identifier of region on the provider side.
- id String
- name String
- Name of region on the provider side. In vSphere, the name of the region is different from its id.
- orgId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- updatedAt String
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- filter String
- region String
- cloudAccount stringId 
- createdAt string
- Date when the entity was created. The date is in ISO 8601 and UTC.
- externalRegion stringId 
- Unique identifier of region on the provider side.
- id string
- name string
- Name of region on the provider side. In vSphere, the name of the region is different from its id.
- orgId string
- The id of the organization this entity belongs to.
- owner string
- Email of the user that owns the entity.
- updatedAt string
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- filter string
- region string
- cloud_account_ strid 
- created_at str
- Date when the entity was created. The date is in ISO 8601 and UTC.
- external_region_ strid 
- Unique identifier of region on the provider side.
- id str
- name str
- Name of region on the provider side. In vSphere, the name of the region is different from its id.
- org_id str
- The id of the organization this entity belongs to.
- owner str
- Email of the user that owns the entity.
- updated_at str
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- filter str
- region str
- cloudAccount StringId 
- createdAt String
- Date when the entity was created. The date is in ISO 8601 and UTC.
- externalRegion StringId 
- Unique identifier of region on the provider side.
- id String
- name String
- Name of region on the provider side. In vSphere, the name of the region is different from its id.
- orgId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- updatedAt String
- Date when the entity was last updated. The date is ISO 8601 and UTC.
- filter String
- region String
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the vraTerraform Provider.