Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.compute.getMachineTypes
Explore with Pulumi AI
Provides access to available Google Compute machine types in a zone for a given project. See more about machine type availability in the upstream docs.
To get more information about machine types, see:
Example Usage
Using getMachineTypes
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 getMachineTypes(args: GetMachineTypesArgs, opts?: InvokeOptions): Promise<GetMachineTypesResult>
function getMachineTypesOutput(args: GetMachineTypesOutputArgs, opts?: InvokeOptions): Output<GetMachineTypesResult>def get_machine_types(filter: Optional[str] = None,
                      project: Optional[str] = None,
                      zone: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetMachineTypesResult
def get_machine_types_output(filter: Optional[pulumi.Input[str]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      zone: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetMachineTypesResult]func GetMachineTypes(ctx *Context, args *GetMachineTypesArgs, opts ...InvokeOption) (*GetMachineTypesResult, error)
func GetMachineTypesOutput(ctx *Context, args *GetMachineTypesOutputArgs, opts ...InvokeOption) GetMachineTypesResultOutput> Note: This function is named GetMachineTypes in the Go SDK.
public static class GetMachineTypes 
{
    public static Task<GetMachineTypesResult> InvokeAsync(GetMachineTypesArgs args, InvokeOptions? opts = null)
    public static Output<GetMachineTypesResult> Invoke(GetMachineTypesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMachineTypesResult> getMachineTypes(GetMachineTypesArgs args, InvokeOptions options)
public static Output<GetMachineTypesResult> getMachineTypes(GetMachineTypesArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:compute/getMachineTypes:getMachineTypes
  arguments:
    # arguments dictionaryThe following arguments are supported:
getMachineTypes Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- MachineTypes List<GetMachine Types Machine Type> 
- The list of machine types matching the provided filter. Structure is documented below.
- Project string
- Zone string
- Filter string
- Id string
- The provider-assigned unique ID for this managed resource.
- MachineTypes []GetMachine Types Machine Type 
- The list of machine types matching the provided filter. Structure is documented below.
- Project string
- Zone string
- Filter string
- id String
- The provider-assigned unique ID for this managed resource.
- machineTypes List<GetMachine Types Machine Type> 
- The list of machine types matching the provided filter. Structure is documented below.
- project String
- zone String
- filter String
- id string
- The provider-assigned unique ID for this managed resource.
- machineTypes GetMachine Types Machine Type[] 
- The list of machine types matching the provided filter. Structure is documented below.
- project string
- zone string
- filter string
- id str
- The provider-assigned unique ID for this managed resource.
- machine_types Sequence[GetMachine Types Machine Type] 
- The list of machine types matching the provided filter. Structure is documented below.
- project str
- zone str
- filter str
- id String
- The provider-assigned unique ID for this managed resource.
- machineTypes List<Property Map>
- The list of machine types matching the provided filter. Structure is documented below.
- project String
- zone String
- filter String
Supporting Types
GetMachineTypesMachineType    
- Accelerators
List<GetMachine Types Machine Type Accelerator> 
- A list of accelerator configurations assigned to this machine type. Structure is documented below.
- BundledLocal List<GetSsds Machine Types Machine Type Bundled Local Ssd> 
- The configuration of bundled local SSD for the machine type. Structure is documented below.
- Deprecateds
List<GetMachine Types Machine Type Deprecated> 
- The deprecation status associated with this machine type. Structure is documented below.
- Description string
- A textual description of the machine type.
- GuestCpus int
- The number of virtual CPUs that are available to the instance.
- bool
- Whether this machine type has a shared CPU.
- MaximumPersistent intDisks 
- The maximum persistent disks allowed.
- MaximumPersistent intDisks Size Gb 
- The maximum total persistent disks size (GB) allowed.
- MemoryMb int
- The amount of physical memory available to the instance, defined in MB.
- Name string
- The name of the machine type.
- SelfLink string
- The server-defined URL for the machine type.
- Accelerators
[]GetMachine Types Machine Type Accelerator 
- A list of accelerator configurations assigned to this machine type. Structure is documented below.
- BundledLocal []GetSsds Machine Types Machine Type Bundled Local Ssd 
- The configuration of bundled local SSD for the machine type. Structure is documented below.
- Deprecateds
[]GetMachine Types Machine Type Deprecated 
- The deprecation status associated with this machine type. Structure is documented below.
- Description string
- A textual description of the machine type.
- GuestCpus int
- The number of virtual CPUs that are available to the instance.
- bool
- Whether this machine type has a shared CPU.
- MaximumPersistent intDisks 
- The maximum persistent disks allowed.
- MaximumPersistent intDisks Size Gb 
- The maximum total persistent disks size (GB) allowed.
- MemoryMb int
- The amount of physical memory available to the instance, defined in MB.
- Name string
- The name of the machine type.
- SelfLink string
- The server-defined URL for the machine type.
- accelerators
List<GetMachine Types Machine Type Accelerator> 
- A list of accelerator configurations assigned to this machine type. Structure is documented below.
- bundledLocal List<GetSsds Machine Types Machine Type Bundled Local Ssd> 
- The configuration of bundled local SSD for the machine type. Structure is documented below.
- deprecateds
List<GetMachine Types Machine Type Deprecated> 
- The deprecation status associated with this machine type. Structure is documented below.
- description String
- A textual description of the machine type.
- guestCpus Integer
- The number of virtual CPUs that are available to the instance.
- Boolean
- Whether this machine type has a shared CPU.
- maximumPersistent IntegerDisks 
- The maximum persistent disks allowed.
- maximumPersistent IntegerDisks Size Gb 
- The maximum total persistent disks size (GB) allowed.
- memoryMb Integer
- The amount of physical memory available to the instance, defined in MB.
- name String
- The name of the machine type.
- selfLink String
- The server-defined URL for the machine type.
- accelerators
GetMachine Types Machine Type Accelerator[] 
- A list of accelerator configurations assigned to this machine type. Structure is documented below.
- bundledLocal GetSsds Machine Types Machine Type Bundled Local Ssd[] 
- The configuration of bundled local SSD for the machine type. Structure is documented below.
- deprecateds
GetMachine Types Machine Type Deprecated[] 
- The deprecation status associated with this machine type. Structure is documented below.
- description string
- A textual description of the machine type.
- guestCpus number
- The number of virtual CPUs that are available to the instance.
- boolean
- Whether this machine type has a shared CPU.
- maximumPersistent numberDisks 
- The maximum persistent disks allowed.
- maximumPersistent numberDisks Size Gb 
- The maximum total persistent disks size (GB) allowed.
- memoryMb number
- The amount of physical memory available to the instance, defined in MB.
- name string
- The name of the machine type.
- selfLink string
- The server-defined URL for the machine type.
- accelerators
Sequence[GetMachine Types Machine Type Accelerator] 
- A list of accelerator configurations assigned to this machine type. Structure is documented below.
- bundled_local_ Sequence[Getssds Machine Types Machine Type Bundled Local Ssd] 
- The configuration of bundled local SSD for the machine type. Structure is documented below.
- deprecateds
Sequence[GetMachine Types Machine Type Deprecated] 
- The deprecation status associated with this machine type. Structure is documented below.
- description str
- A textual description of the machine type.
- guest_cpus int
- The number of virtual CPUs that are available to the instance.
- bool
- Whether this machine type has a shared CPU.
- maximum_persistent_ intdisks 
- The maximum persistent disks allowed.
- maximum_persistent_ intdisks_ size_ gb 
- The maximum total persistent disks size (GB) allowed.
- memory_mb int
- The amount of physical memory available to the instance, defined in MB.
- name str
- The name of the machine type.
- self_link str
- The server-defined URL for the machine type.
- accelerators List<Property Map>
- A list of accelerator configurations assigned to this machine type. Structure is documented below.
- bundledLocal List<Property Map>Ssds 
- The configuration of bundled local SSD for the machine type. Structure is documented below.
- deprecateds List<Property Map>
- The deprecation status associated with this machine type. Structure is documented below.
- description String
- A textual description of the machine type.
- guestCpus Number
- The number of virtual CPUs that are available to the instance.
- Boolean
- Whether this machine type has a shared CPU.
- maximumPersistent NumberDisks 
- The maximum persistent disks allowed.
- maximumPersistent NumberDisks Size Gb 
- The maximum total persistent disks size (GB) allowed.
- memoryMb Number
- The amount of physical memory available to the instance, defined in MB.
- name String
- The name of the machine type.
- selfLink String
- The server-defined URL for the machine type.
GetMachineTypesMachineTypeAccelerator     
- GuestAccelerator intCount 
- Number of accelerator cards exposed to the guest.
- GuestAccelerator stringType 
- The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
- GuestAccelerator intCount 
- Number of accelerator cards exposed to the guest.
- GuestAccelerator stringType 
- The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
- guestAccelerator IntegerCount 
- Number of accelerator cards exposed to the guest.
- guestAccelerator StringType 
- The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
- guestAccelerator numberCount 
- Number of accelerator cards exposed to the guest.
- guestAccelerator stringType 
- The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
- guest_accelerator_ intcount 
- Number of accelerator cards exposed to the guest.
- guest_accelerator_ strtype 
- The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
- guestAccelerator NumberCount 
- Number of accelerator cards exposed to the guest.
- guestAccelerator StringType 
- The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.
GetMachineTypesMachineTypeBundledLocalSsd       
- DefaultInterface string
- The default disk interface if the interface is not specified.
- PartitionCount int
- The number of partitions.
- DefaultInterface string
- The default disk interface if the interface is not specified.
- PartitionCount int
- The number of partitions.
- defaultInterface String
- The default disk interface if the interface is not specified.
- partitionCount Integer
- The number of partitions.
- defaultInterface string
- The default disk interface if the interface is not specified.
- partitionCount number
- The number of partitions.
- default_interface str
- The default disk interface if the interface is not specified.
- partition_count int
- The number of partitions.
- defaultInterface String
- The default disk interface if the interface is not specified.
- partitionCount Number
- The number of partitions.
GetMachineTypesMachineTypeDeprecated     
- Replacement string
- The URL of the suggested replacement for a deprecated machine type.
- State string
- The deprecation state of this resource. This can be ACTIVE,DEPRECATED,OBSOLETE, orDELETED.
- Replacement string
- The URL of the suggested replacement for a deprecated machine type.
- State string
- The deprecation state of this resource. This can be ACTIVE,DEPRECATED,OBSOLETE, orDELETED.
- replacement String
- The URL of the suggested replacement for a deprecated machine type.
- state String
- The deprecation state of this resource. This can be ACTIVE,DEPRECATED,OBSOLETE, orDELETED.
- replacement string
- The URL of the suggested replacement for a deprecated machine type.
- state string
- The deprecation state of this resource. This can be ACTIVE,DEPRECATED,OBSOLETE, orDELETED.
- replacement str
- The URL of the suggested replacement for a deprecated machine type.
- state str
- The deprecation state of this resource. This can be ACTIVE,DEPRECATED,OBSOLETE, orDELETED.
- replacement String
- The URL of the suggested replacement for a deprecated machine type.
- state String
- The deprecation state of this resource. This can be ACTIVE,DEPRECATED,OBSOLETE, orDELETED.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.