@@ -228,7 +228,6 @@ The only allowed value for now is "ALL_IPV4_RANGES".`,
228228 "linked_vpc_network" : {
229229 Type : schema .TypeList ,
230230 Optional : true ,
231- ForceNew : true ,
232231 Description : `VPC network that is associated with the spoke.` ,
233232 MaxItems : 1 ,
234233 Elem : & schema.Resource {
@@ -626,6 +625,12 @@ func resourceNetworkConnectivitySpokeUpdate(d *schema.ResourceData, meta interfa
626625 } else if v , ok := d .GetOkExists ("linked_router_appliance_instances" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , linkedRouterApplianceInstancesProp )) {
627626 obj ["linkedRouterApplianceInstances" ] = linkedRouterApplianceInstancesProp
628627 }
628+ linkedVpcNetworkProp , err := expandNetworkConnectivitySpokeLinkedVpcNetwork (d .Get ("linked_vpc_network" ), d , config )
629+ if err != nil {
630+ return err
631+ } else if v , ok := d .GetOkExists ("linked_vpc_network" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , linkedVpcNetworkProp )) {
632+ obj ["linkedVpcNetwork" ] = linkedVpcNetworkProp
633+ }
629634 labelsProp , err := expandNetworkConnectivitySpokeEffectiveLabels (d .Get ("effective_labels" ), d , config )
630635 if err != nil {
631636 return err
@@ -659,6 +664,11 @@ func resourceNetworkConnectivitySpokeUpdate(d *schema.ResourceData, meta interfa
659664 "linkedRouterApplianceInstances.includeImportRanges" )
660665 }
661666
667+ if d .HasChange ("linked_vpc_network" ) {
668+ updateMask = append (updateMask , "linkedVpcNetwork.excludeExportRanges" ,
669+ "linkedVpcNetwork.includeExportRanges" )
670+ }
671+
662672 if d .HasChange ("effective_labels" ) {
663673 updateMask = append (updateMask , "labels" )
664674 }
0 commit comments