This module generates a server side repo config that can be passed to Atlantis server. It also contains a set of opinionated custom workflows that are ready for usage.
module "template" {
source = "github.com/getindata/terraform-null-atlantis-repo-config"
repos = [
{
id = "/.*/"
allowed_overrides = ["workflow", "delete_source_branch_on_merge"]
allow_custom_workflows = true
allow_all_server_side_workflows = true
}
]
repos_common_config = {
apply_requirements = ["approved", "mergeable"]
}
workflows = {
terragrunt-basic-with-features = {
import = {
steps = []
}
checkov = { enabled = true, soft_fail = true }
infracost = { enabled = true }
check_gitlab_approvals = { enabled = true }
asdf = { enabled = true }
}
}
}
Every workflow can have separately configurable Infracost post workflow hook. As you can see in the example above
to enable it you need to set enabled
parameter to true.
Other parameters are:
platform
- used to configure which platform Infracost should interact with. Currently supported are: GitHub, GitLab and Bitbucket.token_environment_variable
- used to specifying a custom environment variable with an access token to use to authorize when posting commentsbehavior
- used to configuring how comments are posted. Possible values: update, hide-and-new, delete-and-new and new. For more details see: https://www.infracost.io/docs/features/cli_commands/
If you don't specify token_environment_variable
then an environment variable with an access token will be chosen
automatically based on specified platform, e.g. on GitLab it will be ATLANTIS_GITLAB_TOKEN
.
Name | Description | Type | Default | Required |
---|---|---|---|---|
repo_config_file | Configures config file generation if enabled | object({ |
{} |
no |
repos | Map of repositories and their configs. Refer to https://www.runatlantis.io/docs/server-side-repo-config.html#example-server-side-repo | list(object({ |
[] |
no |
repos_common_config | Common config that will be merged into each item of the repos list | object({ |
{} |
no |
workflows | List of custom workflow that will be added to the repo config file | map(object({ |
{} |
no |
No modules.
Name | Description |
---|---|
repo_config | Repo config object |
repos | List of repos config |
repos_config_json | Repo config converted to json string |
repos_config_yaml | Repo config converted to json string |
workflows | Custom Atlantis workflows |
Name | Version |
---|---|
local | >= 1.3 |
Name | Version |
---|---|
terraform | >= 1.3 |
local | >= 1.3 |
Name | Type |
---|---|
local_file.repo_config | resource |
Contributions are very welcomed!
Start by reviewing contribution guide and our code of conduct. After that, start coding and ship your changes by creating a new PR.
Apache 2 Licensed. See LICENSE for full details.
Made with contrib.rocks.