in types/azurerm_resource.go [134:147]
func (r *AzurermResource) OldAddress(index interface{}) string {
oldAddress := fmt.Sprintf("%s.%s", r.OldResourceType, r.OldLabel)
if index == nil {
return oldAddress
}
switch i := index.(type) {
case int, int32, int64, float32, float64:
return fmt.Sprintf(`%s[%v]`, oldAddress, i)
case string:
return fmt.Sprintf(`%s["%s"]`, oldAddress, i)
default:
return oldAddress
}
}