This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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.
- Loading branch information
Showing
8 changed files
with
162 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.