ibm.PiSppPlacementGroup
Explore with Pulumi AI
Create, update or delete a shared processor pool placement group.
Example Usage
The following example enables you to create a shared processor pool placement group with a group policy of affinity:
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const testaccPlacementGroup = new ibm.PiSppPlacementGroup("testaccPlacementGroup", {
piCloudInstanceId: "<value of the cloud_instance_id>",
piSppPlacementGroupName: "my_pg",
piSppPlacementGroupPolicy: "affinity",
});
import pulumi
import pulumi_ibm as ibm
testacc_placement_group = ibm.PiSppPlacementGroup("testaccPlacementGroup",
pi_cloud_instance_id="<value of the cloud_instance_id>",
pi_spp_placement_group_name="my_pg",
pi_spp_placement_group_policy="affinity")
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.NewPiSppPlacementGroup(ctx, "testaccPlacementGroup", &ibm.PiSppPlacementGroupArgs{
PiCloudInstanceId: pulumi.String("<value of the cloud_instance_id>"),
PiSppPlacementGroupName: pulumi.String("my_pg"),
PiSppPlacementGroupPolicy: pulumi.String("affinity"),
})
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 testaccPlacementGroup = new Ibm.PiSppPlacementGroup("testaccPlacementGroup", new()
{
PiCloudInstanceId = "<value of the cloud_instance_id>",
PiSppPlacementGroupName = "my_pg",
PiSppPlacementGroupPolicy = "affinity",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.PiSppPlacementGroup;
import com.pulumi.ibm.PiSppPlacementGroupArgs;
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 testaccPlacementGroup = new PiSppPlacementGroup("testaccPlacementGroup", PiSppPlacementGroupArgs.builder()
.piCloudInstanceId("<value of the cloud_instance_id>")
.piSppPlacementGroupName("my_pg")
.piSppPlacementGroupPolicy("affinity")
.build());
}
}
resources:
testaccPlacementGroup:
type: ibm:PiSppPlacementGroup
properties:
piCloudInstanceId: <value of the cloud_instance_id>
piSppPlacementGroupName: my_pg
piSppPlacementGroupPolicy: affinity
Notes
- Please find supported Regions for endpoints.
- If a Power cloud instance is provisioned at
lon04
, The provider level attributes should be as follows:region
-lon
zone
-lon04
Example usage:
import * as pulumi from "@pulumi/pulumi";
import pulumi
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
}
}
{}
Create PiSppPlacementGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PiSppPlacementGroup(name: string, args: PiSppPlacementGroupArgs, opts?: CustomResourceOptions);
@overload
def PiSppPlacementGroup(resource_name: str,
args: PiSppPlacementGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PiSppPlacementGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
pi_cloud_instance_id: Optional[str] = None,
pi_spp_placement_group_name: Optional[str] = None,
pi_spp_placement_group_policy: Optional[str] = None,
pi_spp_placement_group_id: Optional[str] = None,
timeouts: Optional[PiSppPlacementGroupTimeoutsArgs] = None)
func NewPiSppPlacementGroup(ctx *Context, name string, args PiSppPlacementGroupArgs, opts ...ResourceOption) (*PiSppPlacementGroup, error)
public PiSppPlacementGroup(string name, PiSppPlacementGroupArgs args, CustomResourceOptions? opts = null)
public PiSppPlacementGroup(String name, PiSppPlacementGroupArgs args)
public PiSppPlacementGroup(String name, PiSppPlacementGroupArgs args, CustomResourceOptions options)
type: ibm:PiSppPlacementGroup
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 PiSppPlacementGroupArgs
- 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 PiSppPlacementGroupArgs
- 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 PiSppPlacementGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PiSppPlacementGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PiSppPlacementGroupArgs
- 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 piSppPlacementGroupResource = new Ibm.PiSppPlacementGroup("piSppPlacementGroupResource", new()
{
PiCloudInstanceId = "string",
PiSppPlacementGroupName = "string",
PiSppPlacementGroupPolicy = "string",
PiSppPlacementGroupId = "string",
Timeouts = new Ibm.Inputs.PiSppPlacementGroupTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := ibm.NewPiSppPlacementGroup(ctx, "piSppPlacementGroupResource", &ibm.PiSppPlacementGroupArgs{
PiCloudInstanceId: pulumi.String("string"),
PiSppPlacementGroupName: pulumi.String("string"),
PiSppPlacementGroupPolicy: pulumi.String("string"),
PiSppPlacementGroupId: pulumi.String("string"),
Timeouts: &.PiSppPlacementGroupTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var piSppPlacementGroupResource = new PiSppPlacementGroup("piSppPlacementGroupResource", PiSppPlacementGroupArgs.builder()
.piCloudInstanceId("string")
.piSppPlacementGroupName("string")
.piSppPlacementGroupPolicy("string")
.piSppPlacementGroupId("string")
.timeouts(PiSppPlacementGroupTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
pi_spp_placement_group_resource = ibm.PiSppPlacementGroup("piSppPlacementGroupResource",
pi_cloud_instance_id="string",
pi_spp_placement_group_name="string",
pi_spp_placement_group_policy="string",
pi_spp_placement_group_id="string",
timeouts={
"create": "string",
"delete": "string",
})
const piSppPlacementGroupResource = new ibm.PiSppPlacementGroup("piSppPlacementGroupResource", {
piCloudInstanceId: "string",
piSppPlacementGroupName: "string",
piSppPlacementGroupPolicy: "string",
piSppPlacementGroupId: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: ibm:PiSppPlacementGroup
properties:
piCloudInstanceId: string
piSppPlacementGroupId: string
piSppPlacementGroupName: string
piSppPlacementGroupPolicy: string
timeouts:
create: string
delete: string
PiSppPlacementGroup 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 PiSppPlacementGroup resource accepts the following input properties:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Spp stringPlacement Group Name - The name of the shared processor pool placement group.
- Pi
Spp stringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - Pi
Spp stringPlacement Group Id - (String) The unique identifier of the placement group.
- Timeouts
Pi
Spp Placement Group Timeouts
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Spp stringPlacement Group Name - The name of the shared processor pool placement group.
- Pi
Spp stringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - Pi
Spp stringPlacement Group Id - (String) The unique identifier of the placement group.
- Timeouts
Pi
Spp Placement Group Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Spp StringPlacement Group Name - The name of the shared processor pool placement group.
- pi
Spp StringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - pi
Spp StringPlacement Group Id - (String) The unique identifier of the placement group.
- timeouts
Pi
Spp Placement Group Timeouts
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Spp stringPlacement Group Name - The name of the shared processor pool placement group.
- pi
Spp stringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - pi
Spp stringPlacement Group Id - (String) The unique identifier of the placement group.
- timeouts
Pi
Spp Placement Group Timeouts
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
spp_ strplacement_ group_ name - The name of the shared processor pool placement group.
- pi_
spp_ strplacement_ group_ policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - pi_
spp_ strplacement_ group_ id - (String) The unique identifier of the placement group.
- timeouts
Pi
Spp Placement Group Timeouts Args
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Spp StringPlacement Group Name - The name of the shared processor pool placement group.
- pi
Spp StringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - pi
Spp StringPlacement Group Id - (String) The unique identifier of the placement group.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the PiSppPlacementGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Members List<string>
- (List of strings) The list of server instances IDs that are members of the placement group.
- Spp
Placement stringGroup Id - (String) The placement group ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Members []string
- (List of strings) The list of server instances IDs that are members of the placement group.
- Spp
Placement stringGroup Id - (String) The placement group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- members List<String>
- (List of strings) The list of server instances IDs that are members of the placement group.
- spp
Placement StringGroup Id - (String) The placement group ID.
- id string
- The provider-assigned unique ID for this managed resource.
- members string[]
- (List of strings) The list of server instances IDs that are members of the placement group.
- spp
Placement stringGroup Id - (String) The placement group ID.
- id str
- The provider-assigned unique ID for this managed resource.
- members Sequence[str]
- (List of strings) The list of server instances IDs that are members of the placement group.
- spp_
placement_ strgroup_ id - (String) The placement group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- members List<String>
- (List of strings) The list of server instances IDs that are members of the placement group.
- spp
Placement StringGroup Id - (String) The placement group ID.
Look up Existing PiSppPlacementGroup Resource
Get an existing PiSppPlacementGroup 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?: PiSppPlacementGroupState, opts?: CustomResourceOptions): PiSppPlacementGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
members: Optional[Sequence[str]] = None,
pi_cloud_instance_id: Optional[str] = None,
pi_spp_placement_group_id: Optional[str] = None,
pi_spp_placement_group_name: Optional[str] = None,
pi_spp_placement_group_policy: Optional[str] = None,
spp_placement_group_id: Optional[str] = None,
timeouts: Optional[PiSppPlacementGroupTimeoutsArgs] = None) -> PiSppPlacementGroup
func GetPiSppPlacementGroup(ctx *Context, name string, id IDInput, state *PiSppPlacementGroupState, opts ...ResourceOption) (*PiSppPlacementGroup, error)
public static PiSppPlacementGroup Get(string name, Input<string> id, PiSppPlacementGroupState? state, CustomResourceOptions? opts = null)
public static PiSppPlacementGroup get(String name, Output<String> id, PiSppPlacementGroupState state, CustomResourceOptions options)
resources: _: type: ibm:PiSppPlacementGroup 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.
- Members List<string>
- (List of strings) The list of server instances IDs that are members of the placement group.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Spp stringPlacement Group Id - (String) The unique identifier of the placement group.
- Pi
Spp stringPlacement Group Name - The name of the shared processor pool placement group.
- Pi
Spp stringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - Spp
Placement stringGroup Id - (String) The placement group ID.
- Timeouts
Pi
Spp Placement Group Timeouts
- Members []string
- (List of strings) The list of server instances IDs that are members of the placement group.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Spp stringPlacement Group Id - (String) The unique identifier of the placement group.
- Pi
Spp stringPlacement Group Name - The name of the shared processor pool placement group.
- Pi
Spp stringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - Spp
Placement stringGroup Id - (String) The placement group ID.
- Timeouts
Pi
Spp Placement Group Timeouts Args
- members List<String>
- (List of strings) The list of server instances IDs that are members of the placement group.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Spp StringPlacement Group Id - (String) The unique identifier of the placement group.
- pi
Spp StringPlacement Group Name - The name of the shared processor pool placement group.
- pi
Spp StringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - spp
Placement StringGroup Id - (String) The placement group ID.
- timeouts
Pi
Spp Placement Group Timeouts
- members string[]
- (List of strings) The list of server instances IDs that are members of the placement group.
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Spp stringPlacement Group Id - (String) The unique identifier of the placement group.
- pi
Spp stringPlacement Group Name - The name of the shared processor pool placement group.
- pi
Spp stringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - spp
Placement stringGroup Id - (String) The placement group ID.
- timeouts
Pi
Spp Placement Group Timeouts
- members Sequence[str]
- (List of strings) The list of server instances IDs that are members of the placement group.
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
spp_ strplacement_ group_ id - (String) The unique identifier of the placement group.
- pi_
spp_ strplacement_ group_ name - The name of the shared processor pool placement group.
- pi_
spp_ strplacement_ group_ policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - spp_
placement_ strgroup_ id - (String) The placement group ID.
- timeouts
Pi
Spp Placement Group Timeouts Args
- members List<String>
- (List of strings) The list of server instances IDs that are members of the placement group.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Spp StringPlacement Group Id - (String) The unique identifier of the placement group.
- pi
Spp StringPlacement Group Name - The name of the shared processor pool placement group.
- pi
Spp StringPlacement Group Policy - The value of the group's affinity policy. Valid values are
affinity
andanti-affinity
. - spp
Placement StringGroup Id - (String) The placement group ID.
- timeouts Property Map
Supporting Types
PiSppPlacementGroupTimeouts, PiSppPlacementGroupTimeoutsArgs
Import
Example
bash
$ pulumi import ibm:index/piSppPlacementGroup:PiSppPlacementGroup example d7bec597-4726-451f-8a63-e62e6f19c32c/b17a2b7f-77ab-491c-811e-495f8d4c8947
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.