1. Packages
  2. Ibm Provider
  3. API Docs
  4. ComputePlacementGroup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.ComputePlacementGroup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, or delete a placement group for your virtual server instance. With placement groups, you can control the physical host your virtual server instance is deployed to. For more information, about the placement group, see placement groups.

    Note

    For more information, see the IBM Cloud Classic Infrastructure (SoftLayer) API docs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testPlacementGroup = new ibm.ComputePlacementGroup("testPlacementGroup", {
        datacenter: "dal05",
        pod: "pod01",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_placement_group = ibm.ComputePlacementGroup("testPlacementGroup",
        datacenter="dal05",
        pod="pod01")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewComputePlacementGroup(ctx, "testPlacementGroup", &ibm.ComputePlacementGroupArgs{
    			Datacenter: pulumi.String("dal05"),
    			Pod:        pulumi.String("pod01"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var testPlacementGroup = new Ibm.ComputePlacementGroup("testPlacementGroup", new()
        {
            Datacenter = "dal05",
            Pod = "pod01",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.ComputePlacementGroup;
    import com.pulumi.ibm.ComputePlacementGroupArgs;
    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) {
            var testPlacementGroup = new ComputePlacementGroup("testPlacementGroup", ComputePlacementGroupArgs.builder()
                .datacenter("dal05")
                .pod("pod01")
                .build());
    
        }
    }
    
    resources:
      testPlacementGroup:
        type: ibm:ComputePlacementGroup
        properties:
          datacenter: dal05
          pod: pod01
    

    Create ComputePlacementGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ComputePlacementGroup(name: string, args: ComputePlacementGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ComputePlacementGroup(resource_name: str,
                              args: ComputePlacementGroupArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputePlacementGroup(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              datacenter: Optional[str] = None,
                              pod: Optional[str] = None,
                              compute_placement_group_id: Optional[str] = None,
                              name: Optional[str] = None,
                              rule: Optional[str] = None,
                              tags: Optional[Sequence[str]] = None,
                              timeouts: Optional[ComputePlacementGroupTimeoutsArgs] = None)
    func NewComputePlacementGroup(ctx *Context, name string, args ComputePlacementGroupArgs, opts ...ResourceOption) (*ComputePlacementGroup, error)
    public ComputePlacementGroup(string name, ComputePlacementGroupArgs args, CustomResourceOptions? opts = null)
    public ComputePlacementGroup(String name, ComputePlacementGroupArgs args)
    public ComputePlacementGroup(String name, ComputePlacementGroupArgs args, CustomResourceOptions options)
    
    type: ibm:ComputePlacementGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ComputePlacementGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ComputePlacementGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ComputePlacementGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputePlacementGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputePlacementGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var computePlacementGroupResource = new Ibm.ComputePlacementGroup("computePlacementGroupResource", new()
    {
        Datacenter = "string",
        Pod = "string",
        ComputePlacementGroupId = "string",
        Name = "string",
        Rule = "string",
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.ComputePlacementGroupTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := ibm.NewComputePlacementGroup(ctx, "computePlacementGroupResource", &ibm.ComputePlacementGroupArgs{
    	Datacenter:              pulumi.String("string"),
    	Pod:                     pulumi.String("string"),
    	ComputePlacementGroupId: pulumi.String("string"),
    	Name:                    pulumi.String("string"),
    	Rule:                    pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.ComputePlacementGroupTimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var computePlacementGroupResource = new ComputePlacementGroup("computePlacementGroupResource", ComputePlacementGroupArgs.builder()
        .datacenter("string")
        .pod("string")
        .computePlacementGroupId("string")
        .name("string")
        .rule("string")
        .tags("string")
        .timeouts(ComputePlacementGroupTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    compute_placement_group_resource = ibm.ComputePlacementGroup("computePlacementGroupResource",
        datacenter="string",
        pod="string",
        compute_placement_group_id="string",
        name="string",
        rule="string",
        tags=["string"],
        timeouts={
            "delete": "string",
        })
    
    const computePlacementGroupResource = new ibm.ComputePlacementGroup("computePlacementGroupResource", {
        datacenter: "string",
        pod: "string",
        computePlacementGroupId: "string",
        name: "string",
        rule: "string",
        tags: ["string"],
        timeouts: {
            "delete": "string",
        },
    });
    
    type: ibm:ComputePlacementGroup
    properties:
        computePlacementGroupId: string
        datacenter: string
        name: string
        pod: string
        rule: string
        tags:
            - string
        timeouts:
            delete: string
    

    ComputePlacementGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ComputePlacementGroup resource accepts the following input properties:

    Datacenter string
    The datacenter in which you want to provision the placement group.
    Pod string
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    ComputePlacementGroupId string
    (String) The unique identifier of the new placement group.
    Name string
    The descriptive that is used to identify a placement group.
    Rule string
    The rule of the placement group. Default SPREAD.
    Tags List<string>
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    Timeouts ComputePlacementGroupTimeouts
    Datacenter string
    The datacenter in which you want to provision the placement group.
    Pod string
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    ComputePlacementGroupId string
    (String) The unique identifier of the new placement group.
    Name string
    The descriptive that is used to identify a placement group.
    Rule string
    The rule of the placement group. Default SPREAD.
    Tags []string
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    Timeouts ComputePlacementGroupTimeoutsArgs
    datacenter String
    The datacenter in which you want to provision the placement group.
    pod String
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    computePlacementGroupId String
    (String) The unique identifier of the new placement group.
    name String
    The descriptive that is used to identify a placement group.
    rule String
    The rule of the placement group. Default SPREAD.
    tags List<String>
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ComputePlacementGroupTimeouts
    datacenter string
    The datacenter in which you want to provision the placement group.
    pod string
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    computePlacementGroupId string
    (String) The unique identifier of the new placement group.
    name string
    The descriptive that is used to identify a placement group.
    rule string
    The rule of the placement group. Default SPREAD.
    tags string[]
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ComputePlacementGroupTimeouts
    datacenter str
    The datacenter in which you want to provision the placement group.
    pod str
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    compute_placement_group_id str
    (String) The unique identifier of the new placement group.
    name str
    The descriptive that is used to identify a placement group.
    rule str
    The rule of the placement group. Default SPREAD.
    tags Sequence[str]
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ComputePlacementGroupTimeoutsArgs
    datacenter String
    The datacenter in which you want to provision the placement group.
    pod String
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    computePlacementGroupId String
    (String) The unique identifier of the new placement group.
    name String
    The descriptive that is used to identify a placement group.
    rule String
    The rule of the placement group. Default SPREAD.
    tags List<String>
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComputePlacementGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ComputePlacementGroup Resource

    Get an existing ComputePlacementGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ComputePlacementGroupState, opts?: CustomResourceOptions): ComputePlacementGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compute_placement_group_id: Optional[str] = None,
            datacenter: Optional[str] = None,
            name: Optional[str] = None,
            pod: Optional[str] = None,
            rule: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[ComputePlacementGroupTimeoutsArgs] = None) -> ComputePlacementGroup
    func GetComputePlacementGroup(ctx *Context, name string, id IDInput, state *ComputePlacementGroupState, opts ...ResourceOption) (*ComputePlacementGroup, error)
    public static ComputePlacementGroup Get(string name, Input<string> id, ComputePlacementGroupState? state, CustomResourceOptions? opts = null)
    public static ComputePlacementGroup get(String name, Output<String> id, ComputePlacementGroupState state, CustomResourceOptions options)
    resources:  _:    type: ibm:ComputePlacementGroup    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ComputePlacementGroupId string
    (String) The unique identifier of the new placement group.
    Datacenter string
    The datacenter in which you want to provision the placement group.
    Name string
    The descriptive that is used to identify a placement group.
    Pod string
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    Rule string
    The rule of the placement group. Default SPREAD.
    Tags List<string>
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    Timeouts ComputePlacementGroupTimeouts
    ComputePlacementGroupId string
    (String) The unique identifier of the new placement group.
    Datacenter string
    The datacenter in which you want to provision the placement group.
    Name string
    The descriptive that is used to identify a placement group.
    Pod string
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    Rule string
    The rule of the placement group. Default SPREAD.
    Tags []string
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    Timeouts ComputePlacementGroupTimeoutsArgs
    computePlacementGroupId String
    (String) The unique identifier of the new placement group.
    datacenter String
    The datacenter in which you want to provision the placement group.
    name String
    The descriptive that is used to identify a placement group.
    pod String
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    rule String
    The rule of the placement group. Default SPREAD.
    tags List<String>
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ComputePlacementGroupTimeouts
    computePlacementGroupId string
    (String) The unique identifier of the new placement group.
    datacenter string
    The datacenter in which you want to provision the placement group.
    name string
    The descriptive that is used to identify a placement group.
    pod string
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    rule string
    The rule of the placement group. Default SPREAD.
    tags string[]
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ComputePlacementGroupTimeouts
    compute_placement_group_id str
    (String) The unique identifier of the new placement group.
    datacenter str
    The datacenter in which you want to provision the placement group.
    name str
    The descriptive that is used to identify a placement group.
    pod str
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    rule str
    The rule of the placement group. Default SPREAD.
    tags Sequence[str]
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ComputePlacementGroupTimeoutsArgs
    computePlacementGroupId String
    (String) The unique identifier of the new placement group.
    datacenter String
    The datacenter in which you want to provision the placement group.
    name String
    The descriptive that is used to identify a placement group.
    pod String
    The data center pod where you want to create the placement group. To find the pod, run ibmcloud sl placement-group create-options and select one of the Back-end Router IDs for the data center where you want to create the placement group.
    rule String
    The rule of the placement group. Default SPREAD.
    tags List<String>
    Tags associated with the placement group. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts Property Map

    Supporting Types

    ComputePlacementGroupTimeouts, ComputePlacementGroupTimeoutsArgs

    Delete string
    Delete string
    delete String
    delete string
    delete str
    delete String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud