diff --git a/.terraform-docs.yml b/.terraform-docs.yml index b27151f..90f948d 100644 --- a/.terraform-docs.yml +++ b/.terraform-docs.yml @@ -1,5 +1,5 @@ formatter: "markdown table" # this is required -version: "0.16" +version: "0.19.0" header-from: main.tf footer-from: "" recursive: diff --git a/README.md b/README.md index 737656a..c5c3725 100644 --- a/README.md +++ b/README.md @@ -37,25 +37,25 @@ Basic usage of this module is as follows: ```hcl module "example" { - source = "" - + source = "" + # Required variables - agent_name = - gitlab_agent_cluster_projects = - + agent_name = + gitlab_agent_cluster_projects = + # Optional variables - agent_config = {} - agent_version = null - author_email = "example@mail.com" - chart_version = "1.14.1" - commit_message = "feature: add/update agent config" - create_namespace = false - create_project = false - namespace = "gitlab-agent" - project_name = "k8s-agent" - project_namespace = "" - project_path = null - token_description = "" + agent_config = {} + agent_version = null + author_email = "example@mail.com" + chart_version = "1.14.1" + commit_message = "feature: add/update agent config" + create_namespace = false + create_project = false + namespace = "gitlab-agent" + project_name = "k8s-agent" + project_namespace = "" + project_path = null + token_description = "" } ``` @@ -76,7 +76,7 @@ module "example" { | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [agent\_config](#input\_agent\_config) | agent config to be used regarding:
* https://docs.gitlab.com/ee/user/clusters/agent/gitops.html
* https://docs.gitlab.com/ee/user/clusters/agent/ci_cd_workflow.html#authorize-the-agent-to-access-your-projects | `any` | `{}` | no | +| [agent\_config](#input\_agent\_config) | agent config to be used regarding:
* https://docs.gitlab.com/ee/user/clusters/agent/gitops.html
* https://docs.gitlab.com/ee/user/clusters/agent/ci_cd_workflow.html#authorize-the-agent-to-access-your-projects | `any` | `{}` | no | | [agent\_name](#input\_agent\_name) | agent name | `string` | n/a | yes | | [agent\_version](#input\_agent\_version) | specific agent version | `string` | `null` | no | | [author\_email](#input\_author\_email) | author email to be used for commit | `string` | `"example@mail.com"` | no | @@ -84,7 +84,7 @@ module "example" { | [commit\_message](#input\_commit\_message) | use this commit message for agent config update | `string` | `"feature: add/update agent config"` | no | | [create\_namespace](#input\_create\_namespace) | option for create namespace | `bool` | `false` | no | | [create\_project](#input\_create\_project) | create a new agent managing project or use existing one | `bool` | `false` | no | -| [gitlab\_agent\_cluster\_projects](#input\_gitlab\_agent\_cluster\_projects) | n/a |
map(object({
envs = list(object({
scope = string
namespace = string
}))
path = string
}))
| n/a | yes | +| [gitlab\_agent\_cluster\_projects](#input\_gitlab\_agent\_cluster\_projects) | n/a |
map(object({
envs = list(object({
scope = string
namespace = string
}))
path = string
}))
| n/a | yes | | [namespace](#input\_namespace) | agent namespace | `string` | `"gitlab-agent"` | no | | [project\_name](#input\_project\_name) | agent managing project nice/visible name | `string` | `"k8s-agent"` | no | | [project\_namespace](#input\_project\_namespace) | agent managing project namespace, required when creating new project | `string` | `""` | no | diff --git a/main.tf b/main.tf index 390d6ac..fa16b0c 100644 --- a/main.tf +++ b/main.tf @@ -33,6 +33,8 @@ resource "gitlab_project" "this" { namespace_id = data.gitlab_group.namespace[0].id + # `restrict_user_defined_variables` can be removed with provider constraint >=17.7 + restrict_user_defined_variables = true skip_wait_for_default_branch_protection = true }