From fc5749ecd68ff1e6a298bc3beafa5b3a9c2ae3da Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 26 Mar 2024 13:46:26 -0700 Subject: [PATCH] add ipv6 outputs (#10275) (#17692) [upstream:db62dafd2cdb8f7aa07dd6b28b9c1db3f697450b] Signed-off-by: Modular Magician --- .changelog/10275.txt | 3 +++ ...esource_compute_interconnect_attachment.go | 26 +++++++++++++++++++ ...pute_interconnect_attachment.html.markdown | 8 ++++++ 3 files changed, 37 insertions(+) create mode 100644 .changelog/10275.txt diff --git a/.changelog/10275.txt b/.changelog/10275.txt new file mode 100644 index 00000000000..2d1a2dfad20 --- /dev/null +++ b/.changelog/10275.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +compute: added `cloud_router_ipv6_address`, `customer_router_ipv6_address` fields to `google_compute_interconnect_attachment` resource +``` \ No newline at end of file diff --git a/google/services/compute/resource_compute_interconnect_attachment.go b/google/services/compute/resource_compute_interconnect_attachment.go index 043bce5e968..7f8bbbbd016 100644 --- a/google/services/compute/resource_compute_interconnect_attachment.go +++ b/google/services/compute/resource_compute_interconnect_attachment.go @@ -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": { @@ -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": { @@ -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) } @@ -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 diff --git a/website/docs/r/compute_interconnect_attachment.html.markdown b/website/docs/r/compute_interconnect_attachment.html.markdown index ad9545f6ae0..36d1baa9168 100644 --- a/website/docs/r/compute_interconnect_attachment.html.markdown +++ b/website/docs/r/compute_interconnect_attachment.html.markdown @@ -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.