Skip to content

Commit 0c2a858

Browse files
authored
prevent error from returning when no value is found in identity impor… (#15307)
1 parent d4949ab commit 0c2a858

File tree

1 file changed

+3
-3
lines changed
  • mmv1/third_party/terraform/tpgresource

1 file changed

+3
-3
lines changed

mmv1/third_party/terraform/tpgresource/import.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func ParseImportId(idRegexes []string, d TerraformResourceData, config *transpor
8989

9090
return nil
9191
} else if d.Id() == "" {
92-
if err := identityImport(re, identity, idFormat, d); err != nil {
92+
if err := identityImport(re, identity, d); err != nil {
9393
return err
9494
}
9595
err = setDefaultValues(idRegexes[0], identity, d, config)
@@ -102,7 +102,7 @@ func ParseImportId(idRegexes []string, d TerraformResourceData, config *transpor
102102
return fmt.Errorf("Import id %q doesn't match any of the accepted formats: %v", d.Id(), idRegexes)
103103
}
104104

105-
func identityImport(re *regexp.Regexp, identity *schema.IdentityData, idFormat string, d TerraformResourceData) error {
105+
func identityImport(re *regexp.Regexp, identity *schema.IdentityData, d TerraformResourceData) error {
106106
if identity == nil {
107107
return nil
108108
}
@@ -119,7 +119,7 @@ func identityImport(re *regexp.Regexp, identity *schema.IdentityData, idFormat s
119119
} else if group == "" {
120120
continue
121121
} else {
122-
return fmt.Errorf("[DEBUG] No value was found for %s during import", group)
122+
log.Printf("[DEBUG] No value was found for %s in identity import block", group)
123123
}
124124
}
125125

0 commit comments

Comments
 (0)