Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tewartr committed Oct 15, 2024
1 parent b0450ba commit 304bd09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions mmv1/products/essentialcontacts/Contact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ timeouts:
update_minutes: 20
delete_minutes: 20
custom_code:
post_import: 'templates/terraform/post_import/essential_contacts_contact.go.tmpl'
examples:
- name: 'essential_contact'
primary_resource_id: 'contact'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Split resource name into tokens
nameTokens := strings.SplitAfterN(d.Id(), "/", 3)

if err := d.Set("parent", nameTokens[0]+strings.Trim(nameTokens[1], "/")); err != nil {
return nil, fmt.Errorf("error getting parent for the contact : %s", err)
}

0 comments on commit 304bd09

Please sign in to comment.