Skip to content

Commit

Permalink
Fix subnetwork with DiffSuppressFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Prete committed Nov 17, 2022
1 parent e472555 commit 1c8e719
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,14 @@ func resourceComputeRouterInterface() *schema.Resource {
Description: `The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance. Changing this forces a new interface to be created.`,
},
"subnetwork": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
AtLeastOneOf: []string{"ip_range", "interconnect_attachment", "subnetwork", "vpn_tunnel"},
ConflictsWith: []string{"interconnect_attachment", "vpn_tunnel"},
Description: `The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. Changing this forces a new interface to be created. Only one of subnetwork, interconnect_attachment or vpn_tunnel can be specified.`,
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
AtLeastOneOf: []string{"ip_range", "interconnect_attachment", "subnetwork", "vpn_tunnel"},
ConflictsWith: []string{"interconnect_attachment", "vpn_tunnel"},
Description: `The URI of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. Changing this forces a new interface to be created. Only one of subnetwork, interconnect_attachment or vpn_tunnel can be specified.`,
},
"project": {
Type: schema.TypeString,
Expand Down

0 comments on commit 1c8e719

Please sign in to comment.