forked from camptocamp/terraboard
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: multiple buckets / providers support (camptocamp#48) (camptoca…
…mp#177) * feat: multi-provider support (WIP) * feat: env variables/flags available again for single provider configuration * feat: add some custom yaml unmarshalling rules to add default values where go-flags ones aren't applicable * docs: update readme with multiple buckets/providers config advices * feat: parallelized db refreshing and add mutex security + code review fixes from camptocamp#177 * feat: add aws credentials & session token config support * allow aws multiple buckets to be configured directly in s3 yaml field (now an objects array) * add another minio instance to multiple-minio-buckets testing env * update all yaml example config files * docs: update readme with new aws configuration fields
- Loading branch information
Showing
26 changed files
with
513 additions
and
308 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package config | ||
|
||
/********************************************* | ||
* Custom UnmarshalYAML used to define some struct fields | ||
* default values where go-flags ones aren't applicable | ||
* (and so makes them optional) | ||
*********************************************/ | ||
|
||
func (s *S3BucketConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { | ||
type rawS3BucketConfig S3BucketConfig | ||
raw := rawS3BucketConfig{ | ||
FileExtension: []string{".tfstate"}, | ||
} | ||
if err := unmarshal(&raw); err != nil { | ||
return err | ||
} | ||
|
||
*s = S3BucketConfig(raw) | ||
return nil | ||
} | ||
|
||
func (s *GitlabConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { | ||
type rawGitlabConfig GitlabConfig | ||
raw := rawGitlabConfig{ | ||
Address: "https://gitlab.com", | ||
} | ||
if err := unmarshal(&raw); err != nil { | ||
return err | ||
} | ||
|
||
*s = GitlabConfig(raw) | ||
return nil | ||
} |
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.