@@ -154,11 +154,9 @@ domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.`,
154
154
Description : `Indicates the user-supplied encryption option of this interconnect
155
155
attachment. Can only be specified at attachment creation for PARTNER or
156
156
DEDICATED attachments.
157
-
158
157
* NONE - This is the default value, which means that the VLAN attachment
159
158
carries unencrypted traffic. VMs are able to send traffic to, or receive
160
159
traffic from, such a VLAN attachment.
161
-
162
160
* IPSEC - The VLAN attachment carries only encrypted traffic that is
163
161
encrypted by an IPsec device, such as an HA VPN gateway or third-party
164
162
IPsec VPN. VMs cannot directly send traffic to, or receive traffic from,
@@ -182,17 +180,14 @@ be set if type is PARTNER.`,
182
180
Description : `URL of addresses that have been reserved for the interconnect attachment,
183
181
Used only for interconnect attachment that has the encryption option as
184
182
IPSEC.
185
-
186
183
The addresses must be RFC 1918 IP address ranges. When creating HA VPN
187
184
gateway over the interconnect attachment, if the attachment is configured
188
185
to use an RFC 1918 IP address, then the VPN gateway's IP address will be
189
186
allocated from the IP address range specified here.
190
-
191
187
For example, if the HA VPN gateway's interface 0 is paired to this
192
188
interconnect attachment, then an RFC 1918 IP address for the VPN gateway
193
189
interface 0 will be allocated from the IP address specified for this
194
190
interconnect attachment.
195
-
196
191
If this field is not specified for interconnect attachment that has
197
192
encryption option as IPSEC, later on when creating HA VPN gateway on this
198
193
interconnect attachment, the HA VPN gateway's IP address will be
@@ -223,9 +218,19 @@ this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not
223
218
ValidateFunc : verify .ValidateEnum ([]string {"IPV4_IPV6" , "IPV4_ONLY" , "" }),
224
219
Description : `The stack type for this interconnect attachment to identify whether the IPv6
225
220
feature is enabled or not. If not specified, IPV4_ONLY will be used.
226
-
227
221
This field can be both set at interconnect attachments creation and update
228
222
interconnect attachment operations. Possible values: ["IPV4_IPV6", "IPV4_ONLY"]` ,
223
+ },
224
+ "subnet_length" : {
225
+ Type : schema .TypeInt ,
226
+ Optional : true ,
227
+ ForceNew : true ,
228
+ Description : `Length of the IPv4 subnet mask. Allowed values: 29 (default), 30. The default value is 29,
229
+ except for Cross-Cloud Interconnect connections that use an InterconnectRemoteLocation with a
230
+ constraints.subnetLengthRange.min equal to 30. For example, connections that use an Azure
231
+ remote location fall into this category. In these cases, the default value is 30, and
232
+ requesting 29 returns an error. Where both 29 and 30 are allowed, 29 is preferred, because it
233
+ gives Google Cloud Support more debugging visibility.` ,
229
234
},
230
235
"type" : {
231
236
Type : schema .TypeString ,
@@ -421,6 +426,12 @@ func resourceComputeInterconnectAttachmentCreate(d *schema.ResourceData, meta in
421
426
} else if v , ok := d .GetOkExists ("stack_type" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (stackTypeProp )) && (ok || ! reflect .DeepEqual (v , stackTypeProp )) {
422
427
obj ["stackType" ] = stackTypeProp
423
428
}
429
+ subnetLengthProp , err := expandComputeInterconnectAttachmentSubnetLength (d .Get ("subnet_length" ), d , config )
430
+ if err != nil {
431
+ return err
432
+ } else if v , ok := d .GetOkExists ("subnet_length" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (subnetLengthProp )) && (ok || ! reflect .DeepEqual (v , subnetLengthProp )) {
433
+ obj ["subnetLength" ] = subnetLengthProp
434
+ }
424
435
regionProp , err := expandComputeInterconnectAttachmentRegion (d .Get ("region" ), d , config )
425
436
if err != nil {
426
437
return err
@@ -1007,6 +1018,10 @@ func expandComputeInterconnectAttachmentStackType(v interface{}, d tpgresource.T
1007
1018
return v , nil
1008
1019
}
1009
1020
1021
+ func expandComputeInterconnectAttachmentSubnetLength (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
1022
+ return v , nil
1023
+ }
1024
+
1010
1025
func expandComputeInterconnectAttachmentRegion (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
1011
1026
f , err := tpgresource .ParseGlobalFieldValue ("regions" , v .(string ), "project" , d , config , true )
1012
1027
if err != nil {
0 commit comments