From 3535ebcdb1420cc21751ea9dcf173bd5f41cd92e Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Fri, 6 Dec 2019 23:02:18 +0000 Subject: [PATCH] Moving Ansible fingerprint to match TF Signed-off-by: Modular Magician --- google-beta/resource_compute_subnetwork.go | 29 ++++--------------- .../docs/r/compute_subnetwork.html.markdown | 4 --- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/google-beta/resource_compute_subnetwork.go b/google-beta/resource_compute_subnetwork.go index 0cc4e0de72..a2c55643a3 100644 --- a/google-beta/resource_compute_subnetwork.go +++ b/google-beta/resource_compute_subnetwork.go @@ -232,12 +232,6 @@ must be unique within the subnetwork.`, Computed: true, Description: `Creation timestamp in RFC3339 text format.`, }, - "fingerprint": { - Type: schema.TypeString, - Computed: true, - Description: `Fingerprint of this resource. This field is used internally during -updates of this resource.`, - }, "gateway_address": { Type: schema.TypeString, Computed: true, @@ -250,6 +244,12 @@ outside this subnetwork.`, Optional: true, Removed: "This field is being removed in favor of log_config. If log_config is present, flow logs are enabled. Please remove this field", }, + "fingerprint": { + Type: schema.TypeString, + Computed: true, + Description: "Fingerprint of this resource. This field is used internally during updates of this resource.", + Deprecated: "This field is not useful for users, and has been removed as an output.", + }, "project": { Type: schema.TypeString, Optional: true, @@ -334,12 +334,6 @@ func resourceComputeSubnetworkCreate(d *schema.ResourceData, meta interface{}) e } else if v, ok := d.GetOkExists("network"); !isEmptyValue(reflect.ValueOf(networkProp)) && (ok || !reflect.DeepEqual(v, networkProp)) { obj["network"] = networkProp } - fingerprintProp, err := expandComputeSubnetworkFingerprint(d.Get("fingerprint"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("fingerprint"); !isEmptyValue(reflect.ValueOf(fingerprintProp)) && (ok || !reflect.DeepEqual(v, fingerprintProp)) { - obj["fingerprint"] = fingerprintProp - } purposeProp, err := expandComputeSubnetworkPurpose(d.Get("purpose"), d, config) if err != nil { return err @@ -453,9 +447,6 @@ func resourceComputeSubnetworkRead(d *schema.ResourceData, meta interface{}) err if err := d.Set("network", flattenComputeSubnetworkNetwork(res["network"], d)); err != nil { return fmt.Errorf("Error reading Subnetwork: %s", err) } - if err := d.Set("fingerprint", flattenComputeSubnetworkFingerprint(res["fingerprint"], d)); err != nil { - return fmt.Errorf("Error reading Subnetwork: %s", err) - } if err := d.Set("purpose", flattenComputeSubnetworkPurpose(res["purpose"], d)); err != nil { return fmt.Errorf("Error reading Subnetwork: %s", err) } @@ -766,10 +757,6 @@ func flattenComputeSubnetworkNetwork(v interface{}, d *schema.ResourceData) inte return ConvertSelfLinkToV1(v.(string)) } -func flattenComputeSubnetworkFingerprint(v interface{}, d *schema.ResourceData) interface{} { - return v -} - func flattenComputeSubnetworkPurpose(v interface{}, d *schema.ResourceData) interface{} { return v } @@ -857,10 +844,6 @@ func expandComputeSubnetworkNetwork(v interface{}, d TerraformResourceData, conf return f.RelativeLink(), nil } -func expandComputeSubnetworkFingerprint(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) { - return v, nil -} - func expandComputeSubnetworkPurpose(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) { return v, nil } diff --git a/website/docs/r/compute_subnetwork.html.markdown b/website/docs/r/compute_subnetwork.html.markdown index 25bb0b65bd..ce129b0063 100644 --- a/website/docs/r/compute_subnetwork.html.markdown +++ b/website/docs/r/compute_subnetwork.html.markdown @@ -269,10 +269,6 @@ In addition to the arguments listed above, the following computed attributes are * `gateway_address` - The gateway address for default routes to reach destination addresses outside this subnetwork. - -* `fingerprint` - - Fingerprint of this resource. This field is used internally during - updates of this resource. * `self_link` - The URI of the created resource.