Skip to content

feat: add DA prefix doc #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ You can see the published documentation at https://terraform-ibm-modules.github.
- Maintaining the GitHub project
- [Maintainers contribution process](https://terraform-ibm-modules.github.io/documentation/#/maintain-module.md)
- [About merging pull requests](https://terraform-ibm-modules.github.io/documentation/#/merging.md)
- Deployable Architecture Reference Docs
- [Prefix Usage Guide](https://terraform-ibm-modules.github.io/documentation/#/DA-prefix.md)
- Reference
- [Module authoring guidelines](https://terraform-ibm-modules.github.io/documentation/#/implementation-guidelines.md)
- [Design guidelines](https://terraform-ibm-modules.github.io/documentation/#/design-guidelines.md)
Expand Down
38 changes: 38 additions & 0 deletions docs/DA-prefix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Prefix in Deployable Architecture

The **`prefix`** input variable allows you to prepend a custom string to the names of all resources created by this automation. This is especially useful for:

- **Avoiding naming collisions** when deploying the same solution multiple times within the same account.
- **Creating identical infrastructure** across multiple regions or environments.
- **Improving resource traceability** by embedding environment or region identifiers into resource names.

If you do not wish to use a prefix, you may set the value to `null` or an empty string (`""`).

**Important**: The automation automatically inserts a hyphen between the prefix and the resource name. Therefore, you do not need to include a hyphen in the prefix yourself.

### Examples

Here are some common patterns for using the prefix:

- **Environment-based**:
- `dev`, `test`, `prod`
- **Environment + Region**:
- `dev-eu-gb`, `prod-us-south`, `test-jp-tok`
- **Project-specific**:
- `webapp-dev`, `ml-prod`, `iot-test`
- **Team or department identifiers**:
- `fin-dev`, `hr-prod`, `eng-test`
- **Date or version-based** (for temporary or experimental deployments):
- `exp-202505`, `v2-dev`

These conventions help ensure that resources are clearly grouped and easily identifiable, especially in shared or multi-tenant accounts.

### Naming Rules

To ensure compatibility and consistency, the prefix must follow these rules:

- Must begin with a **lowercase letter**
- May contain only **lowercase letters**, **digits**, and **hyphens (`-`)**
- Must **not end** with a hyphen (`-`)
- Must **not contain consecutive hyphens** (`--`)
- Maximum length: **16 characters**