Skip to content

Commit 5805d87

Browse files
justin-patzerSunithaGudisagarIBM1
authored andcommitted
Add source units required parameter (IBM-Cloud#3991)
* Add source units required parameter * updated parameter name
1 parent 8cd4f98 commit 5805d87

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ibm/service/hpcs/resource_ibm_hpcs.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,10 @@ func ResourceIBMHPCS() *schema.Resource {
309309
}
310310

311311
type HPCSParams struct {
312-
Units int `json:"units,omitempty"`
313-
FailoverUnits int `json:"failover_units,omitempty"`
314-
ServiceEndpoints string `json:"allowed_network,omitempty"`
312+
Units int `json:"units,omitempty"`
313+
FailoverUnits int `json:"failover_units,omitempty"`
314+
RequiresRecoveryUnits bool `json:"requires_recovery_units,omitempty"`
315+
ServiceEndpoints string `json:"allowed_network,omitempty"`
315316
}
316317

317318
func ResourceIBMHPCSValidator() *validate.ResourceValidator {
@@ -411,6 +412,7 @@ func resourceIBMHPCSCreate(context context.Context, d *schema.ResourceData, meta
411412
if serviceEndpoint, ok := d.GetOk("service_endpoints"); ok {
412413
params.ServiceEndpoints = serviceEndpoint.(string)
413414
}
415+
params.RequiresRecoveryUnits = true
414416
// Convert HPCSParams srtuct to map
415417
parameters, _ := json.Marshal(params)
416418
var raw map[string]interface{}

0 commit comments

Comments
 (0)