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

ibm.getIsPlacementGroup

Explore with Pulumi AI

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

    Retrieve information of a placement group as a read-only data source. 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 = ibm.getIsPlacementGroup({
        name: ibm_is_placement_group.example.name,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_placement_group(name=ibm_is_placement_group["example"]["name"])
    
    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.LookupIsPlacementGroup(ctx, &ibm.LookupIsPlacementGroupArgs{
    			Name: ibm_is_placement_group.Example.Name,
    		}, nil)
    		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 = Ibm.GetIsPlacementGroup.Invoke(new()
        {
            Name = ibm_is_placement_group.Example.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsPlacementGroupArgs;
    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 example = IbmFunctions.getIsPlacementGroup(GetIsPlacementGroupArgs.builder()
                .name(ibm_is_placement_group.example().name())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsPlacementGroup
          arguments:
            name: ${ibm_is_placement_group.example.name}
    

    Using getIsPlacementGroup

    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 getIsPlacementGroup(args: GetIsPlacementGroupArgs, opts?: InvokeOptions): Promise<GetIsPlacementGroupResult>
    function getIsPlacementGroupOutput(args: GetIsPlacementGroupOutputArgs, opts?: InvokeOptions): Output<GetIsPlacementGroupResult>
    def get_is_placement_group(id: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetIsPlacementGroupResult
    def get_is_placement_group_output(id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetIsPlacementGroupResult]
    func LookupIsPlacementGroup(ctx *Context, args *LookupIsPlacementGroupArgs, opts ...InvokeOption) (*LookupIsPlacementGroupResult, error)
    func LookupIsPlacementGroupOutput(ctx *Context, args *LookupIsPlacementGroupOutputArgs, opts ...InvokeOption) LookupIsPlacementGroupResultOutput

    > Note: This function is named LookupIsPlacementGroup in the Go SDK.

    public static class GetIsPlacementGroup 
    {
        public static Task<GetIsPlacementGroupResult> InvokeAsync(GetIsPlacementGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetIsPlacementGroupResult> Invoke(GetIsPlacementGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsPlacementGroupResult> getIsPlacementGroup(GetIsPlacementGroupArgs args, InvokeOptions options)
    public static Output<GetIsPlacementGroupResult> getIsPlacementGroup(GetIsPlacementGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsPlacementGroup:getIsPlacementGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The placement group identifier.
    Id string
    The unique identifier of the PlacementGroup.
    Name string
    The placement group identifier.
    Id string
    The unique identifier of the PlacementGroup.
    name String
    The placement group identifier.
    id String
    The unique identifier of the PlacementGroup.
    name string
    The placement group identifier.
    id string
    The unique identifier of the PlacementGroup.
    name str
    The placement group identifier.
    id str
    The unique identifier of the PlacementGroup.
    name String
    The placement group identifier.
    id String
    The unique identifier of the PlacementGroup.

    getIsPlacementGroup Result

    The following output properties are available:

    AccessTags List<string>
    (String) Access management tags associated to the placement group.
    CreatedAt 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 unique identifier of the PlacementGroup.
    LifecycleState string
    The lifecycle state of the placement group.
    Name string
    The user-defined name for this placement group.
    ResourceGroups List<GetIsPlacementGroupResourceGroup>
    The unique identifier of this resource group for this placement group.
    ResourceType 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 sourcesThe 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.
    Tags List<string>
    (String) Usertags associated to the placement group.
    AccessTags []string
    (String) Access management tags associated to the placement group.
    CreatedAt 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 unique identifier of the PlacementGroup.
    LifecycleState string
    The lifecycle state of the placement group.
    Name string
    The user-defined name for this placement group.
    ResourceGroups []GetIsPlacementGroupResourceGroup
    The unique identifier of this resource group for this placement group.
    ResourceType 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 sourcesThe 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.
    Tags []string
    (String) Usertags associated to the placement group.
    accessTags List<String>
    (String) Access management tags associated to the placement group.
    createdAt 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 unique identifier of the PlacementGroup.
    lifecycleState String
    The lifecycle state of the placement group.
    name String
    The user-defined name for this placement group.
    resourceGroups List<GetIsPlacementGroupResourceGroup>
    The unique identifier of this resource group for this placement group.
    resourceType 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 sourcesThe 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.
    tags List<String>
    (String) Usertags associated to the placement group.
    accessTags string[]
    (String) Access management tags associated to the placement group.
    createdAt 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 unique identifier of the PlacementGroup.
    lifecycleState string
    The lifecycle state of the placement group.
    name string
    The user-defined name for this placement group.
    resourceGroups GetIsPlacementGroupResourceGroup[]
    The unique identifier of this resource group for this placement group.
    resourceType 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 sourcesThe 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.
    tags string[]
    (String) Usertags associated to the placement group.
    access_tags Sequence[str]
    (String) Access management tags associated to the placement group.
    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 unique identifier of the PlacementGroup.
    lifecycle_state str
    The lifecycle state of the placement group.
    name str
    The user-defined name for this placement group.
    resource_groups Sequence[GetIsPlacementGroupResourceGroup]
    The unique identifier of this resource group for this placement group.
    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 sourcesThe 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.
    tags Sequence[str]
    (String) Usertags associated to the placement group.
    accessTags List<String>
    (String) Access management tags associated to the placement group.
    createdAt 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 unique identifier of the PlacementGroup.
    lifecycleState String
    The lifecycle state of the placement group.
    name String
    The user-defined name for this placement group.
    resourceGroups List<Property Map>
    The unique identifier of this resource group for this placement group.
    resourceType 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 sourcesThe 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.
    tags List<String>
    (String) Usertags associated to the placement group.

    Supporting Types

    GetIsPlacementGroupResourceGroup

    Href string
    The URL for this placement group.
    Id string
    The unique identifier of the PlacementGroup.
    Name string
    The placement group identifier.
    Href string
    The URL for this placement group.
    Id string
    The unique identifier of the PlacementGroup.
    Name string
    The placement group identifier.
    href String
    The URL for this placement group.
    id String
    The unique identifier of the PlacementGroup.
    name String
    The placement group identifier.
    href string
    The URL for this placement group.
    id string
    The unique identifier of the PlacementGroup.
    name string
    The placement group identifier.
    href str
    The URL for this placement group.
    id str
    The unique identifier of the PlacementGroup.
    name str
    The placement group identifier.
    href String
    The URL for this placement group.
    id String
    The unique identifier of the PlacementGroup.
    name String
    The placement group identifier.

    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