OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi
openstack.compute.getServergroupV2
Explore with Pulumi AI
Use this data source to get information about server groups by name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const test = openstack.compute.getServergroupV2({
name: "test",
});
import pulumi
import pulumi_openstack as openstack
test = openstack.compute.get_servergroup_v2(name="test")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.GetServergroupV2(ctx, &compute.GetServergroupV2Args{
Name: "test",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var test = OpenStack.Compute.GetServergroupV2.Invoke(new()
{
Name = "test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.ComputeFunctions;
import com.pulumi.openstack.compute.inputs.GetServergroupV2Args;
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 test = ComputeFunctions.getServergroupV2(GetServergroupV2Args.builder()
.name("test")
.build());
}
}
variables:
test:
fn::invoke:
function: openstack:compute:getServergroupV2
arguments:
name: test
Using getServergroupV2
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 getServergroupV2(args: GetServergroupV2Args, opts?: InvokeOptions): Promise<GetServergroupV2Result>
function getServergroupV2Output(args: GetServergroupV2OutputArgs, opts?: InvokeOptions): Output<GetServergroupV2Result>
def get_servergroup_v2(name: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServergroupV2Result
def get_servergroup_v2_output(name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServergroupV2Result]
func GetServergroupV2(ctx *Context, args *GetServergroupV2Args, opts ...InvokeOption) (*GetServergroupV2Result, error)
func GetServergroupV2Output(ctx *Context, args *GetServergroupV2OutputArgs, opts ...InvokeOption) GetServergroupV2ResultOutput
> Note: This function is named GetServergroupV2
in the Go SDK.
public static class GetServergroupV2
{
public static Task<GetServergroupV2Result> InvokeAsync(GetServergroupV2Args args, InvokeOptions? opts = null)
public static Output<GetServergroupV2Result> Invoke(GetServergroupV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServergroupV2Result> getServergroupV2(GetServergroupV2Args args, InvokeOptions options)
public static Output<GetServergroupV2Result> getServergroupV2(GetServergroupV2Args args, InvokeOptions options)
fn::invoke:
function: openstack:compute/getServergroupV2:getServergroupV2
arguments:
# arguments dictionary
The following arguments are supported:
getServergroupV2 Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Members List<string>
- The instances that are part of this server group.
- Metadata Dictionary<string, string>
- Metadata of the server group.
- Name string
- See Argument Reference above.
- Policies List<string>
- Policy name associated with the server group.
- Project
Id string - Project ID of the server group.
- Region string
- Rules
List<Pulumi.
Open Stack. Compute. Outputs. Get Servergroup V2Rule> - Rules which are applied to specified policy.
- User
Id string - User ID of the server group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Members []string
- The instances that are part of this server group.
- Metadata map[string]string
- Metadata of the server group.
- Name string
- See Argument Reference above.
- Policies []string
- Policy name associated with the server group.
- Project
Id string - Project ID of the server group.
- Region string
- Rules
[]Get
Servergroup V2Rule - Rules which are applied to specified policy.
- User
Id string - User ID of the server group.
- id String
- The provider-assigned unique ID for this managed resource.
- members List<String>
- The instances that are part of this server group.
- metadata Map<String,String>
- Metadata of the server group.
- name String
- See Argument Reference above.
- policies List<String>
- Policy name associated with the server group.
- project
Id String - Project ID of the server group.
- region String
- rules
List<Get
Servergroup V2Rule> - Rules which are applied to specified policy.
- user
Id String - User ID of the server group.
- id string
- The provider-assigned unique ID for this managed resource.
- members string[]
- The instances that are part of this server group.
- metadata {[key: string]: string}
- Metadata of the server group.
- name string
- See Argument Reference above.
- policies string[]
- Policy name associated with the server group.
- project
Id string - Project ID of the server group.
- region string
- rules
Get
Servergroup V2Rule[] - Rules which are applied to specified policy.
- user
Id string - User ID of the server group.
- id str
- The provider-assigned unique ID for this managed resource.
- members Sequence[str]
- The instances that are part of this server group.
- metadata Mapping[str, str]
- Metadata of the server group.
- name str
- See Argument Reference above.
- policies Sequence[str]
- Policy name associated with the server group.
- project_
id str - Project ID of the server group.
- region str
- rules
Sequence[Get
Servergroup V2Rule] - Rules which are applied to specified policy.
- user_
id str - User ID of the server group.
- id String
- The provider-assigned unique ID for this managed resource.
- members List<String>
- The instances that are part of this server group.
- metadata Map<String>
- Metadata of the server group.
- name String
- See Argument Reference above.
- policies List<String>
- Policy name associated with the server group.
- project
Id String - Project ID of the server group.
- region String
- rules List<Property Map>
- Rules which are applied to specified policy.
- user
Id String - User ID of the server group.
Supporting Types
GetServergroupV2Rule
- Max
Server intPer Host
- Max
Server intPer Host
- max
Server IntegerPer Host
- max
Server numberPer Host
- max
Server NumberPer Host
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.