ibm.IsPlacementGroup
Explore with Pulumi AI
Create, update, or delete a placement group. For more information, about placement group, see managing placement groups.
Note:
VPC infrastructure services are a regional specific based endpoint, by default targets to us-south
. Please make sure to target right region in the provider block as shown in the provider.tf
file, if VPC service is created in region other than us-south
.
provider.tf
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) {
}
}
{}
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = new ibm.IsPlacementGroup("example", {strategy: "host_spread"});
import pulumi
import pulumi_ibm as ibm
example = ibm.IsPlacementGroup("example", strategy="host_spread")
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.NewIsPlacementGroup(ctx, "example", &ibm.IsPlacementGroupArgs{
Strategy: pulumi.String("host_spread"),
})
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 example = new Ibm.IsPlacementGroup("example", new()
{
Strategy = "host_spread",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IsPlacementGroup;
import com.pulumi.ibm.IsPlacementGroupArgs;
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 example = new IsPlacementGroup("example", IsPlacementGroupArgs.builder()
.strategy("host_spread")
.build());
}
}
resources:
example:
type: ibm:IsPlacementGroup
properties:
strategy: host_spread
Create IsPlacementGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IsPlacementGroup(name: string, args: IsPlacementGroupArgs, opts?: CustomResourceOptions);
@overload
def IsPlacementGroup(resource_name: str,
args: IsPlacementGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IsPlacementGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
strategy: Optional[str] = None,
access_tags: Optional[Sequence[str]] = None,
is_placement_group_id: Optional[str] = None,
name: Optional[str] = None,
resource_group: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[IsPlacementGroupTimeoutsArgs] = None)
func NewIsPlacementGroup(ctx *Context, name string, args IsPlacementGroupArgs, opts ...ResourceOption) (*IsPlacementGroup, error)
public IsPlacementGroup(string name, IsPlacementGroupArgs args, CustomResourceOptions? opts = null)
public IsPlacementGroup(String name, IsPlacementGroupArgs args)
public IsPlacementGroup(String name, IsPlacementGroupArgs args, CustomResourceOptions options)
type: ibm:IsPlacementGroup
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 IsPlacementGroupArgs
- 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 IsPlacementGroupArgs
- 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 IsPlacementGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IsPlacementGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IsPlacementGroupArgs
- 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 isPlacementGroupResource = new Ibm.IsPlacementGroup("isPlacementGroupResource", new()
{
Strategy = "string",
AccessTags = new[]
{
"string",
},
IsPlacementGroupId = "string",
Name = "string",
ResourceGroup = "string",
Tags = new[]
{
"string",
},
Timeouts = new Ibm.Inputs.IsPlacementGroupTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := ibm.NewIsPlacementGroup(ctx, "isPlacementGroupResource", &ibm.IsPlacementGroupArgs{
Strategy: pulumi.String("string"),
AccessTags: pulumi.StringArray{
pulumi.String("string"),
},
IsPlacementGroupId: pulumi.String("string"),
Name: pulumi.String("string"),
ResourceGroup: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &ibm.IsPlacementGroupTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var isPlacementGroupResource = new IsPlacementGroup("isPlacementGroupResource", IsPlacementGroupArgs.builder()
.strategy("string")
.accessTags("string")
.isPlacementGroupId("string")
.name("string")
.resourceGroup("string")
.tags("string")
.timeouts(IsPlacementGroupTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
is_placement_group_resource = ibm.IsPlacementGroup("isPlacementGroupResource",
strategy="string",
access_tags=["string"],
is_placement_group_id="string",
name="string",
resource_group="string",
tags=["string"],
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const isPlacementGroupResource = new ibm.IsPlacementGroup("isPlacementGroupResource", {
strategy: "string",
accessTags: ["string"],
isPlacementGroupId: "string",
name: "string",
resourceGroup: "string",
tags: ["string"],
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: ibm:IsPlacementGroup
properties:
accessTags:
- string
isPlacementGroupId: string
name: string
resourceGroup: string
strategy: string
tags:
- string
timeouts:
create: string
delete: string
update: string
IsPlacementGroup 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 IsPlacementGroup resource accepts the following input properties:
- Strategy string
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - List<string>
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- Is
Placement stringGroup Id - The unique identifier of the PlacementGroup.
- Name string
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- Resource
Group string - The unique identifier of the resource group to use. If unspecified, the account's
- List<string>
- The user tags to attach to the placement group.
- Timeouts
Is
Placement Group Timeouts
- Strategy string
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - []string
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- Is
Placement stringGroup Id - The unique identifier of the PlacementGroup.
- Name string
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- Resource
Group string - The unique identifier of the resource group to use. If unspecified, the account's
- []string
- The user tags to attach to the placement group.
- Timeouts
Is
Placement Group Timeouts Args
- strategy String
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - List<String>
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- is
Placement StringGroup Id - The unique identifier of the PlacementGroup.
- name String
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource
Group String - The unique identifier of the resource group to use. If unspecified, the account's
- List<String>
- The user tags to attach to the placement group.
- timeouts
Is
Placement Group Timeouts
- strategy string
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - string[]
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- is
Placement stringGroup Id - The unique identifier of the PlacementGroup.
- name string
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource
Group string - The unique identifier of the resource group to use. If unspecified, the account's
- string[]
- The user tags to attach to the placement group.
- timeouts
Is
Placement Group Timeouts
- strategy str
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - Sequence[str]
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- is_
placement_ strgroup_ id - The unique identifier of the PlacementGroup.
- name str
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource_
group str - The unique identifier of the resource group to use. If unspecified, the account's
- Sequence[str]
- The user tags to attach to the placement group.
- timeouts
Is
Placement Group Timeouts Args
- strategy String
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - List<String>
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- is
Placement StringGroup Id - The unique identifier of the PlacementGroup.
- name String
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource
Group String - The unique identifier of the resource group to use. If unspecified, the account's
- List<String>
- The user tags to attach to the placement group.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the IsPlacementGroup resource produces the following output properties:
- Created
At string - The date and time that the placement group was created.
- Crn string
- The CRN for this placement group.
- Href string
- The URL for this placement group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
State string - The lifecycle state of the placement group.
- Resource
Type string - The resource type.
- Created
At string - The date and time that the placement group was created.
- Crn string
- The CRN for this placement group.
- Href string
- The URL for this placement group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
State string - The lifecycle state of the placement group.
- Resource
Type string - The resource type.
- created
At String - The date and time that the placement group was created.
- crn String
- The CRN for this placement group.
- href String
- The URL for this placement group.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
State String - The lifecycle state of the placement group.
- resource
Type String - The resource type.
- created
At string - The date and time that the placement group was created.
- crn string
- The CRN for this placement group.
- href string
- The URL for this placement group.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
State string - The lifecycle state of the placement group.
- resource
Type string - The resource type.
- created_
at str - The date and time that the placement group was created.
- crn str
- The CRN for this placement group.
- href str
- The URL for this placement group.
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
state str - The lifecycle state of the placement group.
- resource_
type str - The resource type.
- created
At String - The date and time that the placement group was created.
- crn String
- The CRN for this placement group.
- href String
- The URL for this placement group.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
State String - The lifecycle state of the placement group.
- resource
Type String - The resource type.
Look up Existing IsPlacementGroup Resource
Get an existing IsPlacementGroup 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?: IsPlacementGroupState, opts?: CustomResourceOptions): IsPlacementGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_tags: Optional[Sequence[str]] = None,
created_at: Optional[str] = None,
crn: Optional[str] = None,
href: Optional[str] = None,
is_placement_group_id: Optional[str] = None,
lifecycle_state: Optional[str] = None,
name: Optional[str] = None,
resource_group: Optional[str] = None,
resource_type: Optional[str] = None,
strategy: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[IsPlacementGroupTimeoutsArgs] = None) -> IsPlacementGroup
func GetIsPlacementGroup(ctx *Context, name string, id IDInput, state *IsPlacementGroupState, opts ...ResourceOption) (*IsPlacementGroup, error)
public static IsPlacementGroup Get(string name, Input<string> id, IsPlacementGroupState? state, CustomResourceOptions? opts = null)
public static IsPlacementGroup get(String name, Output<String> id, IsPlacementGroupState state, CustomResourceOptions options)
resources: _: type: ibm:IsPlacementGroup 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.
- List<string>
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- Created
At string - The date and time that the placement group was created.
- Crn string
- The CRN for this placement group.
- Href string
- The URL for this placement group.
- Is
Placement stringGroup Id - The unique identifier of the PlacementGroup.
- Lifecycle
State string - The lifecycle state of the placement group.
- Name string
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- Resource
Group string - The unique identifier of the resource group to use. If unspecified, the account's
- Resource
Type string - The resource type.
- Strategy string
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - List<string>
- The user tags to attach to the placement group.
- Timeouts
Is
Placement Group Timeouts
- []string
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- Created
At string - The date and time that the placement group was created.
- Crn string
- The CRN for this placement group.
- Href string
- The URL for this placement group.
- Is
Placement stringGroup Id - The unique identifier of the PlacementGroup.
- Lifecycle
State string - The lifecycle state of the placement group.
- Name string
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- Resource
Group string - The unique identifier of the resource group to use. If unspecified, the account's
- Resource
Type string - The resource type.
- Strategy string
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - []string
- The user tags to attach to the placement group.
- Timeouts
Is
Placement Group Timeouts Args
- List<String>
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- created
At String - The date and time that the placement group was created.
- crn String
- The CRN for this placement group.
- href String
- The URL for this placement group.
- is
Placement StringGroup Id - The unique identifier of the PlacementGroup.
- lifecycle
State String - The lifecycle state of the placement group.
- name String
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource
Group String - The unique identifier of the resource group to use. If unspecified, the account's
- resource
Type String - The resource type.
- strategy String
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - List<String>
- The user tags to attach to the placement group.
- timeouts
Is
Placement Group Timeouts
- string[]
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- created
At string - The date and time that the placement group was created.
- crn string
- The CRN for this placement group.
- href string
- The URL for this placement group.
- is
Placement stringGroup Id - The unique identifier of the PlacementGroup.
- lifecycle
State string - The lifecycle state of the placement group.
- name string
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource
Group string - The unique identifier of the resource group to use. If unspecified, the account's
- resource
Type string - The resource type.
- strategy string
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - string[]
- The user tags to attach to the placement group.
- timeouts
Is
Placement Group Timeouts
- Sequence[str]
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- created_
at str - The date and time that the placement group was created.
- crn str
- The CRN for this placement group.
- href str
- The URL for this placement group.
- is_
placement_ strgroup_ id - The unique identifier of the PlacementGroup.
- lifecycle_
state str - The lifecycle state of the placement group.
- name str
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource_
group str - The unique identifier of the resource group to use. If unspecified, the account's
- resource_
type str - The resource type.
- strategy str
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - Sequence[str]
- The user tags to attach to the placement group.
- timeouts
Is
Placement Group Timeouts Args
- List<String>
A list of access management tags to attach to the placement group.
Note: For more information, about creating access tags, see working with tags.
- created
At String - The date and time that the placement group was created.
- crn String
- The CRN for this placement group.
- href String
- The URL for this placement group.
- is
Placement StringGroup Id - The unique identifier of the PlacementGroup.
- lifecycle
State String - The lifecycle state of the placement group.
- name String
- The unique user-defined name for this placement group. If unspecified, the name will be a hyphenated list of randomly-selected words.
- resource
Group String - The unique identifier of the resource group to use. If unspecified, the account's
- resource
Type String - The resource type.
- strategy String
- The strategy for this placement group-
host_spread
: place on different compute hosts-power_spread
: place on compute hosts that use different power sources. The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered. default resourcegroup is used. - List<String>
- The user tags to attach to the placement group.
- timeouts Property Map
Supporting Types
IsPlacementGroupTimeouts, IsPlacementGroupTimeoutsArgs
Import
The ibm_is_placement_group
can be imported by using ID.
Example
$ pulumi import ibm:index/isPlacementGroup:IsPlacementGroup example d7bec597-4726-451f-8a63-e62e6f19c32c
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.