Skip to content

Commit

Permalink
fix resource
Browse files Browse the repository at this point in the history
  • Loading branch information
treywelsh committed Oct 11, 2023
1 parent 5527d93 commit b4e93ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opennebula/resource_opennebula_marketplace_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func resourceOpennebulaMarketPlaceAppCreate(ctx context.Context, d *schema.Resou
appID, creationErr := controller.MarketPlaceApps().Create(tpl.String(), marketID)

if appID != -1 {
d.SetId(fmt.Sprintf("%v", appID))
d.SetId(fmt.Sprintf("%s", appID))
} else {
// In case of an error, before returning, retrieve the appliance from the pool via the temporary ID added just above
appPool, err := controller.MarketPlaceApps().Info()
Expand All @@ -246,7 +246,7 @@ func resourceOpennebulaMarketPlaceAppCreate(ctx context.Context, d *schema.Resou
pairingID, _ := app.Template.GetStr(marketAppPairingKey)

if pairingID == tmpProviderID {
d.SetId(fmt.Sprintf("%v", app.ID))
d.SetId(fmt.Sprintf("%d", app.ID))
break
}
}
Expand Down

0 comments on commit b4e93ab

Please sign in to comment.