1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getRegionInstanceGroup
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.compute.getRegionInstanceGroup

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Get a Compute Region Instance Group within GCE. For more information, see the official documentation and API.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const group = gcp.compute.getRegionInstanceGroup({
        name: "instance-group-name",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    group = gcp.compute.get_region_instance_group(name="instance-group-name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.GetRegionInstanceGroup(ctx, &compute.GetRegionInstanceGroupArgs{
    			Name: pulumi.StringRef("instance-group-name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @group = Gcp.Compute.GetRegionInstanceGroup.Invoke(new()
        {
            Name = "instance-group-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetRegionInstanceGroupArgs;
    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 group = ComputeFunctions.getRegionInstanceGroup(GetRegionInstanceGroupArgs.builder()
                .name("instance-group-name")
                .build());
    
        }
    }
    
    variables:
      group:
        fn::invoke:
          Function: gcp:compute:getRegionInstanceGroup
          Arguments:
            name: instance-group-name
    

    The most common use of this datasource will be to fetch information about the instances inside regional managed instance groups, for instance:

    Using getRegionInstanceGroup

    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 getRegionInstanceGroup(args: GetRegionInstanceGroupArgs, opts?: InvokeOptions): Promise<GetRegionInstanceGroupResult>
    function getRegionInstanceGroupOutput(args: GetRegionInstanceGroupOutputArgs, opts?: InvokeOptions): Output<GetRegionInstanceGroupResult>
    def get_region_instance_group(name: Optional[str] = None,
                                  project: Optional[str] = None,
                                  region: Optional[str] = None,
                                  self_link: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetRegionInstanceGroupResult
    def get_region_instance_group_output(name: Optional[pulumi.Input[str]] = None,
                                  project: Optional[pulumi.Input[str]] = None,
                                  region: Optional[pulumi.Input[str]] = None,
                                  self_link: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetRegionInstanceGroupResult]
    func GetRegionInstanceGroup(ctx *Context, args *GetRegionInstanceGroupArgs, opts ...InvokeOption) (*GetRegionInstanceGroupResult, error)
    func GetRegionInstanceGroupOutput(ctx *Context, args *GetRegionInstanceGroupOutputArgs, opts ...InvokeOption) GetRegionInstanceGroupResultOutput

    > Note: This function is named GetRegionInstanceGroup in the Go SDK.

    public static class GetRegionInstanceGroup 
    {
        public static Task<GetRegionInstanceGroupResult> InvokeAsync(GetRegionInstanceGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetRegionInstanceGroupResult> Invoke(GetRegionInstanceGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRegionInstanceGroupResult> getRegionInstanceGroup(GetRegionInstanceGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:compute/getRegionInstanceGroup:getRegionInstanceGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the instance group. One of name or self_link must be provided.
    Project string
    The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.
    Region string
    The region in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor region are provided, the provider region is used.
    SelfLink string
    The link to the instance group. One of name or self_link must be provided.


    Name string
    The name of the instance group. One of name or self_link must be provided.
    Project string
    The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.
    Region string
    The region in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor region are provided, the provider region is used.
    SelfLink string
    The link to the instance group. One of name or self_link must be provided.


    name String
    The name of the instance group. One of name or self_link must be provided.
    project String
    The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.
    region String
    The region in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor region are provided, the provider region is used.
    selfLink String
    The link to the instance group. One of name or self_link must be provided.


    name string
    The name of the instance group. One of name or self_link must be provided.
    project string
    The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.
    region string
    The region in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor region are provided, the provider region is used.
    selfLink string
    The link to the instance group. One of name or self_link must be provided.


    name str
    The name of the instance group. One of name or self_link must be provided.
    project str
    The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.
    region str
    The region in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor region are provided, the provider region is used.
    self_link str
    The link to the instance group. One of name or self_link must be provided.


    name String
    The name of the instance group. One of name or self_link must be provided.
    project String
    The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.
    region String
    The region in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor region are provided, the provider region is used.
    selfLink String
    The link to the instance group. One of name or self_link must be provided.


    getRegionInstanceGroup Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Instances List<GetRegionInstanceGroupInstance>
    List of instances in the group, as a list of resources, each containing:
    Name string
    String port name
    Project string
    Region string
    SelfLink string
    Size int
    The number of instances in the group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Instances []GetRegionInstanceGroupInstance
    List of instances in the group, as a list of resources, each containing:
    Name string
    String port name
    Project string
    Region string
    SelfLink string
    Size int
    The number of instances in the group.
    id String
    The provider-assigned unique ID for this managed resource.
    instances List<GetRegionInstanceGroupInstance>
    List of instances in the group, as a list of resources, each containing:
    name String
    String port name
    project String
    region String
    selfLink String
    size Integer
    The number of instances in the group.
    id string
    The provider-assigned unique ID for this managed resource.
    instances GetRegionInstanceGroupInstance[]
    List of instances in the group, as a list of resources, each containing:
    name string
    String port name
    project string
    region string
    selfLink string
    size number
    The number of instances in the group.
    id str
    The provider-assigned unique ID for this managed resource.
    instances Sequence[GetRegionInstanceGroupInstance]
    List of instances in the group, as a list of resources, each containing:
    name str
    String port name
    project str
    region str
    self_link str
    size int
    The number of instances in the group.
    id String
    The provider-assigned unique ID for this managed resource.
    instances List<Property Map>
    List of instances in the group, as a list of resources, each containing:
    name String
    String port name
    project String
    region String
    selfLink String
    size Number
    The number of instances in the group.

    Supporting Types

    GetRegionInstanceGroupInstance

    Instance string
    URL to the instance.
    NamedPorts List<GetRegionInstanceGroupInstanceNamedPort>
    List of named ports in the group, as a list of resources, each containing:
    Status string
    String description of current state of the instance.
    Instance string
    URL to the instance.
    NamedPorts []GetRegionInstanceGroupInstanceNamedPort
    List of named ports in the group, as a list of resources, each containing:
    Status string
    String description of current state of the instance.
    instance String
    URL to the instance.
    namedPorts List<GetRegionInstanceGroupInstanceNamedPort>
    List of named ports in the group, as a list of resources, each containing:
    status String
    String description of current state of the instance.
    instance string
    URL to the instance.
    namedPorts GetRegionInstanceGroupInstanceNamedPort[]
    List of named ports in the group, as a list of resources, each containing:
    status string
    String description of current state of the instance.
    instance str
    URL to the instance.
    named_ports Sequence[GetRegionInstanceGroupInstanceNamedPort]
    List of named ports in the group, as a list of resources, each containing:
    status str
    String description of current state of the instance.
    instance String
    URL to the instance.
    namedPorts List<Property Map>
    List of named ports in the group, as a list of resources, each containing:
    status String
    String description of current state of the instance.

    GetRegionInstanceGroupInstanceNamedPort

    Name string
    The name of the instance group. One of name or self_link must be provided.
    Port int
    Integer port number
    Name string
    The name of the instance group. One of name or self_link must be provided.
    Port int
    Integer port number
    name String
    The name of the instance group. One of name or self_link must be provided.
    port Integer
    Integer port number
    name string
    The name of the instance group. One of name or self_link must be provided.
    port number
    Integer port number
    name str
    The name of the instance group. One of name or self_link must be provided.
    port int
    Integer port number
    name String
    The name of the instance group. One of name or self_link must be provided.
    port Number
    Integer port number

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi