This module returns the ID for the name of a resource group. It can also create a group from a name and return the ID.
Create new Resource group:
module "resource_group" {
source = "terraform-ibm-modules/resource-group/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
resource_group_name = "new-resource-group"
}
Return ID of an existing Resource group:
module "resource_group" {
source = "terraform-ibm-modules/resource-group/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
existing_resource_group_name = "existing-resource-group"
}
You need the following permissions to run this module.
- Account Management
- All Account Management Services service
Administrator
platform access
- All Account Management Services service
Name | Version |
---|---|
terraform | >= 1.0.0 |
ibm | >= 1.49.0, < 2.0.0 |
No modules.
Name | Type |
---|---|
ibm_resource_group.resource_group | resource |
ibm_resource_group.existing_resource_group | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
existing_resource_group_name | Name of the existing resource group. Required if not creating new resource group | string |
null |
no |
resource_group_name | Name of the resource group to create. Required if not using existing resource group | string |
null |
no |
Name | Description |
---|---|
resource_group_id | Resource group ID |
resource_group_name | Resource group name |
You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.
To set up your local development environment, see Local development setup in the project documentation.