Skip to content

Commit

Permalink
add ipv6 outputs (#10275) (#17692)
Browse files Browse the repository at this point in the history
[upstream:db62dafd2cdb8f7aa07dd6b28b9c1db3f697450b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 26, 2024
1 parent 7e577c4 commit fc5749e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/10275.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: added `cloud_router_ipv6_address`, `customer_router_ipv6_address` fields to `google_compute_interconnect_attachment` resource
```
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ using PARTNER type this will be managed upstream.`,
Type: schema.TypeString,
Computed: true,
Description: `IPv4 address + prefix length to be configured on Cloud Router
Interface for this interconnect attachment.`,
},
"cloud_router_ipv6_address": {
Type: schema.TypeString,
Computed: true,
Description: `IPv6 address + prefix length to be configured on Cloud Router
Interface for this interconnect attachment.`,
},
"creation_timestamp": {
Expand All @@ -258,6 +264,12 @@ Interface for this interconnect attachment.`,
Type: schema.TypeString,
Computed: true,
Description: `IPv4 address + prefix length to be configured on the customer
router subinterface for this interconnect attachment.`,
},
"customer_router_ipv6_address": {
Type: schema.TypeString,
Computed: true,
Description: `IPv6 address + prefix length to be configured on the customer
router subinterface for this interconnect attachment.`,
},
"google_reference_id": {
Expand Down Expand Up @@ -576,6 +588,12 @@ func resourceComputeInterconnectAttachmentRead(d *schema.ResourceData, meta inte
if err := d.Set("stack_type", flattenComputeInterconnectAttachmentStackType(res["stackType"], d, config)); err != nil {
return fmt.Errorf("Error reading InterconnectAttachment: %s", err)
}
if err := d.Set("cloud_router_ipv6_address", flattenComputeInterconnectAttachmentCloudRouterIpv6Address(res["cloudRouterIpv6Address"], d, config)); err != nil {
return fmt.Errorf("Error reading InterconnectAttachment: %s", err)
}
if err := d.Set("customer_router_ipv6_address", flattenComputeInterconnectAttachmentCustomerRouterIpv6Address(res["customerRouterIpv6Address"], d, config)); err != nil {
return fmt.Errorf("Error reading InterconnectAttachment: %s", err)
}
if err := d.Set("region", flattenComputeInterconnectAttachmentRegion(res["region"], d, config)); err != nil {
return fmt.Errorf("Error reading InterconnectAttachment: %s", err)
}
Expand Down Expand Up @@ -893,6 +911,14 @@ func flattenComputeInterconnectAttachmentStackType(v interface{}, d *schema.Reso
return v
}

func flattenComputeInterconnectAttachmentCloudRouterIpv6Address(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenComputeInterconnectAttachmentCustomerRouterIpv6Address(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenComputeInterconnectAttachmentRegion(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
if v == nil {
return v
Expand Down
8 changes: 8 additions & 0 deletions website/docs/r/compute_interconnect_attachment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,14 @@ In addition to the arguments listed above, the following computed attributes are

* `creation_timestamp` -
Creation timestamp in RFC3339 text format.

* `cloud_router_ipv6_address` -
IPv6 address + prefix length to be configured on Cloud Router
Interface for this interconnect attachment.

* `customer_router_ipv6_address` -
IPv6 address + prefix length to be configured on the customer
router subinterface for this interconnect attachment.
* `self_link` - The URI of the created resource.


Expand Down

0 comments on commit fc5749e

Please sign in to comment.