Skip to content

Commit

Permalink
Allow for import format of only numbers in iam folder (#2744)
Browse files Browse the repository at this point in the history
Merged PR #2744.
  • Loading branch information
slevenick authored and modular-magician committed Nov 22, 2019
1 parent 15dc4d1 commit d4716f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
3 changes: 3 additions & 0 deletions third_party/terraform/utils/iam_folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func NewFolderIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpd
}

func FolderIdParseFunc(d *schema.ResourceData, _ *Config) error {
if !strings.HasPrefix(d.Id(), "folders/") {
d.SetId(fmt.Sprintf("folders/%s", d.Id()))
}
d.Set("folder", d.Id())
return nil
}
Expand Down

0 comments on commit d4716f7

Please sign in to comment.