Fixes #1624 - issues with consecutive whitespace. (#1625)

This commit is contained in:
Olve S. Hansen 2018-06-08 18:37:29 +02:00 committed by Vincent Roseberry
parent 7401b46784
commit d605e0f170
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ func iamBindingImport(resourceIdParser resourceIdParserFunc) schema.StateFunc {
return nil, errors.New("Import not supported for this IAM resource.")
}
config := m.(*Config)
s := strings.Split(d.Id(), " ")
s := strings.Fields(d.Id())
if len(s) != 2 {
d.SetId("")
return nil, fmt.Errorf("Wrong number of parts to Binding id %s; expected 'resource_name role'.", s)

View File

@ -33,7 +33,7 @@ func iamMemberImport(resourceIdParser resourceIdParserFunc) schema.StateFunc {
return nil, errors.New("Import not supported for this IAM resource.")
}
config := m.(*Config)
s := strings.Split(d.Id(), " ")
s := strings.Fields(d.Id())
if len(s) != 3 {
d.SetId("")
return nil, fmt.Errorf("Wrong number of parts to Member id %s; expected 'resource_name role username'.", s)