Skip to content

Commit

Permalink
division ref export (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMoyles authored Sep 12, 2024
1 parent 48c1680 commit ee11146
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ func readRespManagementRespAsset(ctx context.Context, d *schema.ResourceData, me
return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("failed to read response asset %s | error: %s", d.Id(), getErr), resp))
}

d.Set("filename", *sdkAsset.Name)
_ = d.Set("filename", *sdkAsset.Name)

if sdkAsset.Division != nil && sdkAsset.Division.Id != nil {
d.Set("division_id", *sdkAsset.Division.Id)
_ = d.Set("division_id", *sdkAsset.Division.Id)
}

log.Printf("Read Responsemanagement response asset %s %s", d.Id(), *sdkAsset.Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func DataSourceResponseManagementResponseAsset() *schema.Resource {
func ExporterResponseManagementResponseAsset() *resourceExporter.ResourceExporter {
return &resourceExporter.ResourceExporter{
GetResourcesFunc: provider.GetAllWithPooledClient(getAllResponseAssets),
RefAttrs: map[string]*resourceExporter.RefAttrSettings{
"division_id": {RefType: "genesyscloud_auth_division"},
},
CustomFileWriter: resourceExporter.CustomFileWriterSettings{
RetrieveAndWriteFilesFunc: responsemanagementResponseassetResolver,
SubDirectory: "response_assets",
Expand Down

0 comments on commit ee11146

Please sign in to comment.