terraform/builtin/providers/digitalocean
James Nugent 85ec09111b helper/schema: Add diff suppression callback
This commit adds a new callback, DiffSuppressFunc, to  the schema.Schema
structure. If set for a given schema, a callback to the user-supplied
function will be made for each attribute for which the default
type-based diff mechanism produces an attribute diff. Returning `true`
from the callback will suppress the diff (i.e. pretend there was no
diff), and returning false will retain it as part of the plan.

There are a number of motivating examples for this - one of which is
included as an example:

1. On SSH public keys, trailing whitespace does not matter in many
   cases - and in some cases it is added by provider APIs. For
   digitalocean_ssh_key resources we previously had a StateFunc that
   trimmed the whitespace - we now have a DiffSuppressFunc which
   verifies whether the trimmed strings are equivalent.

2. IAM policy equivalence for AWS. A good proportion of AWS issues
   relate to IAM policies which have been "normalized" (used loosely)
   by the IAM API endpoints. This can make the JSON strings differ
   from those generated by iam_policy_document resources or template
   files, even though the semantics are the same (for example,
   reordering of `bucket-prefix/` and `bucket-prefix/*` in an S3
   bucket policy. DiffSupressFunc can be used to test for semantic
   equivalence rather than pure text equivalence, but without having to
   deal with the complexity associated with a full "provider-land" diff
   implementation without helper/schema.
2016-08-31 19:13:53 -05:00
..
config.go provider/digitalocean: adds a volume resource (#7560) 2016-07-13 15:36:37 +01:00
import_digitalocean_domain_test.go provider/digitalocean: Support Import `digitalocean_domain` (#7342) 2016-06-29 16:10:56 +01:00
import_digitalocean_droplet_test.go provider/digitalocean: Support Import `digitalocean_droplet` (#7344) 2016-06-29 20:28:47 +01:00
import_digitalocean_floating_ip_test.go provider/digitalocean: Support Import `digitalocean_floating_ip` (#7343) 2016-06-29 16:30:11 +01:00
import_digitalocean_ssh_key_test.go provider/digitalocean: Support Import `digitalocean_ssh_key` (#7345) 2016-06-29 16:09:34 +01:00
import_digitalocean_tag_test.go provider/digitalocean: Add Test for DO Tag Import (#7602) 2016-07-12 13:16:34 +01:00
import_digitalocean_volume_test.go provider/digitalocean: adds a volume resource (#7560) 2016-07-13 15:36:37 +01:00
provider.go provider/digitalocean: adds a volume resource (#7560) 2016-07-13 15:36:37 +01:00
provider_test.go Refactor the DigitalOcean provider 2014-11-18 11:26:59 +01:00
resource_digitalocean_domain.go provider/digitalocean: Support Import `digitalocean_domain` (#7342) 2016-06-29 16:10:56 +01:00
resource_digitalocean_domain_test.go provider/digitalocean: prevent collision on domain acctest 2016-01-04 16:36:07 -06:00
resource_digitalocean_droplet.go provider/digitalocean: Enforce Lowercase on IPV6 Addresses (#7652) 2016-08-15 15:52:48 +01:00
resource_digitalocean_droplet_test.go provider/digitalocean: Enforce Lowercase on IPV6 Addresses (#7652) 2016-08-15 15:52:48 +01:00
resource_digitalocean_floating_ip.go provider/digitalocean: Support Import `digitalocean_floating_ip` (#7343) 2016-06-29 16:30:11 +01:00
resource_digitalocean_floating_ip_test.go provider/digitalocean: Acceptance Tests needed a new Image Name 2016-08-08 12:08:37 +12:00
resource_digitalocean_record.go Fix typo 2016-02-22 13:31:59 -05:00
resource_digitalocean_record_test.go provider/digitalocean: Addsa FQDN out to the `digitalocean_record` 2016-02-09 16:57:42 +00:00
resource_digitalocean_ssh_key.go helper/schema: Add diff suppression callback 2016-08-31 19:13:53 -05:00
resource_digitalocean_ssh_key_test.go provider/digitalocean: trim whitespace from ssh key (#8173) 2016-08-14 21:38:37 +01:00
resource_digitalocean_tag.go digitalocean tag support (#7500) 2016-07-11 12:09:06 +01:00
resource_digitalocean_tag_test.go digitalocean tag support (#7500) 2016-07-11 12:09:06 +01:00
resource_digitalocean_volume.go provider/digitalocean: adds a volume resource (#7560) 2016-07-13 15:36:37 +01:00
resource_digitalocean_volume_test.go provider/digitalocean: adds a volume resource (#7560) 2016-07-13 15:36:37 +01:00
tags.go digitalocean tag support (#7500) 2016-07-11 12:09:06 +01:00
tags_test.go digitalocean tag support (#7500) 2016-07-11 12:09:06 +01:00