We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about an existing Virtual Machine Scale Set.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Compute.GetVirtualMachineScaleSet.InvokeAsync(new Azure.Compute.GetVirtualMachineScaleSetArgs
{
Name = "existing",
ResourceGroupName = "existing",
}));
this.Id = example.Apply(example => example.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := compute.GetVirtualMachineScaleSet(ctx, &compute.GetVirtualMachineScaleSetArgs{
Name: "existing",
ResourceGroupName: "existing",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.compute.getVirtualMachineScaleSet({
name: "existing",
resourceGroupName: "existing",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.compute.get_virtual_machine_scale_set(name="existing",
resource_group_name="existing")
pulumi.export("id", example.id)
Example coming soon!
Using getVirtualMachineScaleSet
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 getVirtualMachineScaleSet(args: GetVirtualMachineScaleSetArgs, opts?: InvokeOptions): Promise<GetVirtualMachineScaleSetResult>
function getVirtualMachineScaleSetOutput(args: GetVirtualMachineScaleSetOutputArgs, opts?: InvokeOptions): Output<GetVirtualMachineScaleSetResult>def get_virtual_machine_scale_set(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVirtualMachineScaleSetResult
def get_virtual_machine_scale_set_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVirtualMachineScaleSetResult]func GetVirtualMachineScaleSet(ctx *Context, args *GetVirtualMachineScaleSetArgs, opts ...InvokeOption) (*GetVirtualMachineScaleSetResult, error)
func GetVirtualMachineScaleSetOutput(ctx *Context, args *GetVirtualMachineScaleSetOutputArgs, opts ...InvokeOption) GetVirtualMachineScaleSetResultOutput> Note: This function is named GetVirtualMachineScaleSet in the Go SDK.
public static class GetVirtualMachineScaleSet
{
public static Task<GetVirtualMachineScaleSetResult> InvokeAsync(GetVirtualMachineScaleSetArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualMachineScaleSetResult> Invoke(GetVirtualMachineScaleSetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVirtualMachineScaleSetResult> getVirtualMachineScaleSet(GetVirtualMachineScaleSetArgs args, InvokeOptions options)
public static Output<GetVirtualMachineScaleSetResult> getVirtualMachineScaleSet(GetVirtualMachineScaleSetArgs args, InvokeOptions options)
fn::invoke:
function: azure:compute/getVirtualMachineScaleSet:getVirtualMachineScaleSet
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of this Virtual Machine Scale Set.
- Resource
Group stringName - The name of the Resource Group where the Virtual Machine Scale Set exists.
- Name string
- The name of this Virtual Machine Scale Set.
- Resource
Group stringName - The name of the Resource Group where the Virtual Machine Scale Set exists.
- name String
- The name of this Virtual Machine Scale Set.
- resource
Group StringName - The name of the Resource Group where the Virtual Machine Scale Set exists.
- name string
- The name of this Virtual Machine Scale Set.
- resource
Group stringName - The name of the Resource Group where the Virtual Machine Scale Set exists.
- name str
- The name of this Virtual Machine Scale Set.
- resource_
group_ strname - The name of the Resource Group where the Virtual Machine Scale Set exists.
- name String
- The name of this Virtual Machine Scale Set.
- resource
Group StringName - The name of the Resource Group where the Virtual Machine Scale Set exists.
getVirtualMachineScaleSet Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
List<Get
Virtual Machine Scale Set Identity> - A
identityblock as defined below. - Location string
- Name string
- The name of the public ip address configuration
- Network
Interfaces List<GetVirtual Machine Scale Set Network Interface> - A list of
network_interfaceblocks as defined below. - Resource
Group stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Identities
[]Get
Virtual Machine Scale Set Identity - A
identityblock as defined below. - Location string
- Name string
- The name of the public ip address configuration
- Network
Interfaces []GetVirtual Machine Scale Set Network Interface - A list of
network_interfaceblocks as defined below. - Resource
Group stringName
- id String
- The provider-assigned unique ID for this managed resource.
- identities
List<Get
Virtual Machine Scale Set Identity> - A
identityblock as defined below. - location String
- name String
- The name of the public ip address configuration
- network
Interfaces List<GetVirtual Machine Scale Set Network Interface> - A list of
network_interfaceblocks as defined below. - resource
Group StringName
- id string
- The provider-assigned unique ID for this managed resource.
- identities
Get
Virtual Machine Scale Set Identity[] - A
identityblock as defined below. - location string
- name string
- The name of the public ip address configuration
- network
Interfaces GetVirtual Machine Scale Set Network Interface[] - A list of
network_interfaceblocks as defined below. - resource
Group stringName
- id str
- The provider-assigned unique ID for this managed resource.
- identities
Sequence[Get
Virtual Machine Scale Set Identity] - A
identityblock as defined below. - location str
- name str
- The name of the public ip address configuration
- network_
interfaces Sequence[GetVirtual Machine Scale Set Network Interface] - A list of
network_interfaceblocks as defined below. - resource_
group_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- identities List<Property Map>
- A
identityblock as defined below. - location String
- name String
- The name of the public ip address configuration
- network
Interfaces List<Property Map> - A list of
network_interfaceblocks as defined below. - resource
Group StringName
Supporting Types
GetVirtualMachineScaleSetIdentity
- Identity
Ids List<string> - The list of User Managed Identity ID's which are assigned to the Virtual Machine Scale Set.
- Principal
Id string - The ID of the System Managed Service Principal assigned to the Virtual Machine Scale Set.
- Tenant
Id string - Type string
- The identity type of the Managed Identity assigned to the Virtual Machine Scale Set.
- Identity
Ids []string - The list of User Managed Identity ID's which are assigned to the Virtual Machine Scale Set.
- Principal
Id string - The ID of the System Managed Service Principal assigned to the Virtual Machine Scale Set.
- Tenant
Id string - Type string
- The identity type of the Managed Identity assigned to the Virtual Machine Scale Set.
- identity
Ids List<String> - The list of User Managed Identity ID's which are assigned to the Virtual Machine Scale Set.
- principal
Id String - The ID of the System Managed Service Principal assigned to the Virtual Machine Scale Set.
- tenant
Id String - type String
- The identity type of the Managed Identity assigned to the Virtual Machine Scale Set.
- identity
Ids string[] - The list of User Managed Identity ID's which are assigned to the Virtual Machine Scale Set.
- principal
Id string - The ID of the System Managed Service Principal assigned to the Virtual Machine Scale Set.
- tenant
Id string - type string
- The identity type of the Managed Identity assigned to the Virtual Machine Scale Set.
- identity_
ids Sequence[str] - The list of User Managed Identity ID's which are assigned to the Virtual Machine Scale Set.
- principal_
id str - The ID of the System Managed Service Principal assigned to the Virtual Machine Scale Set.
- tenant_
id str - type str
- The identity type of the Managed Identity assigned to the Virtual Machine Scale Set.
- identity
Ids List<String> - The list of User Managed Identity ID's which are assigned to the Virtual Machine Scale Set.
- principal
Id String - The ID of the System Managed Service Principal assigned to the Virtual Machine Scale Set.
- tenant
Id String - type String
- The identity type of the Managed Identity assigned to the Virtual Machine Scale Set.
GetVirtualMachineScaleSetNetworkInterface
- Dns
Servers List<string> - The dns servers in use.
- Enable
Accelerated boolNetworking - Enable
Ip boolForwarding - Ip
Configurations List<GetVirtual Machine Scale Set Network Interface Ip Configuration> - An ip_configuration block as documented below.
- Name string
- The name of this Virtual Machine Scale Set.
- Network
Security stringGroup Id - The identifier for the network security group.
- Primary bool
- If this ip_configuration is the primary one.
- Dns
Servers []string - The dns servers in use.
- Enable
Accelerated boolNetworking - Enable
Ip boolForwarding - Ip
Configurations []GetVirtual Machine Scale Set Network Interface Ip Configuration - An ip_configuration block as documented below.
- Name string
- The name of this Virtual Machine Scale Set.
- Network
Security stringGroup Id - The identifier for the network security group.
- Primary bool
- If this ip_configuration is the primary one.
- dns
Servers List<String> - The dns servers in use.
- enable
Accelerated BooleanNetworking - enable
Ip BooleanForwarding - ip
Configurations List<GetVirtual Machine Scale Set Network Interface Ip Configuration> - An ip_configuration block as documented below.
- name String
- The name of this Virtual Machine Scale Set.
- network
Security StringGroup Id - The identifier for the network security group.
- primary Boolean
- If this ip_configuration is the primary one.
- dns
Servers string[] - The dns servers in use.
- enable
Accelerated booleanNetworking - enable
Ip booleanForwarding - ip
Configurations GetVirtual Machine Scale Set Network Interface Ip Configuration[] - An ip_configuration block as documented below.
- name string
- The name of this Virtual Machine Scale Set.
- network
Security stringGroup Id - The identifier for the network security group.
- primary boolean
- If this ip_configuration is the primary one.
- dns_
servers Sequence[str] - The dns servers in use.
- enable_
accelerated_ boolnetworking - enable_
ip_ boolforwarding - ip_
configurations Sequence[GetVirtual Machine Scale Set Network Interface Ip Configuration] - An ip_configuration block as documented below.
- name str
- The name of this Virtual Machine Scale Set.
- network_
security_ strgroup_ id - The identifier for the network security group.
- primary bool
- If this ip_configuration is the primary one.
- dns
Servers List<String> - The dns servers in use.
- enable
Accelerated BooleanNetworking - enable
Ip BooleanForwarding - ip
Configurations List<Property Map> - An ip_configuration block as documented below.
- name String
- The name of this Virtual Machine Scale Set.
- network
Security StringGroup Id - The identifier for the network security group.
- primary Boolean
- If this ip_configuration is the primary one.
GetVirtualMachineScaleSetNetworkInterfaceIpConfiguration
- Application
Gateway List<string>Backend Address Pool Ids - An array of references to backend address pools of application gateways.
- Application
Security List<string>Group Ids - The application security group IDs to use.
- Load
Balancer List<string>Backend Address Pool Ids - An array of references to backend address pools of load balancers.
- Load
Balancer List<string>Inbound Nat Rules Ids - An array of references to inbound NAT pools for load balancers.
- Name string
- The name of this Virtual Machine Scale Set.
- Primary bool
- If this ip_configuration is the primary one.
- Public
Ip List<GetAddresses Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address> - Subnet
Id string - The the identifier of the subnet.
- Version string
- Application
Gateway []stringBackend Address Pool Ids - An array of references to backend address pools of application gateways.
- Application
Security []stringGroup Ids - The application security group IDs to use.
- Load
Balancer []stringBackend Address Pool Ids - An array of references to backend address pools of load balancers.
- Load
Balancer []stringInbound Nat Rules Ids - An array of references to inbound NAT pools for load balancers.
- Name string
- The name of this Virtual Machine Scale Set.
- Primary bool
- If this ip_configuration is the primary one.
- Public
Ip []GetAddresses Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address - Subnet
Id string - The the identifier of the subnet.
- Version string
- application
Gateway List<String>Backend Address Pool Ids - An array of references to backend address pools of application gateways.
- application
Security List<String>Group Ids - The application security group IDs to use.
- load
Balancer List<String>Backend Address Pool Ids - An array of references to backend address pools of load balancers.
- load
Balancer List<String>Inbound Nat Rules Ids - An array of references to inbound NAT pools for load balancers.
- name String
- The name of this Virtual Machine Scale Set.
- primary Boolean
- If this ip_configuration is the primary one.
- public
Ip List<GetAddresses Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address> - subnet
Id String - The the identifier of the subnet.
- version String
- application
Gateway string[]Backend Address Pool Ids - An array of references to backend address pools of application gateways.
- application
Security string[]Group Ids - The application security group IDs to use.
- load
Balancer string[]Backend Address Pool Ids - An array of references to backend address pools of load balancers.
- load
Balancer string[]Inbound Nat Rules Ids - An array of references to inbound NAT pools for load balancers.
- name string
- The name of this Virtual Machine Scale Set.
- primary boolean
- If this ip_configuration is the primary one.
- public
Ip GetAddresses Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address[] - subnet
Id string - The the identifier of the subnet.
- version string
- application_
gateway_ Sequence[str]backend_ address_ pool_ ids - An array of references to backend address pools of application gateways.
- application_
security_ Sequence[str]group_ ids - The application security group IDs to use.
- load_
balancer_ Sequence[str]backend_ address_ pool_ ids - An array of references to backend address pools of load balancers.
- load_
balancer_ Sequence[str]inbound_ nat_ rules_ ids - An array of references to inbound NAT pools for load balancers.
- name str
- The name of this Virtual Machine Scale Set.
- primary bool
- If this ip_configuration is the primary one.
- public_
ip_ Sequence[Getaddresses Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address] - subnet_
id str - The the identifier of the subnet.
- version str
- application
Gateway List<String>Backend Address Pool Ids - An array of references to backend address pools of application gateways.
- application
Security List<String>Group Ids - The application security group IDs to use.
- load
Balancer List<String>Backend Address Pool Ids - An array of references to backend address pools of load balancers.
- load
Balancer List<String>Inbound Nat Rules Ids - An array of references to inbound NAT pools for load balancers.
- name String
- The name of this Virtual Machine Scale Set.
- primary Boolean
- If this ip_configuration is the primary one.
- public
Ip List<Property Map>Addresses - subnet
Id String - The the identifier of the subnet.
- version String
GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddress
- Domain
Name stringLabel - The domain name label for the dns settings.
- Idle
Timeout intIn Minutes -
List<Get
Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address Ip Tag> - Name string
- The name of this Virtual Machine Scale Set.
- Public
Ip stringPrefix Id
- Domain
Name stringLabel - The domain name label for the dns settings.
- Idle
Timeout intIn Minutes -
[]Get
Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address Ip Tag - Name string
- The name of this Virtual Machine Scale Set.
- Public
Ip stringPrefix Id
- domain
Name StringLabel - The domain name label for the dns settings.
- idle
Timeout IntegerIn Minutes -
List<Get
Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address Ip Tag> - name String
- The name of this Virtual Machine Scale Set.
- public
Ip StringPrefix Id
- domain
Name stringLabel - The domain name label for the dns settings.
- idle
Timeout numberIn Minutes -
Get
Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address Ip Tag[] - name string
- The name of this Virtual Machine Scale Set.
- public
Ip stringPrefix Id
- domain_
name_ strlabel - The domain name label for the dns settings.
- idle_
timeout_ intin_ minutes -
Sequence[Get
Virtual Machine Scale Set Network Interface Ip Configuration Public Ip Address Ip Tag] - name str
- The name of this Virtual Machine Scale Set.
- public_
ip_ strprefix_ id
- domain
Name StringLabel - The domain name label for the dns settings.
- idle
Timeout NumberIn Minutes - List<Property Map>
- name String
- The name of this Virtual Machine Scale Set.
- public
Ip StringPrefix Id
GetVirtualMachineScaleSetNetworkInterfaceIpConfigurationPublicIpAddressIpTag
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi