@@ -215,6 +215,17 @@ this interconnect attachment. Currently, only 1440 and 1500 are allowed. If not
215215 DiffSuppressFunc : tpgresource .CompareSelfLinkOrResourceName ,
216216 Description : `Region where the regional interconnect attachment resides.` ,
217217 },
218+ "stack_type" : {
219+ Type : schema .TypeString ,
220+ Computed : true ,
221+ Optional : true ,
222+ ValidateFunc : verify .ValidateEnum ([]string {"IPV4_IPV6" , "IPV4_ONLY" , "" }),
223+ Description : `The stack type for this interconnect attachment to identify whether the IPv6
224+ feature is enabled or not. If not specified, IPV4_ONLY will be used.
225+
226+ This field can be both set at interconnect attachments creation and update
227+ interconnect attachment operations. Possible values: ["IPV4_IPV6", "IPV4_ONLY"]` ,
228+ },
218229 "type" : {
219230 Type : schema .TypeString ,
220231 Computed : true ,
@@ -391,6 +402,12 @@ func resourceComputeInterconnectAttachmentCreate(d *schema.ResourceData, meta in
391402 } else if v , ok := d .GetOkExists ("encryption" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (encryptionProp )) && (ok || ! reflect .DeepEqual (v , encryptionProp )) {
392403 obj ["encryption" ] = encryptionProp
393404 }
405+ stackTypeProp , err := expandComputeInterconnectAttachmentStackType (d .Get ("stack_type" ), d , config )
406+ if err != nil {
407+ return err
408+ } else if v , ok := d .GetOkExists ("stack_type" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (stackTypeProp )) && (ok || ! reflect .DeepEqual (v , stackTypeProp )) {
409+ obj ["stackType" ] = stackTypeProp
410+ }
394411 regionProp , err := expandComputeInterconnectAttachmentRegion (d .Get ("region" ), d , config )
395412 if err != nil {
396413 return err
@@ -556,6 +573,9 @@ func resourceComputeInterconnectAttachmentRead(d *schema.ResourceData, meta inte
556573 if err := d .Set ("encryption" , flattenComputeInterconnectAttachmentEncryption (res ["encryption" ], d , config )); err != nil {
557574 return fmt .Errorf ("Error reading InterconnectAttachment: %s" , err )
558575 }
576+ if err := d .Set ("stack_type" , flattenComputeInterconnectAttachmentStackType (res ["stackType" ], d , config )); err != nil {
577+ return fmt .Errorf ("Error reading InterconnectAttachment: %s" , err )
578+ }
559579 if err := d .Set ("region" , flattenComputeInterconnectAttachmentRegion (res ["region" ], d , config )); err != nil {
560580 return fmt .Errorf ("Error reading InterconnectAttachment: %s" , err )
561581 }
@@ -606,6 +626,12 @@ func resourceComputeInterconnectAttachmentUpdate(d *schema.ResourceData, meta in
606626 } else if v , ok := d .GetOkExists ("bandwidth" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , bandwidthProp )) {
607627 obj ["bandwidth" ] = bandwidthProp
608628 }
629+ stackTypeProp , err := expandComputeInterconnectAttachmentStackType (d .Get ("stack_type" ), d , config )
630+ if err != nil {
631+ return err
632+ } else if v , ok := d .GetOkExists ("stack_type" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , stackTypeProp )) {
633+ obj ["stackType" ] = stackTypeProp
634+ }
609635 regionProp , err := expandComputeInterconnectAttachmentRegion (d .Get ("region" ), d , config )
610636 if err != nil {
611637 return err
@@ -862,6 +888,10 @@ func flattenComputeInterconnectAttachmentEncryption(v interface{}, d *schema.Res
862888 return v
863889}
864890
891+ func flattenComputeInterconnectAttachmentStackType (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
892+ return v
893+ }
894+
865895func flattenComputeInterconnectAttachmentRegion (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
866896 if v == nil {
867897 return v
@@ -937,6 +967,10 @@ func expandComputeInterconnectAttachmentEncryption(v interface{}, d tpgresource.
937967 return v , nil
938968}
939969
970+ func expandComputeInterconnectAttachmentStackType (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
971+ return v , nil
972+ }
973+
940974func expandComputeInterconnectAttachmentRegion (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
941975 f , err := tpgresource .ParseGlobalFieldValue ("regions" , v .(string ), "project" , d , config , true )
942976 if err != nil {
0 commit comments