Skip to content

Commit e2713d5

Browse files
Remove input for interconnect bandwidth (#4205) (#2698)
Signed-off-by: Modular Magician <[email protected]>
1 parent b4e69b3 commit e2713d5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changelog/4205.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
compute: added update support for `google_compute_interconnect_attachment` `bandwidth` field
3+
```

google-beta/resource_compute_interconnect_attachment.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ PARTNER type this will Pre-Activate the interconnect attachment`,
9696
Type: schema.TypeString,
9797
Computed: true,
9898
Optional: true,
99-
ForceNew: true,
10099
ValidateFunc: validation.StringInSlice([]string{"BPS_50M", "BPS_100M", "BPS_200M", "BPS_300M", "BPS_400M", "BPS_500M", "BPS_1G", "BPS_2G", "BPS_5G", "BPS_10G", "BPS_20G", "BPS_50G", ""}, false),
101100
Description: `Provisioned bandwidth capacity for the interconnect attachment.
102101
For attachments of type DEDICATED, the user can set the bandwidth.
@@ -489,6 +488,12 @@ func resourceComputeInterconnectAttachmentUpdate(d *schema.ResourceData, meta in
489488
} else if v, ok := d.GetOkExists("description"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) {
490489
obj["description"] = descriptionProp
491490
}
491+
bandwidthProp, err := expandComputeInterconnectAttachmentBandwidth(d.Get("bandwidth"), d, config)
492+
if err != nil {
493+
return err
494+
} else if v, ok := d.GetOkExists("bandwidth"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, bandwidthProp)) {
495+
obj["bandwidth"] = bandwidthProp
496+
}
492497
regionProp, err := expandComputeInterconnectAttachmentRegion(d.Get("region"), d, config)
493498
if err != nil {
494499
return err

0 commit comments

Comments
 (0)