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

Make consul_keys behavior less surprising #5210

Merged
merged 2 commits into from
Mar 10, 2016
Merged

Make consul_keys behavior less surprising #5210

merged 2 commits into from
Mar 10, 2016

Commits on Mar 10, 2016

  1. Specialized client for interacting with Consul keys

    This deals with some of the quirks of interacting with the Consul API,
    with the goal of making the consul_keys resource implementation, and
    later the consul_keys data source, less noisy to read.
    apparentlymart committed Mar 10, 2016
    Configuration menu
    Copy the full SHA
    df2ce58 View commit details
    Browse the repository at this point in the history
  2. Treat each consul key as having its own lifecycle

    Previously this resource managed the set of keys as a whole rather than
    the individual keys, and so it was unable to recognize when a particular
    managed key is removed and delete just that one key from Consul.
    
    Here this is addressed by recognizing that each key actually has its own
    lifecycle, and detecting when individual keys are added and removed
    without replacing the entire consul_keys instance.
    
    Additionally this restores the behavior of updating the "value" attribute
    on read, but restricts it only to blocks that already had a value so as
    to avoid the quirkiness seen previously when we updated blocks that were
    intended to be read-only. Updating the value is important now, because we
    rely on this to detect and repair discrepancies between values stored in
    Consul and values given in the configuration.
    
    This change produces a change in the handling of the "delete" attribute.
    Before it was considered only when the entire consul_keys resource was
    deleted, but now it is considered also when a particular key block is
    removed from within a resource.
    apparentlymart committed Mar 10, 2016
    Configuration menu
    Copy the full SHA
    2e33f53 View commit details
    Browse the repository at this point in the history