Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi
gcp.compute.getRegionInstanceGroup
Explore with Pulumi AI
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
orself_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 neitherself_link
norproject
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 neitherself_link
norregion
are provided, the provider region is used. - Self
Link string - The link to the instance group. One of
name
orself_link
must be provided.
- Name string
- The name of the instance group. One of
name
orself_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 neitherself_link
norproject
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 neitherself_link
norregion
are provided, the provider region is used. - Self
Link string - The link to the instance group. One of
name
orself_link
must be provided.
- name String
- The name of the instance group. One of
name
orself_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 neitherself_link
norproject
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 neitherself_link
norregion
are provided, the provider region is used. - self
Link String - The link to the instance group. One of
name
orself_link
must be provided.
- name string
- The name of the instance group. One of
name
orself_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 neitherself_link
norproject
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 neitherself_link
norregion
are provided, the provider region is used. - self
Link string - The link to the instance group. One of
name
orself_link
must be provided.
- name str
- The name of the instance group. One of
name
orself_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 neitherself_link
norproject
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 neitherself_link
norregion
are provided, the provider region is used. - self_
link str - The link to the instance group. One of
name
orself_link
must be provided.
- name String
- The name of the instance group. One of
name
orself_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 neitherself_link
norproject
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 neitherself_link
norregion
are provided, the provider region is used. - self
Link String - The link to the instance group. One of
name
orself_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<Get
Region Instance Group Instance> - List of instances in the group, as a list of resources, each containing:
- name String
- String port name
- project String
- region String
- self
Link String - size Integer
- The number of instances in the group.
Supporting Types
GetRegionInstanceGroupInstance
- Instance string
- URL to the instance.
- Named
Ports List<GetRegion Instance Group Instance Named Port> - 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.
- Named
Ports []GetRegion Instance Group Instance Named Port - 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.
- named
Ports List<GetRegion Instance Group Instance Named Port> - 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.
- named
Ports GetRegion Instance Group Instance Named Port[] - 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[GetRegion Instance Group Instance Named Port] - 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.
- named
Ports 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
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.