Skip to content

Commit

Permalink
Fix: add var.role (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejmacq-dev authored Aug 19, 2024
1 parent 0ce4ca7 commit b233092
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ module "terraform_gke_helm_atlantis" {
| <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 |
| <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 |
| <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 |
| <a name="input_role"></a> [role](#input\_role) | Atlantis SA roles | `list(string)` | <pre>[<br> "roles/editor"<br>]</pre> | no |
| <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 |
| <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 |
| <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 |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module "terraform_gke_helm_release" {
}
values = concat([templatefile("${path.module}/template/values.yaml.tftpl", { repoConfig = indent(2, module.atlantis_repo_config.repos_config_yaml) })], var.values)

roles = ["roles/editor"]
roles = var.role

app = {
name = var.app.name
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,9 @@ variable "project_id" {
description = "GCP project ID"
type = string
}

variable "role" {
description = "Atlantis SA roles"
type = list(string)
default = ["roles/editor"]
}

0 comments on commit b233092

Please sign in to comment.