From 49971c4ccedf5cf74e4a3085c1a6cba7616a4963 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Mon, 7 Nov 2022 17:49:43 +0000 Subject: [PATCH] fix: attribute names for google_cloud_ids_endpoint (#6712) Signed-off-by: Modular Magician --- .changelog/6712.txt | 3 +++ google/resource_cloud_ids_endpoint.go | 14 +++++++------- website/docs/r/cloud_ids_endpoint.html.markdown | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .changelog/6712.txt diff --git a/.changelog/6712.txt b/.changelog/6712.txt new file mode 100644 index 00000000000..1d4c0fe2e3a --- /dev/null +++ b/.changelog/6712.txt @@ -0,0 +1,3 @@ +```release-note:bug +cloudids: fix `endpoint_forwarding_rule` and `endpoint_ip` attributes for `google_cloud_ids_endpoint` +``` diff --git a/google/resource_cloud_ids_endpoint.go b/google/resource_cloud_ids_endpoint.go index c855a519b24..a6e1b348c7d 100644 --- a/google/resource_cloud_ids_endpoint.go +++ b/google/resource_cloud_ids_endpoint.go @@ -75,15 +75,15 @@ func resourceCloudIdsEndpoint() *schema.Resource { Computed: true, Description: `Creation timestamp in RFC 3339 text format.`, }, - "endpoint": { + "endpoint_forwarding_rule": { Type: schema.TypeString, Computed: true, - Description: `Internal IP address of the endpoint's network entry point.`, + Description: `URL of the endpoint's network address to which traffic is to be sent by Packet Mirroring.`, }, - "endpoint_forwarding_rule": { + "endpoint_ip": { Type: schema.TypeString, Computed: true, - Description: `URL of the endpoint's network address to which traffic is to be sent by Packet Mirroring.`, + Description: `Internal IP address of the endpoint's network entry point.`, }, "update_time": { Type: schema.TypeString, @@ -243,10 +243,10 @@ func resourceCloudIdsEndpointRead(d *schema.ResourceData, meta interface{}) erro if err := d.Set("description", flattenCloudIdsEndpointDescription(res["description"], d, config)); err != nil { return fmt.Errorf("Error reading Endpoint: %s", err) } - if err := d.Set("endpoint_forwarding_rule", flattenCloudIdsEndpointEndpointForwardingRule(res["endpoint_forwarding_rule"], d, config)); err != nil { + if err := d.Set("endpoint_forwarding_rule", flattenCloudIdsEndpointEndpointForwardingRule(res["endpointForwardingRule"], d, config)); err != nil { return fmt.Errorf("Error reading Endpoint: %s", err) } - if err := d.Set("endpoint", flattenCloudIdsEndpointEndpoint(res["endpoint"], d, config)); err != nil { + if err := d.Set("endpoint_ip", flattenCloudIdsEndpointEndpointIp(res["endpointIp"], d, config)); err != nil { return fmt.Errorf("Error reading Endpoint: %s", err) } if err := d.Set("severity", flattenCloudIdsEndpointSeverity(res["severity"], d, config)); err != nil { @@ -348,7 +348,7 @@ func flattenCloudIdsEndpointEndpointForwardingRule(v interface{}, d *schema.Reso return v } -func flattenCloudIdsEndpointEndpoint(v interface{}, d *schema.ResourceData, config *Config) interface{} { +func flattenCloudIdsEndpointEndpointIp(v interface{}, d *schema.ResourceData, config *Config) interface{} { return v } diff --git a/website/docs/r/cloud_ids_endpoint.html.markdown b/website/docs/r/cloud_ids_endpoint.html.markdown index 06ab6305200..1556bb9cfa1 100644 --- a/website/docs/r/cloud_ids_endpoint.html.markdown +++ b/website/docs/r/cloud_ids_endpoint.html.markdown @@ -105,7 +105,7 @@ In addition to the arguments listed above, the following computed attributes are * `endpoint_forwarding_rule` - URL of the endpoint's network address to which traffic is to be sent by Packet Mirroring. -* `endpoint` - +* `endpoint_ip` - Internal IP address of the endpoint's network entry point.