Skip to content

Commit b233092

Browse files
Fix: add var.role (#7)
1 parent 0ce4ca7 commit b233092

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ module "terraform_gke_helm_atlantis" {
121121
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.<br>Characters matching the regex will be removed from the ID elements.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
122122
| <a name="input_repos"></a> [repos](#input\_repos) | Map of repositories and their configs. Refer to https://www.runatlantis.io/docs/server-side-repo-config.html#example-server-side-repo | <pre>list(object({<br> id = optional(string, "/.*/")<br> branch = optional(string)<br> apply_requirements = optional(list(string))<br> allowed_overrides = optional(list(string))<br> allowed_workflows = optional(list(string))<br> allow_custom_workflows = optional(bool)<br> delete_source_branch_on_merge = optional(bool)<br> pre_workflow_hooks = optional(list(object({<br> run = string<br> })))<br> post_workflow_hooks = optional(list(object({<br> run = string<br> })))<br> workflow = optional(string)<br> ######### Helpers #########<br> allow_all_server_side_workflows = optional(bool, false)<br> terragrunt_atlantis_config = optional(object({<br> enabled = optional(bool)<br> output = optional(string)<br> automerge = optional(bool)<br> autoplan = optional(bool)<br> parallel = optional(bool)<br> cascade_dependencies = optional(bool)<br> filter = optional(string)<br> use_project_markers = optional(bool)<br> }))<br> }))</pre> | `[]` | no |
123123
| <a name="input_repos_common_config"></a> [repos\_common\_config](#input\_repos\_common\_config) | Common config that will be merged into each item of the repos list | <pre>object({<br> id = optional(string)<br> branch = optional(string)<br> apply_requirements = optional(list(string))<br> allowed_overrides = optional(list(string))<br> allowed_workflows = optional(list(string))<br> allow_custom_workflows = optional(bool)<br> delete_source_branch_on_merge = optional(bool)<br> pre_workflow_hooks = optional(list(object({<br> run = string<br> })))<br> post_workflow_hooks = optional(list(object({<br> run = string<br> })))<br> workflow = optional(string)<br> ######### Helpers #########<br> allow_all_server_side_workflows = optional(bool, false)<br> terragrunt_atlantis_config = optional(object({<br> enabled = optional(bool)<br> output = optional(string)<br> automerge = optional(bool)<br> autoplan = optional(bool)<br> parallel = optional(bool)<br> cascade_dependencies = optional(bool)<br> filter = optional(string)<br> use_project_markers = optional(bool)<br> }))<br> })</pre> | `{}` | no |
124+
| <a name="input_role"></a> [role](#input\_role) | Atlantis SA roles | `list(string)` | <pre>[<br> "roles/editor"<br>]</pre> | no |
124125
| <a name="input_stage"></a> [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
125126
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
126127
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module "terraform_gke_helm_release" {
2626
}
2727
values = concat([templatefile("${path.module}/template/values.yaml.tftpl", { repoConfig = indent(2, module.atlantis_repo_config.repos_config_yaml) })], var.values)
2828

29-
roles = ["roles/editor"]
29+
roles = var.role
3030

3131
app = {
3232
name = var.app.name

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,9 @@ variable "project_id" {
191191
description = "GCP project ID"
192192
type = string
193193
}
194+
195+
variable "role" {
196+
description = "Atlantis SA roles"
197+
type = list(string)
198+
default = ["roles/editor"]
199+
}

0 commit comments

Comments
 (0)