Skip to content

Commit

Permalink
Marked customer_name field as optional for interconnect resource (#11640
Browse files Browse the repository at this point in the history
) (#19619)

[upstream:897375a351fcdea461ef1b8206c4bfc72d1223d7]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Sep 24, 2024
1 parent b8ca8c7 commit e60fd97
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .changelog/11640.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: marked `customer_name` and `location` fields as optional in `google_compute_interconnect` resource to support cross cloud interconnect
```
30 changes: 16 additions & 14 deletions google/services/compute/resource_compute_interconnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ func ResourceComputeInterconnect() *schema.Resource {
),

Schema: map[string]*schema.Schema{
"customer_name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `Customer name, to put in the Letter of Authorization as the party authorized to request a
crossconnect.`,
},
"interconnect_type": {
Type: schema.TypeString,
Required: true,
Expand All @@ -87,13 +80,6 @@ bundle, not the speed of the entire bundle. Can take one of the following values
- LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics.
- LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. Possible values: ["LINK_TYPE_ETHERNET_10G_LR", "LINK_TYPE_ETHERNET_100G_LR"]`,
},
"location": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName,
Description: `URL of the InterconnectLocation object that represents where this connection is to be provisioned.`,
},
"name": {
Type: schema.TypeString,
Required: true,
Expand All @@ -119,6 +105,14 @@ functional and can carry traffic. When set to false, no packets can be carried o
interconnect and no BGP routes are exchanged over it. By default, the status is set to true.`,
Default: true,
},
"customer_name": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Description: `Customer name, to put in the Letter of Authorization as the party authorized to request a
crossconnect. This field is required for Dedicated and Partner Interconnect, should not be specified
for cross-cloud interconnect.`,
},
"description": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -135,6 +129,14 @@ method. Each label key/value pair must comply with RFC1035. Label values may be
Please refer to the field 'effective_labels' for all of the labels present on the resource.`,
Elem: &schema.Schema{Type: schema.TypeString},
},
"location": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName,
Description: `URL of the InterconnectLocation object that represents where this connection is to be provisioned.
Specifies the location inside Google's Networks, should not be passed in case of cross-cloud interconnect.`,
},
"macsec": {
Type: schema.TypeList,
Optional: true,
Expand Down
20 changes: 11 additions & 9 deletions website/docs/r/compute_interconnect.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ The following arguments are supported:
character must be a lowercase letter, and all following characters must be a dash,
lowercase letter, or digit, except the last character, which cannot be a dash.

* `location` -
(Required)
URL of the InterconnectLocation object that represents where this connection is to be provisioned.

* `link_type` -
(Required)
Type of link requested. Note that this field indicates the speed of each of the links in the
Expand All @@ -82,11 +78,6 @@ The following arguments are supported:
- DEDICATED: A dedicated physical interconnection with the customer.
Possible values are: `DEDICATED`, `PARTNER`, `IT_PRIVATE`.

* `customer_name` -
(Required)
Customer name, to put in the Letter of Authorization as the party authorized to request a
crossconnect.


- - -

Expand All @@ -95,6 +86,11 @@ The following arguments are supported:
(Optional)
An optional description of this resource. Provide this property when you create the resource.

* `location` -
(Optional)
URL of the InterconnectLocation object that represents where this connection is to be provisioned.
Specifies the location inside Google's Networks, should not be passed in case of cross-cloud interconnect.

* `admin_enabled` -
(Optional)
Administrative status of the interconnect. When this is set to true, the Interconnect is
Expand All @@ -109,6 +105,12 @@ The following arguments are supported:
This field is required for users who sign up for Cloud Interconnect using workforce identity
federation.

* `customer_name` -
(Optional)
Customer name, to put in the Letter of Authorization as the party authorized to request a
crossconnect. This field is required for Dedicated and Partner Interconnect, should not be specified
for cross-cloud interconnect.

* `labels` -
(Optional)
Labels for this resource. These can only be added or modified by the setLabels
Expand Down

0 comments on commit e60fd97

Please sign in to comment.