@@ -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 }
@@ -116,8 +116,10 @@ func identityImport(re *regexp.Regexp, identity *schema.IdentityData, idFormat s
116116 if identityValue , identityExists := identity .GetOk (group ); identityExists && group != "" {
117117 log .Printf ("[DEBUG] identity Importing %s = %s" , group , identityValue )
118118 d .Set (group , identityValue )
119+ } else if group == "" {
120+ continue
119121 } else {
120- 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 )
121123 }
122124 }
123125
0 commit comments