From aee835167dda00d5b75751b98b159c34ad73e049 Mon Sep 17 00:00:00 2001 From: FUJIWARA Shunichiro Date: Fri, 27 May 2022 23:32:13 +0900 Subject: [PATCH] fix lookup to azurerm subdir. fixes #42 --- tfstate/lookup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfstate/lookup.go b/tfstate/lookup.go index c0ea832..989ed25 100644 --- a/tfstate/lookup.go +++ b/tfstate/lookup.go @@ -175,7 +175,7 @@ func ReadURL(loc string) (*TFState, error) { key := strings.TrimPrefix(u.Path, "/") src, err = readGCS(u.Host, key, "") case "azurerm": - split := strings.Split(u.Path, "/") + split := strings.SplitN(u.Path, "/", 4) src, err = readAzureRM(u.Host, split[1], split[2], split[3], azureRMOption{}) case "file": src, err = os.Open(u.Path)