Skip to content

Commit

Permalink
Fixes hashicorp#1624 - issues with consecutive whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Olve S. Hansen committed Jun 8, 2018
1 parent dd92a37 commit 189c9f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/resource_iam_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion google/resource_iam_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 189c9f9

Please sign in to comment.