Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Refactor backend handling #828

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Commits on Sep 4, 2020

  1. Refactor backend handling

    - Simplify Backend interface.
      - Rather than relying on the caller to call LoadConfig, expose new
        functions for creating a backend configuration and a backend
        struct. HCL unmarshaling happens inside NewConfig now so that
        it's impossible to construct an "unloaded" backend.
      - Replace Render() with String(). The actual rendering happens
        at backend construction time and the result is stored for
        retrieval by String().
      - Remove Validate() from the interface. Instead, validate the
        the config at creation time.
    - Make region a required parameter. Ensuring that a region is
      specified only when no credentials file is specified doesn't make
      sense. A region is always required by the S3 Terraform backend. In
      addition, the AWS_SHARED_CREDENTIALS_FILE and AWS_DEFAULT_REGION
      env vars aren't documented in the S3 backend reference guide. We
      might as well just get rid of these.
    - Get rid of the "registration" pattern. Storing all supported
      backend types in a global variable doesn't seem useful. Instead,
      each implementation of the Backend interface can construct a
      concrete type which implements the interface and return it.
    - Fix whitespace problems in backend file.
    johananl committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    0fe8639 View commit details
    Browse the repository at this point in the history
  2. Simplify backend handling

    - Integrate the backend config into the root module template.
    - Remove the Backend interface.
    johananl committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    332095c View commit details
    Browse the repository at this point in the history
  3. platform/aks: Fix whitespace in template

    The current whitespace trim markers cause the `locals` block to start
    on the same line as the closing curly bracket of the previous block.
    johananl committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    025ec88 View commit details
    Browse the repository at this point in the history