vra 0.15.0 published on Tuesday, Aug 19, 2025 by vmware
vra.getMachine
Example Usage
S
This is an example of how to read a machine data source.
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getMachine({
    id: _var.my_machine_id,
});
import pulumi
import pulumi_vra as vra
this = vra.get_machine(id=var["my_machine_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.LookupMachine(ctx, &vra.LookupMachineArgs{
			Id: pulumi.StringRef(_var.My_machine_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.GetMachine.Invoke(new()
    {
        Id = @var.My_machine_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.GetMachineArgs;
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.getMachine(GetMachineArgs.builder()
            .id(var_.my_machine_id())
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getMachine
      arguments:
        id: ${var.my_machine_id}
Machine data source filter by name:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getMachine({
    filter: `name eq '${_var.machine_name}'`,
});
import pulumi
import pulumi_vra as vra
this = vra.get_machine(filter=f"name eq '{var['machine_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.LookupMachine(ctx, &vra.LookupMachineArgs{
			Filter: pulumi.StringRef(fmt.Sprintf("name eq '%v'", _var.Machine_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.GetMachine.Invoke(new()
    {
        Filter = $"name eq '{@var.Machine_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.GetMachineArgs;
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.getMachine(GetMachineArgs.builder()
            .filter(String.format("name eq '%s'", var_.machine_name()))
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getMachine
      arguments:
        filter: name eq '${var.machine_name}'
Using getMachine
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 getMachine(args: GetMachineArgs, opts?: InvokeOptions): Promise<GetMachineResult>
function getMachineOutput(args: GetMachineOutputArgs, opts?: InvokeOptions): Output<GetMachineResult>def get_machine(description: Optional[str] = None,
                filter: Optional[str] = None,
                id: Optional[str] = None,
                tags: Optional[Sequence[GetMachineTag]] = None,
                opts: Optional[InvokeOptions] = None) -> GetMachineResult
def get_machine_output(description: Optional[pulumi.Input[str]] = None,
                filter: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetMachineTagArgs]]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetMachineResult]func LookupMachine(ctx *Context, args *LookupMachineArgs, opts ...InvokeOption) (*LookupMachineResult, error)
func LookupMachineOutput(ctx *Context, args *LookupMachineOutputArgs, opts ...InvokeOption) LookupMachineResultOutput> Note: This function is named LookupMachine in the Go SDK.
public static class GetMachine 
{
    public static Task<GetMachineResult> InvokeAsync(GetMachineArgs args, InvokeOptions? opts = null)
    public static Output<GetMachineResult> Invoke(GetMachineInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMachineResult> getMachine(GetMachineArgs args, InvokeOptions options)
public static Output<GetMachineResult> getMachine(GetMachineArgs args, InvokeOptions options)
fn::invoke:
  function: vra:index/getMachine:getMachine
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Description string
- A human-friendly description.
- Filter string
- Filter query string that is supported by VMware Aria Automation multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
- Id string
- The id of the image profile instance.
- 
List<GetMachine Tag> 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- Description string
- A human-friendly description.
- Filter string
- Filter query string that is supported by VMware Aria Automation multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
- Id string
- The id of the image profile instance.
- 
[]GetMachine Tag 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- description String
- A human-friendly description.
- filter String
- Filter query string that is supported by VMware Aria Automation multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
- id String
- The id of the image profile instance.
- 
List<GetMachine Tag> 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- description string
- A human-friendly description.
- filter string
- Filter query string that is supported by VMware Aria Automation multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
- id string
- The id of the image profile instance.
- 
GetMachine Tag[] 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- description str
- A human-friendly description.
- filter str
- Filter query string that is supported by VMware Aria Automation multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
- id str
- The id of the image profile instance.
- 
Sequence[GetMachine Tag] 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- description String
- A human-friendly description.
- filter String
- Filter query string that is supported by VMware Aria Automation multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
- id String
- The id of the image profile instance.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
getMachine Result
The following output properties are available:
- Address string
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- CloudAccount List<string>Ids 
- Set of ids of the cloud accounts this resource belongs to.
- CreatedAt string
- Date when the entity was created. The date is in ISO 6801 and UTC.
- CustomProperties Dictionary<string, string>
- Additional properties that may be used to extend the base resource.
- DeploymentId string
- Deployment id that is associated with this resource.
- ExternalId string
- External entity Id on the provider side.
- ExternalRegion stringId 
- The external regionId of the resource.
- ExternalZone stringId 
- The external zoneId of the resource.
- Id string
- Links
List<GetMachine Link> 
- Hypermedia as the Engine of Application State (HATEOAS) of the entity.
- Name string
- A human-friendly name used as an identifier in APIs that support this option.
- OrgId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- PowerState string
- Power state of machine.
- ProjectId string
- The id of the project this resource belongs to.
- UpdatedAt string
- Description string
- Filter string
- 
List<GetMachine Tag> 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- Address string
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- CloudAccount []stringIds 
- Set of ids of the cloud accounts this resource belongs to.
- CreatedAt string
- Date when the entity was created. The date is in ISO 6801 and UTC.
- CustomProperties map[string]string
- Additional properties that may be used to extend the base resource.
- DeploymentId string
- Deployment id that is associated with this resource.
- ExternalId string
- External entity Id on the provider side.
- ExternalRegion stringId 
- The external regionId of the resource.
- ExternalZone stringId 
- The external zoneId of the resource.
- Id string
- Links
[]GetMachine Link 
- Hypermedia as the Engine of Application State (HATEOAS) of the entity.
- Name string
- A human-friendly name used as an identifier in APIs that support this option.
- OrgId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- PowerState string
- Power state of machine.
- ProjectId string
- The id of the project this resource belongs to.
- UpdatedAt string
- Description string
- Filter string
- 
[]GetMachine Tag 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- address String
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloudAccount List<String>Ids 
- Set of ids of the cloud accounts this resource belongs to.
- createdAt String
- Date when the entity was created. The date is in ISO 6801 and UTC.
- customProperties Map<String,String>
- Additional properties that may be used to extend the base resource.
- deploymentId String
- Deployment id that is associated with this resource.
- externalId String
- External entity Id on the provider side.
- externalRegion StringId 
- The external regionId of the resource.
- externalZone StringId 
- The external zoneId of the resource.
- id String
- links
List<GetMachine Link> 
- Hypermedia as the Engine of Application State (HATEOAS) of the entity.
- name String
- A human-friendly name used as an identifier in APIs that support this option.
- orgId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- powerState String
- Power state of machine.
- projectId String
- The id of the project this resource belongs to.
- updatedAt String
- description String
- filter String
- 
List<GetMachine Tag> 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- address string
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloudAccount string[]Ids 
- Set of ids of the cloud accounts this resource belongs to.
- createdAt string
- Date when the entity was created. The date is in ISO 6801 and UTC.
- customProperties {[key: string]: string}
- Additional properties that may be used to extend the base resource.
- deploymentId string
- Deployment id that is associated with this resource.
- externalId string
- External entity Id on the provider side.
- externalRegion stringId 
- The external regionId of the resource.
- externalZone stringId 
- The external zoneId of the resource.
- id string
- links
GetMachine Link[] 
- Hypermedia as the Engine of Application State (HATEOAS) of the entity.
- name string
- A human-friendly name used as an identifier in APIs that support this option.
- orgId string
- The id of the organization this entity belongs to.
- owner string
- Email of the user that owns the entity.
- powerState string
- Power state of machine.
- projectId string
- The id of the project this resource belongs to.
- updatedAt string
- description string
- filter string
- 
GetMachine Tag[] 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- address str
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloud_account_ Sequence[str]ids 
- Set of ids of the cloud accounts this resource belongs to.
- created_at str
- Date when the entity was created. The date is in ISO 6801 and UTC.
- custom_properties Mapping[str, str]
- Additional properties that may be used to extend the base resource.
- deployment_id str
- Deployment id that is associated with this resource.
- external_id str
- External entity Id on the provider side.
- external_region_ strid 
- The external regionId of the resource.
- external_zone_ strid 
- The external zoneId of the resource.
- id str
- links
Sequence[GetMachine Link] 
- Hypermedia as the Engine of Application State (HATEOAS) of the entity.
- name str
- A human-friendly name used as an identifier in APIs that support this option.
- org_id str
- The id of the organization this entity belongs to.
- owner str
- Email of the user that owns the entity.
- power_state str
- Power state of machine.
- project_id str
- The id of the project this resource belongs to.
- updated_at str
- description str
- filter str
- 
Sequence[GetMachine Tag] 
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- address String
- Primary address allocated or in use by this machine. The actual type of the address depends on the adapter type. Typically it is either the public or the external IP address.
- cloudAccount List<String>Ids 
- Set of ids of the cloud accounts this resource belongs to.
- createdAt String
- Date when the entity was created. The date is in ISO 6801 and UTC.
- customProperties Map<String>
- Additional properties that may be used to extend the base resource.
- deploymentId String
- Deployment id that is associated with this resource.
- externalId String
- External entity Id on the provider side.
- externalRegion StringId 
- The external regionId of the resource.
- externalZone StringId 
- The external zoneId of the resource.
- id String
- links List<Property Map>
- Hypermedia as the Engine of Application State (HATEOAS) of the entity.
- name String
- A human-friendly name used as an identifier in APIs that support this option.
- orgId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- powerState String
- Power state of machine.
- projectId String
- The id of the project this resource belongs to.
- updatedAt String
- description String
- filter String
- List<Property Map>
- A set of tag keys and optional values that were set on this resource. Example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
Supporting Types
GetMachineLink  
GetMachineTag  
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the vraTerraform Provider.
