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

ibm.ResourceGroup

Explore with Pulumi AI

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

    Create, update, or delete an IBM Cloud resource group. For more information, about resource group, see managing resource groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const resourceGroup = new ibm.ResourceGroup("resourceGroup", {});
    
    import pulumi
    import pulumi_ibm as ibm
    
    resource_group = ibm.ResourceGroup("resourceGroup")
    
    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.NewResourceGroup(ctx, "resourceGroup", 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 resourceGroup = new Ibm.ResourceGroup("resourceGroup");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.ResourceGroup;
    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 resourceGroup = new ResourceGroup("resourceGroup");
    
        }
    }
    
    resources:
      resourceGroup:
        type: ibm:ResourceGroup
    

    Create ResourceGroup Resource

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

    Constructor syntax

    new ResourceGroup(name: string, args?: ResourceGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ResourceGroup(resource_name: str,
                      args: Optional[ResourceGroupArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourceGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      name: Optional[str] = None,
                      resource_group_id: Optional[str] = None,
                      tags: Optional[Sequence[str]] = None,
                      timeouts: Optional[ResourceGroupTimeoutsArgs] = None)
    func NewResourceGroup(ctx *Context, name string, args *ResourceGroupArgs, opts ...ResourceOption) (*ResourceGroup, error)
    public ResourceGroup(string name, ResourceGroupArgs? args = null, CustomResourceOptions? opts = null)
    public ResourceGroup(String name, ResourceGroupArgs args)
    public ResourceGroup(String name, ResourceGroupArgs args, CustomResourceOptions options)
    
    type: ibm:ResourceGroup
    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 ResourceGroupArgs
    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 ResourceGroupArgs
    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 ResourceGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceGroupArgs
    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 resourceGroupResource = new Ibm.ResourceGroup("resourceGroupResource", new()
    {
        Name = "string",
        ResourceGroupId = "string",
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.ResourceGroupTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := ibm.NewResourceGroup(ctx, "resourceGroupResource", &ibm.ResourceGroupArgs{
    	Name:            pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.ResourceGroupTimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var resourceGroupResource = new ResourceGroup("resourceGroupResource", ResourceGroupArgs.builder()
        .name("string")
        .resourceGroupId("string")
        .tags("string")
        .timeouts(ResourceGroupTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    resource_group_resource = ibm.ResourceGroup("resourceGroupResource",
        name="string",
        resource_group_id="string",
        tags=["string"],
        timeouts={
            "delete": "string",
        })
    
    const resourceGroupResource = new ibm.ResourceGroup("resourceGroupResource", {
        name: "string",
        resourceGroupId: "string",
        tags: ["string"],
        timeouts: {
            "delete": "string",
        },
    });
    
    type: ibm:ResourceGroup
    properties:
        name: string
        resourceGroupId: string
        tags:
            - string
        timeouts:
            delete: string
    

    ResourceGroup 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 ResourceGroup resource accepts the following input properties:

    Name string
    The name of the resource group.
    ResourceGroupId string
    (String) The unique identifier of the new resource group.
    Tags List<string>
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    Timeouts ResourceGroupTimeouts
    Name string
    The name of the resource group.
    ResourceGroupId string
    (String) The unique identifier of the new resource group.
    Tags []string
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    Timeouts ResourceGroupTimeoutsArgs
    name String
    The name of the resource group.
    resourceGroupId String
    (String) The unique identifier of the new resource group.
    tags List<String>
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ResourceGroupTimeouts
    name string
    The name of the resource group.
    resourceGroupId string
    (String) The unique identifier of the new resource group.
    tags string[]
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ResourceGroupTimeouts
    name str
    The name of the resource group.
    resource_group_id str
    (String) The unique identifier of the new resource group.
    tags Sequence[str]
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    timeouts ResourceGroupTimeoutsArgs
    name String
    The name of the resource group.
    resourceGroupId String
    (String) The unique identifier of the new resource group.
    tags List<String>
    Tags associated with the resource group instance. 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 ResourceGroup resource produces the following output properties:

    CreatedAt string
    (Timestamp) The date when the resource group initially created.
    Crn string
    (String) The full CRN associated with the resource group.
    Default bool
    (Bool) Specifies whether its default resource group or not.
    Id string
    The provider-assigned unique ID for this managed resource.
    PaymentMethodsUrl string
    (String) The URL to access the payment methods details that is associated with the resource group.
    QuotaId string
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    QuotaUrl string
    (String) The URL to access the quota details that is associated with the resource group.
    ResourceLinkages List<string>
    (String) An array of the resources that is linked to the resource group.
    State string
    (String) The state of the resource group.
    TeamsUrl string
    (String) The URL to access the team details that is associated with the resource group.
    UpdatedAt string
    (Timestamp) The date when the resource group last updated.
    CreatedAt string
    (Timestamp) The date when the resource group initially created.
    Crn string
    (String) The full CRN associated with the resource group.
    Default bool
    (Bool) Specifies whether its default resource group or not.
    Id string
    The provider-assigned unique ID for this managed resource.
    PaymentMethodsUrl string
    (String) The URL to access the payment methods details that is associated with the resource group.
    QuotaId string
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    QuotaUrl string
    (String) The URL to access the quota details that is associated with the resource group.
    ResourceLinkages []string
    (String) An array of the resources that is linked to the resource group.
    State string
    (String) The state of the resource group.
    TeamsUrl string
    (String) The URL to access the team details that is associated with the resource group.
    UpdatedAt string
    (Timestamp) The date when the resource group last updated.
    createdAt String
    (Timestamp) The date when the resource group initially created.
    crn String
    (String) The full CRN associated with the resource group.
    default_ Boolean
    (Bool) Specifies whether its default resource group or not.
    id String
    The provider-assigned unique ID for this managed resource.
    paymentMethodsUrl String
    (String) The URL to access the payment methods details that is associated with the resource group.
    quotaId String
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quotaUrl String
    (String) The URL to access the quota details that is associated with the resource group.
    resourceLinkages List<String>
    (String) An array of the resources that is linked to the resource group.
    state String
    (String) The state of the resource group.
    teamsUrl String
    (String) The URL to access the team details that is associated with the resource group.
    updatedAt String
    (Timestamp) The date when the resource group last updated.
    createdAt string
    (Timestamp) The date when the resource group initially created.
    crn string
    (String) The full CRN associated with the resource group.
    default boolean
    (Bool) Specifies whether its default resource group or not.
    id string
    The provider-assigned unique ID for this managed resource.
    paymentMethodsUrl string
    (String) The URL to access the payment methods details that is associated with the resource group.
    quotaId string
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quotaUrl string
    (String) The URL to access the quota details that is associated with the resource group.
    resourceLinkages string[]
    (String) An array of the resources that is linked to the resource group.
    state string
    (String) The state of the resource group.
    teamsUrl string
    (String) The URL to access the team details that is associated with the resource group.
    updatedAt string
    (Timestamp) The date when the resource group last updated.
    created_at str
    (Timestamp) The date when the resource group initially created.
    crn str
    (String) The full CRN associated with the resource group.
    default bool
    (Bool) Specifies whether its default resource group or not.
    id str
    The provider-assigned unique ID for this managed resource.
    payment_methods_url str
    (String) The URL to access the payment methods details that is associated with the resource group.
    quota_id str
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quota_url str
    (String) The URL to access the quota details that is associated with the resource group.
    resource_linkages Sequence[str]
    (String) An array of the resources that is linked to the resource group.
    state str
    (String) The state of the resource group.
    teams_url str
    (String) The URL to access the team details that is associated with the resource group.
    updated_at str
    (Timestamp) The date when the resource group last updated.
    createdAt String
    (Timestamp) The date when the resource group initially created.
    crn String
    (String) The full CRN associated with the resource group.
    default Boolean
    (Bool) Specifies whether its default resource group or not.
    id String
    The provider-assigned unique ID for this managed resource.
    paymentMethodsUrl String
    (String) The URL to access the payment methods details that is associated with the resource group.
    quotaId String
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quotaUrl String
    (String) The URL to access the quota details that is associated with the resource group.
    resourceLinkages List<String>
    (String) An array of the resources that is linked to the resource group.
    state String
    (String) The state of the resource group.
    teamsUrl String
    (String) The URL to access the team details that is associated with the resource group.
    updatedAt String
    (Timestamp) The date when the resource group last updated.

    Look up Existing ResourceGroup Resource

    Get an existing ResourceGroup 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?: ResourceGroupState, opts?: CustomResourceOptions): ResourceGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            crn: Optional[str] = None,
            default: Optional[bool] = None,
            name: Optional[str] = None,
            payment_methods_url: Optional[str] = None,
            quota_id: Optional[str] = None,
            quota_url: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            resource_linkages: Optional[Sequence[str]] = None,
            state: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            teams_url: Optional[str] = None,
            timeouts: Optional[ResourceGroupTimeoutsArgs] = None,
            updated_at: Optional[str] = None) -> ResourceGroup
    func GetResourceGroup(ctx *Context, name string, id IDInput, state *ResourceGroupState, opts ...ResourceOption) (*ResourceGroup, error)
    public static ResourceGroup Get(string name, Input<string> id, ResourceGroupState? state, CustomResourceOptions? opts = null)
    public static ResourceGroup get(String name, Output<String> id, ResourceGroupState state, CustomResourceOptions options)
    resources:  _:    type: ibm:ResourceGroup    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:
    CreatedAt string
    (Timestamp) The date when the resource group initially created.
    Crn string
    (String) The full CRN associated with the resource group.
    Default bool
    (Bool) Specifies whether its default resource group or not.
    Name string
    The name of the resource group.
    PaymentMethodsUrl string
    (String) The URL to access the payment methods details that is associated with the resource group.
    QuotaId string
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    QuotaUrl string
    (String) The URL to access the quota details that is associated with the resource group.
    ResourceGroupId string
    (String) The unique identifier of the new resource group.
    ResourceLinkages List<string>
    (String) An array of the resources that is linked to the resource group.
    State string
    (String) The state of the resource group.
    Tags List<string>
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    TeamsUrl string
    (String) The URL to access the team details that is associated with the resource group.
    Timeouts ResourceGroupTimeouts
    UpdatedAt string
    (Timestamp) The date when the resource group last updated.
    CreatedAt string
    (Timestamp) The date when the resource group initially created.
    Crn string
    (String) The full CRN associated with the resource group.
    Default bool
    (Bool) Specifies whether its default resource group or not.
    Name string
    The name of the resource group.
    PaymentMethodsUrl string
    (String) The URL to access the payment methods details that is associated with the resource group.
    QuotaId string
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    QuotaUrl string
    (String) The URL to access the quota details that is associated with the resource group.
    ResourceGroupId string
    (String) The unique identifier of the new resource group.
    ResourceLinkages []string
    (String) An array of the resources that is linked to the resource group.
    State string
    (String) The state of the resource group.
    Tags []string
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    TeamsUrl string
    (String) The URL to access the team details that is associated with the resource group.
    Timeouts ResourceGroupTimeoutsArgs
    UpdatedAt string
    (Timestamp) The date when the resource group last updated.
    createdAt String
    (Timestamp) The date when the resource group initially created.
    crn String
    (String) The full CRN associated with the resource group.
    default_ Boolean
    (Bool) Specifies whether its default resource group or not.
    name String
    The name of the resource group.
    paymentMethodsUrl String
    (String) The URL to access the payment methods details that is associated with the resource group.
    quotaId String
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quotaUrl String
    (String) The URL to access the quota details that is associated with the resource group.
    resourceGroupId String
    (String) The unique identifier of the new resource group.
    resourceLinkages List<String>
    (String) An array of the resources that is linked to the resource group.
    state String
    (String) The state of the resource group.
    tags List<String>
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    teamsUrl String
    (String) The URL to access the team details that is associated with the resource group.
    timeouts ResourceGroupTimeouts
    updatedAt String
    (Timestamp) The date when the resource group last updated.
    createdAt string
    (Timestamp) The date when the resource group initially created.
    crn string
    (String) The full CRN associated with the resource group.
    default boolean
    (Bool) Specifies whether its default resource group or not.
    name string
    The name of the resource group.
    paymentMethodsUrl string
    (String) The URL to access the payment methods details that is associated with the resource group.
    quotaId string
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quotaUrl string
    (String) The URL to access the quota details that is associated with the resource group.
    resourceGroupId string
    (String) The unique identifier of the new resource group.
    resourceLinkages string[]
    (String) An array of the resources that is linked to the resource group.
    state string
    (String) The state of the resource group.
    tags string[]
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    teamsUrl string
    (String) The URL to access the team details that is associated with the resource group.
    timeouts ResourceGroupTimeouts
    updatedAt string
    (Timestamp) The date when the resource group last updated.
    created_at str
    (Timestamp) The date when the resource group initially created.
    crn str
    (String) The full CRN associated with the resource group.
    default bool
    (Bool) Specifies whether its default resource group or not.
    name str
    The name of the resource group.
    payment_methods_url str
    (String) The URL to access the payment methods details that is associated with the resource group.
    quota_id str
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quota_url str
    (String) The URL to access the quota details that is associated with the resource group.
    resource_group_id str
    (String) The unique identifier of the new resource group.
    resource_linkages Sequence[str]
    (String) An array of the resources that is linked to the resource group.
    state str
    (String) The state of the resource group.
    tags Sequence[str]
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    teams_url str
    (String) The URL to access the team details that is associated with the resource group.
    timeouts ResourceGroupTimeoutsArgs
    updated_at str
    (Timestamp) The date when the resource group last updated.
    createdAt String
    (Timestamp) The date when the resource group initially created.
    crn String
    (String) The full CRN associated with the resource group.
    default Boolean
    (Bool) Specifies whether its default resource group or not.
    name String
    The name of the resource group.
    paymentMethodsUrl String
    (String) The URL to access the payment methods details that is associated with the resource group.
    quotaId String
    (String) An alpha-numeric value identifying the quota ID associated with the resource group.
    quotaUrl String
    (String) The URL to access the quota details that is associated with the resource group.
    resourceGroupId String
    (String) The unique identifier of the new resource group.
    resourceLinkages List<String>
    (String) An array of the resources that is linked to the resource group.
    state String
    (String) The state of the resource group.
    tags List<String>
    Tags associated with the resource group instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    teamsUrl String
    (String) The URL to access the team details that is associated with the resource group.
    timeouts Property Map
    updatedAt String
    (Timestamp) The date when the resource group last updated.

    Supporting Types

    ResourceGroupTimeouts, ResourceGroupTimeoutsArgs

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

    Import

    The ibm_resource_group can be imported by using resource group ID. The ibm_resource_group.example is the resource block name.

    Syntax

    $ pulumi import ibm:index/resourceGroup:ResourceGroup example <resource_group_ID>
    

    Example

    $ pulumi import ibm:index/resourceGroup:ResourceGroup example 5ffda12064634723b079acdb018ef308
    

    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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud