Skip to content

terraform-ibm-modules/terraform-ibm-resource-group

Repository files navigation

Resource group module

Stable (With quality checks) pre-commit latest release Renovate enabled semantic-release Catalog release

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.

Overview

terraform-ibm-resource-group

Usage

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"
}

Required IAM access policies

You need the following permissions to run this module.

  • Account Management
    • All Account Management Services service
      • Administrator platform access

Requirements

Name Version
terraform >= 1.0.0
ibm >= 1.49.0, < 2.0.0

Modules

No modules.

Resources

Name Type
ibm_resource_group.resource_group resource
ibm_resource_group.existing_resource_group data source

Inputs

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

Outputs

Name Description
resource_group_id Resource group ID
resource_group_name Resource group name

Contributing

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.