ibm.ResourceGroup
Explore with Pulumi AI
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.
- Resource
Group stringId - (String) The unique identifier of the new resource group.
- 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
Resource
Group Timeouts
- Name string
- The name of the resource group.
- Resource
Group stringId - (String) The unique identifier of the new resource group.
- []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
Resource
Group Timeouts Args
- name String
- The name of the resource group.
- resource
Group StringId - (String) The unique identifier of the new resource group.
- 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
Resource
Group Timeouts
- name string
- The name of the resource group.
- resource
Group stringId - (String) The unique identifier of the new resource group.
- 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
Resource
Group Timeouts
- name str
- The name of the resource group.
- resource_
group_ strid - (String) The unique identifier of the new resource group.
- 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
Resource
Group Timeouts Args
- name String
- The name of the resource group.
- resource
Group StringId - (String) The unique identifier of the new resource group.
- 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:
- Created
At 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.
- Payment
Methods stringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- Quota
Id string - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- Quota
Url string - (String) The URL to access the quota details that is associated with the resource group.
- Resource
Linkages List<string> - (String) An array of the resources that is linked to the resource group.
- State string
- (String) The state of the resource group.
- Teams
Url string - (String) The URL to access the team details that is associated with the resource group.
- Updated
At string - (Timestamp) The date when the resource group last updated.
- Created
At 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.
- Payment
Methods stringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- Quota
Id string - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- Quota
Url string - (String) The URL to access the quota details that is associated with the resource group.
- Resource
Linkages []string - (String) An array of the resources that is linked to the resource group.
- State string
- (String) The state of the resource group.
- Teams
Url string - (String) The URL to access the team details that is associated with the resource group.
- Updated
At string - (Timestamp) The date when the resource group last updated.
- created
At 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.
- payment
Methods StringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- quota
Id String - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- quota
Url String - (String) The URL to access the quota details that is associated with the resource group.
- resource
Linkages List<String> - (String) An array of the resources that is linked to the resource group.
- state String
- (String) The state of the resource group.
- teams
Url String - (String) The URL to access the team details that is associated with the resource group.
- updated
At String - (Timestamp) The date when the resource group last updated.
- created
At 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.
- payment
Methods stringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- quota
Id string - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- quota
Url string - (String) The URL to access the quota details that is associated with the resource group.
- resource
Linkages string[] - (String) An array of the resources that is linked to the resource group.
- state string
- (String) The state of the resource group.
- teams
Url string - (String) The URL to access the team details that is associated with the resource group.
- updated
At 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_ strurl - (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.
- created
At 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.
- payment
Methods StringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- quota
Id String - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- quota
Url String - (String) The URL to access the quota details that is associated with the resource group.
- resource
Linkages List<String> - (String) An array of the resources that is linked to the resource group.
- state String
- (String) The state of the resource group.
- teams
Url String - (String) The URL to access the team details that is associated with the resource group.
- updated
At 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.
- Created
At 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.
- Payment
Methods stringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- Quota
Id string - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- Quota
Url string - (String) The URL to access the quota details that is associated with the resource group.
- Resource
Group stringId - (String) The unique identifier of the new resource group.
- Resource
Linkages List<string> - (String) An array of the resources that is linked to the resource group.
- State string
- (String) The state of the resource group.
- 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.
- Teams
Url string - (String) The URL to access the team details that is associated with the resource group.
- Timeouts
Resource
Group Timeouts - Updated
At string - (Timestamp) The date when the resource group last updated.
- Created
At 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.
- Payment
Methods stringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- Quota
Id string - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- Quota
Url string - (String) The URL to access the quota details that is associated with the resource group.
- Resource
Group stringId - (String) The unique identifier of the new resource group.
- Resource
Linkages []string - (String) An array of the resources that is linked to the resource group.
- State string
- (String) The state of the resource group.
- []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.
- Teams
Url string - (String) The URL to access the team details that is associated with the resource group.
- Timeouts
Resource
Group Timeouts Args - Updated
At string - (Timestamp) The date when the resource group last updated.
- created
At 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.
- payment
Methods StringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- quota
Id String - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- quota
Url String - (String) The URL to access the quota details that is associated with the resource group.
- resource
Group StringId - (String) The unique identifier of the new resource group.
- resource
Linkages List<String> - (String) An array of the resources that is linked to the resource group.
- state String
- (String) The state of the resource group.
- 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.
- teams
Url String - (String) The URL to access the team details that is associated with the resource group.
- timeouts
Resource
Group Timeouts - updated
At String - (Timestamp) The date when the resource group last updated.
- created
At 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.
- payment
Methods stringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- quota
Id string - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- quota
Url string - (String) The URL to access the quota details that is associated with the resource group.
- resource
Group stringId - (String) The unique identifier of the new resource group.
- resource
Linkages string[] - (String) An array of the resources that is linked to the resource group.
- state string
- (String) The state of the resource group.
- 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.
- teams
Url string - (String) The URL to access the team details that is associated with the resource group.
- timeouts
Resource
Group Timeouts - updated
At 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_ strurl - (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_ strid - (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.
- 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
Resource
Group Timeouts Args - updated_
at str - (Timestamp) The date when the resource group last updated.
- created
At 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.
- payment
Methods StringUrl - (String) The URL to access the payment methods details that is associated with the resource group.
- quota
Id String - (String) An alpha-numeric value identifying the quota ID associated with the resource group.
- quota
Url String - (String) The URL to access the quota details that is associated with the resource group.
- resource
Group StringId - (String) The unique identifier of the new resource group.
- resource
Linkages List<String> - (String) An array of the resources that is linked to the resource group.
- state String
- (String) The state of the resource group.
- 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.
- teams
Url String - (String) The URL to access the team details that is associated with the resource group.
- timeouts Property Map
- updated
At 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.