Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
Placement groups enforce affinity or anti-affinity policies that control whether virtual machines are hosted on the same or different physical servers.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const exampleCloudPlacementGroup = gcore.getCloudPlacementGroup({
projectId: 0,
regionId: 0,
groupId: "group_id",
});
import pulumi
import pulumi_gcore as gcore
example_cloud_placement_group = gcore.get_cloud_placement_group(project_id=0,
region_id=0,
group_id="group_id")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gcore.LookupCloudPlacementGroup(ctx, &gcore.LookupCloudPlacementGroupArgs{
ProjectId: pulumi.Float64Ref(0),
RegionId: pulumi.Float64Ref(0),
GroupId: "group_id",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var exampleCloudPlacementGroup = Gcore.GetCloudPlacementGroup.Invoke(new()
{
ProjectId = 0,
RegionId = 0,
GroupId = "group_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetCloudPlacementGroupArgs;
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 exampleCloudPlacementGroup = GcoreFunctions.getCloudPlacementGroup(GetCloudPlacementGroupArgs.builder()
.projectId(0)
.regionId(0)
.groupId("group_id")
.build());
}
}
variables:
exampleCloudPlacementGroup:
fn::invoke:
function: gcore:getCloudPlacementGroup
arguments:
projectId: 0
regionId: 0
groupId: group_id
Using getCloudPlacementGroup
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 getCloudPlacementGroup(args: GetCloudPlacementGroupArgs, opts?: InvokeOptions): Promise<GetCloudPlacementGroupResult>
function getCloudPlacementGroupOutput(args: GetCloudPlacementGroupOutputArgs, opts?: InvokeOptions): Output<GetCloudPlacementGroupResult>def get_cloud_placement_group(group_id: Optional[str] = None,
project_id: Optional[float] = None,
region_id: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudPlacementGroupResult
def get_cloud_placement_group_output(group_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
region_id: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudPlacementGroupResult]func LookupCloudPlacementGroup(ctx *Context, args *LookupCloudPlacementGroupArgs, opts ...InvokeOption) (*LookupCloudPlacementGroupResult, error)
func LookupCloudPlacementGroupOutput(ctx *Context, args *LookupCloudPlacementGroupOutputArgs, opts ...InvokeOption) LookupCloudPlacementGroupResultOutput> Note: This function is named LookupCloudPlacementGroup in the Go SDK.
public static class GetCloudPlacementGroup
{
public static Task<GetCloudPlacementGroupResult> InvokeAsync(GetCloudPlacementGroupArgs args, InvokeOptions? opts = null)
public static Output<GetCloudPlacementGroupResult> Invoke(GetCloudPlacementGroupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudPlacementGroupResult> getCloudPlacementGroup(GetCloudPlacementGroupArgs args, InvokeOptions options)
public static Output<GetCloudPlacementGroupResult> getCloudPlacementGroup(GetCloudPlacementGroupArgs args, InvokeOptions options)
fn::invoke:
function: gcore:index/getCloudPlacementGroup:getCloudPlacementGroup
arguments:
# arguments dictionaryThe following arguments are supported:
- group_
id str - project_
id float - region_
id float
getCloudPlacementGroup Result
The following output properties are available:
- Group
Id string - Id string
- The ID of this resource.
- Instances
List<Get
Cloud Placement Group Instance> - The list of instances in this server group.
- Name string
- The name of the server group.
- Policy string
- The server group policy. Options are: anti-affinity, affinity, or soft-anti-affinity.
- Region string
- Region name
- Servergroup
Id string - The ID of the server group.
- Project
Id double - Region
Id double
- Group
Id string - Id string
- The ID of this resource.
- Instances
[]Get
Cloud Placement Group Instance - The list of instances in this server group.
- Name string
- The name of the server group.
- Policy string
- The server group policy. Options are: anti-affinity, affinity, or soft-anti-affinity.
- Region string
- Region name
- Servergroup
Id string - The ID of the server group.
- Project
Id float64 - Region
Id float64
- group
Id String - id String
- The ID of this resource.
- instances
List<Get
Cloud Placement Group Instance> - The list of instances in this server group.
- name String
- The name of the server group.
- policy String
- The server group policy. Options are: anti-affinity, affinity, or soft-anti-affinity.
- region String
- Region name
- servergroup
Id String - The ID of the server group.
- project
Id Double - region
Id Double
- group
Id string - id string
- The ID of this resource.
- instances
Get
Cloud Placement Group Instance[] - The list of instances in this server group.
- name string
- The name of the server group.
- policy string
- The server group policy. Options are: anti-affinity, affinity, or soft-anti-affinity.
- region string
- Region name
- servergroup
Id string - The ID of the server group.
- project
Id number - region
Id number
- group_
id str - id str
- The ID of this resource.
- instances
Sequence[Get
Cloud Placement Group Instance] - The list of instances in this server group.
- name str
- The name of the server group.
- policy str
- The server group policy. Options are: anti-affinity, affinity, or soft-anti-affinity.
- region str
- Region name
- servergroup_
id str - The ID of the server group.
- project_
id float - region_
id float
- group
Id String - id String
- The ID of this resource.
- instances List<Property Map>
- The list of instances in this server group.
- name String
- The name of the server group.
- policy String
- The server group policy. Options are: anti-affinity, affinity, or soft-anti-affinity.
- region String
- Region name
- servergroup
Id String - The ID of the server group.
- project
Id Number - region
Id Number
Supporting Types
GetCloudPlacementGroupInstance
- Instance
Id string - The ID of the instance, corresponding to the attribute 'id'.
- Instance
Name string - The name of the instance, corresponding to the attribute 'name'.
- Instance
Id string - The ID of the instance, corresponding to the attribute 'id'.
- Instance
Name string - The name of the instance, corresponding to the attribute 'name'.
- instance
Id String - The ID of the instance, corresponding to the attribute 'id'.
- instance
Name String - The name of the instance, corresponding to the attribute 'name'.
- instance
Id string - The ID of the instance, corresponding to the attribute 'id'.
- instance
Name string - The name of the instance, corresponding to the attribute 'name'.
- instance_
id str - The ID of the instance, corresponding to the attribute 'id'.
- instance_
name str - The name of the instance, corresponding to the attribute 'name'.
- instance
Id String - The ID of the instance, corresponding to the attribute 'id'.
- instance
Name String - The name of the instance, corresponding to the attribute 'name'.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
