Skip to content

Commit

Permalink
migration updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwal-ibm committed Dec 20, 2023
1 parent 6c1a940 commit 977ce3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ replace github.com/dgrijalva/jwt-go v3.2.0+incompatible => github.com/golang-jwt

replace github.com/portworx/sched-ops v0.0.0-20200831185134-3e8010dc7056 => github.com/portworx/sched-ops v0.20.4-openstorage-rc3 // required by rook v1.7

replace github.com/IBM/vpc-go-sdk v0.45.0 => ./common/github.com/IBM/vpc-go-sdk
replace github.com/IBM/vpc-go-sdk v0.46.0 => ./common/github.com/IBM/vpc-go-sdk

exclude (
github.com/kubernetes-incubator/external-storage v0.20.4-openstorage-rc2
Expand Down
11 changes: 6 additions & 5 deletions ibm/service/vpc/resource_ibm_is_bare_metal_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ func resourceIBMISBareMetalServerCreate(context context.Context, d *schema.Resou
if err != nil {
return diag.FromErr(err)
}
options := &vpcv1.CreateBareMetalServerOptions{}
createbmsoptions := &vpcv1.CreateBareMetalServerOptions{}
options := &vpcv1.BareMetalServerPrototype{}
var imageStr string
if image, ok := d.GetOk(isBareMetalServerImage); ok {
imageStr = image.(string)
Expand All @@ -705,7 +706,7 @@ func resourceIBMISBareMetalServerCreate(context context.Context, d *schema.Resou
// enable secure boot

if _, ok := d.GetOkExists(isBareMetalServerEnableSecureBoot); ok {
options.SetEnableSecureBoot(d.Get(isBareMetalServerEnableSecureBoot).(bool))
options.EnableSecureBoot = core.BoolPtr(d.Get(isBareMetalServerEnableSecureBoot).(bool))
}

// trusted_platform_module
Expand All @@ -715,7 +716,7 @@ func resourceIBMISBareMetalServerCreate(context context.Context, d *schema.Resou
if err != nil {
return diag.FromErr(err)
}
options.SetTrustedPlatformModule(trustedPlatformModuleModel)
options.TrustedPlatformModule = trustedPlatformModuleModel
}

keySet := d.Get(isBareMetalServerKeys).(*schema.Set)
Expand Down Expand Up @@ -1300,8 +1301,8 @@ func resourceIBMISBareMetalServerCreate(context context.Context, d *schema.Resou
ID: &vpc,
}
}

bms, response, err := sess.CreateBareMetalServerWithContext(context, options)
createbmsoptions.BareMetalServerPrototype = options
bms, response, err := sess.CreateBareMetalServerWithContext(context, createbmsoptions)
if err != nil {
return diag.FromErr(fmt.Errorf("[DEBUG] Create bare metal server err %s\n%s", err, response))
}
Expand Down

0 comments on commit 977ce3a

Please sign in to comment.