PROBLEM SUMMARY
the code here raises slice bounds out of range [:-1] error when the SAN_URI doesn't contain ):// - because missing ):// makes index=-1, which isn't valid for val[1:index]. For our use case, the value for URI (SAN) in the issue_template is .*
STEPS TO REPRODUCE
- set the Terraform with
csr_origin = "service"
- set URI (SAN) in the issue_template with
.*
resource "venafi_certificate" "mdc_server" {
common_name = "test.test1.com"
san_dns = [
"test.test1.com",
"test.test2.com",
"test.test3.com"
]
algorithm = "RSA"
rsa_bits = "2048"
valid_days = "15"
organization = "mycompany"
country = "US"
state = "New York"
locality = "New York"
csr_origin = "service"
key_password = "_123456TdafdsadasdesR!"
}
The below error pops up:

COMMENTS/WORKAROUNDS
Disabling URI (SAN) is a workaround
