cloud-native-toolkit / cloud-native-toolkit/software-everywhere
Portworx bad volume name in IBM-portworx module
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
When shortening volume names, they sometimes end with a `-` character, depending on the length of the prefix. When this happens the module fails with an error like this:
```
Error: "name" ("3-pwx-kube-c9fj1nnw0d0i0q7og6d0-masdev2-default-00000c0c") should match regexp ^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$
│
│ with module.ibm-portworx.ibm_is_volume.volume[3],
│ on .terraform/modules/ibm-portworx/main.tf line 67, in resource "ibm_is_volume" "volume":
│ 67: name = substr("${replace(var.name_prefix, "_", "-")}${length(var.name_prefix) > 0 ? "-" : ""}${count.index}-pwx-${var.workers[count.index].id}", 0, 61)
private channel
length of 61 characters for volume name
│
╵
```
We need to make sure that the generated name does *NOT* end with a dash (`-`).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.