https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager-secret-group
Creates a secret group in an IBM Cloud Secrets Manager instance.
https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager-secret-group
core-team graduated ibm-cloud secret-group secret-manager supported terraform terraform-module
Last synced: about 2 months ago
JSON representation
Creates a secret group in an IBM Cloud Secrets Manager instance.
- Host: GitHub
- URL: https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager-secret-group
- Owner: terraform-ibm-modules
- License: apache-2.0
- Created: 2023-07-13T08:59:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-22T22:41:01.000Z (5 months ago)
- Last Synced: 2024-12-26T15:04:09.034Z (5 months ago)
- Topics: core-team, graduated, ibm-cloud, secret-group, secret-manager, supported, terraform, terraform-module
- Language: Go
- Size: 412 KB
- Stars: 0
- Watchers: 16
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Secrets Manager secret group module
[-brightgreen)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager-secret-group/releases/latest)
[](https://renovatebot.com/)
[](https://github.com/semantic-release/semantic-release)
[](https://cloud.ibm.com/catalog/modules/terraform-ibm-secrets-manager-secret-group-ef8cddd2-e724-43d3-88f8-386af4f12c49-global)This module creates a secret group in an IBM Cloud Secrets Manager instance. For more information, see [Best practices for organizing secrets and assigning access](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-best-practices-organize-secrets#best-practices-secret-groups).

## Usage
```hcl
provider "ibm" {
ibmcloud_api_key = "XXXXXXXXXX"
region = "us-south"
}module "sm_secret_group_module" {
source = "terraform-ibm-modules/secrets-manager-secret-group/ibm"
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
region = "us-south"
secrets_manager_guid = "79c6dxxx-xxxx-xxxx-xxxx-xxxxXX38667"
secret_group_name = "example-group"
secret_group_description = "secret group description"
}
```## Required IAM access policies
You need the following permissions to run this module.- Account Management
- **Resource Group** service
- `Viewer` platform access
- IAM Services
- **Secrets Manager** service
- `Editor` platform access
- `Manager` service access### Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.9.0 |
| [ibm](#requirement\_ibm) | >= 1.76.0, <2.0.0 |### Modules
| Name | Source | Version |
|------|--------|---------|
| [iam\_access\_groups](#module\_iam\_access\_groups) | terraform-ibm-modules/iam-access-group/ibm | 1.4.6 |### Resources
| Name | Type |
|------|------|
| [ibm_sm_secret_group.secret_group](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/sm_secret_group) | resource |### Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [access\_group\_name](#input\_access\_group\_name) | Name of the access group to create. If null is passed, the name will be set as '{secret\_group\_name}-access-group' | `string` | `null` | no |
| [access\_group\_roles](#input\_access\_group\_roles) | Roles to be given to the created access group. | `list(string)` | `null` | no |
| [access\_group\_tags](#input\_access\_group\_tags) | Tags that should be applied to the access group. Only applies if create\_access\_group is true. | `list(string)` | `[]` | no |
| [create\_access\_group](#input\_create\_access\_group) | Whether to create an access group for the secrets group. | `bool` | `false` | no |
| [endpoint\_type](#input\_endpoint\_type) | The service endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private` | `string` | `"public"` | no |
| [region](#input\_region) | Region which the Secret Manager is deployed. | `string` | n/a | yes |
| [secret\_group\_description](#input\_secret\_group\_description) | Description of the Secret Group to be created. | `string` | n/a | yes |
| [secret\_group\_name](#input\_secret\_group\_name) | Name of the Secret Group to be created. | `string` | n/a | yes |
| [secrets\_manager\_guid](#input\_secrets\_manager\_guid) | Instance ID of Secrets Manager instance in which the Secret will be added. | `string` | n/a | yes |### Outputs
| Name | Description |
|------|-------------|
| [secret\_group\_id](#output\_secret\_group\_id) | ID of the created Secret Group |## Examples
- [ Basic example](examples/basic)
- [ Private-Only Secret Manager example](examples/private)## 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](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).
To set up your local development environment, see [Local development setup](https://terraform-ibm-modules.github.io/documentation/#/local-dev-setup) in the project documentation.