@@ -228,7 +228,6 @@ The only allowed value for now is "ALL_IPV4_RANGES".`,
228
228
"linked_vpc_network" : {
229
229
Type : schema .TypeList ,
230
230
Optional : true ,
231
- ForceNew : true ,
232
231
Description : `VPC network that is associated with the spoke.` ,
233
232
MaxItems : 1 ,
234
233
Elem : & schema.Resource {
@@ -626,6 +625,12 @@ func resourceNetworkConnectivitySpokeUpdate(d *schema.ResourceData, meta interfa
626
625
} else if v , ok := d .GetOkExists ("linked_router_appliance_instances" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , linkedRouterApplianceInstancesProp )) {
627
626
obj ["linkedRouterApplianceInstances" ] = linkedRouterApplianceInstancesProp
628
627
}
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
+ }
629
634
labelsProp , err := expandNetworkConnectivitySpokeEffectiveLabels (d .Get ("effective_labels" ), d , config )
630
635
if err != nil {
631
636
return err
@@ -659,6 +664,11 @@ func resourceNetworkConnectivitySpokeUpdate(d *schema.ResourceData, meta interfa
659
664
"linkedRouterApplianceInstances.includeImportRanges" )
660
665
}
661
666
667
+ if d .HasChange ("linked_vpc_network" ) {
668
+ updateMask = append (updateMask , "linkedVpcNetwork.excludeExportRanges" ,
669
+ "linkedVpcNetwork.includeExportRanges" )
670
+ }
671
+
662
672
if d .HasChange ("effective_labels" ) {
663
673
updateMask = append (updateMask , "labels" )
664
674
}
0 commit comments