@@ -213,10 +213,18 @@ func resourceCloudAccountVsphereRead(_ context.Context, d *schema.ResourceData,
213213}
214214
215215func resourceCloudAccountVsphereUpdate (ctx context.Context , d * schema.ResourceData , m interface {}) diag.Diagnostics {
216+ var associatedCloudAccountIDs []string
216217 var regions []* models.RegionSpecification
217218
218219 apiClient := m .(* Client ).apiClient
219220
221+ if v , ok := d .GetOk ("associated_cloud_account_ids" ); ok {
222+ if ! compareUnique (v .(* schema.Set ).List ()) {
223+ return diag .FromErr (errors .New ("specified associated cloud account ids are not unique" ))
224+ }
225+ associatedCloudAccountIDs = expandStringList (v .(* schema.Set ).List ())
226+ }
227+
220228 if v , ok := d .GetOk ("regions" ); ok {
221229 if ! compareUnique (v .(* schema.Set ).List ()) {
222230 return diag .FromErr (errors .New ("specified regions are not unique" ))
@@ -230,14 +238,16 @@ func resourceCloudAccountVsphereUpdate(ctx context.Context, d *schema.ResourceDa
230238 WithAPIVersion (IaaSAPIVersion ).
231239 WithID (id ).
232240 WithBody (& models.UpdateCloudAccountVsphereSpecification {
233- CreateDefaultZones : false ,
234- Description : d .Get ("description" ).(string ),
235- HostName : withString (d .Get ("hostname" ).(string )),
236- Name : d .Get ("name" ).(string ),
237- Password : d .Get ("password" ).(string ),
238- Regions : regions ,
239- Tags : expandTags (d .Get ("tags" ).(* schema.Set ).List ()),
240- Username : d .Get ("username" ).(string ),
241+ AcceptSelfSignedCertificate : d .Get ("accept_self_signed_cert" ).(bool ),
242+ AssociatedCloudAccountIds : associatedCloudAccountIDs ,
243+ CreateDefaultZones : false ,
244+ Description : d .Get ("description" ).(string ),
245+ HostName : withString (d .Get ("hostname" ).(string )),
246+ Name : d .Get ("name" ).(string ),
247+ Password : d .Get ("password" ).(string ),
248+ Regions : regions ,
249+ Tags : expandTags (d .Get ("tags" ).(* schema.Set ).List ()),
250+ Username : d .Get ("username" ).(string ),
241251 }))
242252 if err != nil {
243253 return diag .FromErr (err )
0 commit comments