Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Ansible fingerprint to match TF #1482

Merged
merged 1 commit into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 6 additions & 23 deletions google-beta/resource_compute_subnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
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 @@ -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.


Expand Down