diff --git a/teller-providers/src/providers/hashicorp_vault.rs b/teller-providers/src/providers/hashicorp_vault.rs index 6de3a68e..c64f072c 100644 --- a/teller-providers/src/providers/hashicorp_vault.rs +++ b/teller-providers/src/providers/hashicorp_vault.rs @@ -89,11 +89,14 @@ impl Hashivault { fn parse_path(pm: &PathMap) -> Result<(&str, &str, &str)> { let (engine, full_path) = (pm.protocol.as_deref().unwrap_or("kv2"), pm.path.as_str()); - let (mount, path) = full_path.split_once('/').ok_or_else(|| { - Error::Message( - "path must have initial mount seperated by '/', e.g. `secret/foo`".to_string(), - ) - })?; + let (mount, path) = full_path + .split_once("://") + .or_else(|| full_path.split_once('/')) + .ok_or_else(|| { + Error::Message( + "path must have initial mount seperated by '/', e.g. `secret/foo`".to_string(), + ) + })?; Ok((engine, mount, path)) }