Skip to content

Commit

Permalink
Moving Ansible fingerprint to match TF
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
rambleraptor authored and modular-magician committed Dec 6, 2019
1 parent 789f50d commit 4f7d79b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
23 changes: 0 additions & 23 deletions google/resource_compute_subnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,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,
Expand Down Expand Up @@ -310,12 +304,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
}
secondaryIpRangesProp, err := expandComputeSubnetworkSecondaryIpRange(d.Get("secondary_ip_range"), d, config)
if err != nil {
return err
Expand Down Expand Up @@ -417,9 +405,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("secondary_ip_range", flattenComputeSubnetworkSecondaryIpRange(res["secondaryIpRanges"], d)); err != nil {
return fmt.Errorf("Error reading Subnetwork: %s", err)
}
Expand Down Expand Up @@ -680,10 +665,6 @@ func flattenComputeSubnetworkNetwork(v interface{}, d *schema.ResourceData) inte
return ConvertSelfLinkToV1(v.(string))
}

func flattenComputeSubnetworkFingerprint(v interface{}, d *schema.ResourceData) interface{} {
return v
}

func flattenComputeSubnetworkSecondaryIpRange(v interface{}, d *schema.ResourceData) interface{} {
if v == nil {
return v
Expand Down Expand Up @@ -763,10 +744,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 expandComputeSubnetworkSecondaryIpRange(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
l := v.([]interface{})
req := make([]interface{}, 0, len(l))
Expand Down
4 changes: 0 additions & 4 deletions website/docs/r/compute_subnetwork.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,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.


Expand Down

0 comments on commit 4f7d79b

Please sign in to comment.