Skip to content

Commit 9522eb0

Browse files
committed
allowed_audiences is now a list
1 parent 26ec9f2 commit 9522eb0

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Create Workload Identity Pool and Provider:
2828
# Create Workload Identity Pool Provider for GitLab and restrict access to GitLab group
2929
module "gitlab-wif" {
3030
source = "Cyclenerd/wif-gitlab/google"
31-
version = "~> 1.0.0"
31+
version = "~> 2.0.0"
3232
project_id = var.project_id
3333
# Restrict access to username or the name of a GitLab group
3434
attribute_condition = "assertion.namespace_path == '${var.gitlab_group}'"
@@ -106,13 +106,13 @@ Default attribute mapping:
106106

107107
| Name | Version |
108108
|------|---------|
109-
| <a name="provider_google"></a> [google](#provider\_google) | 4.62.0 |
109+
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.61.0 |
110110

111111
## Inputs
112112

113113
| Name | Description | Type | Default | Required |
114114
|------|-------------|------|---------|:--------:|
115-
| <a name="input_allowed_audiences"></a> [allowed\_audiences](#input\_allowed\_audiences) | Workload Identity Pool Provider allowed audiences | `string` | `"https://gitlab.com"` | no |
115+
| <a name="input_allowed_audiences"></a> [allowed\_audiences](#input\_allowed\_audiences) | Workload Identity Pool Provider allowed audiences | `list(string)` | <pre>[<br> "https://gitlab.com"<br>]</pre> | no |
116116
| <a name="input_attribute_condition"></a> [attribute\_condition](#input\_attribute\_condition) | (Optional) Workload Identity Pool Provider attribute condition expression | `string` | `null` | no |
117117
| <a name="input_attribute_mapping"></a> [attribute\_mapping](#input\_attribute\_mapping) | Workload Identity Pool Provider attribute mapping | `map(string)` | <pre>{<br> "attribute.aud": "attribute.aud",<br> "attribute.deployment_tier": "assertion.deployment_tier",<br> "attribute.environment": "assertion.environment",<br> "attribute.environment_protected": "assertion.environment_protected",<br> "attribute.iss": "attribute.iss",<br> "attribute.job_id": "assertion.job_id",<br> "attribute.namespace_id": "assertion.namespace_id",<br> "attribute.namespace_path": "assertion.namespace_path",<br> "attribute.pipeline_id": "assertion.pipeline_id",<br> "attribute.pipeline_source": "assertion.pipeline_source",<br> "attribute.project_id": "assertion.project_id",<br> "attribute.project_path": "assertion.project_path",<br> "attribute.ref": "assertion.ref",<br> "attribute.ref_protected": "assertion.ref_protected",<br> "attribute.ref_type": "assertion.ref_type",<br> "attribute.repository": "assertion.project_path",<br> "attribute.runner_environment": "assertion.runner_environment",<br> "attribute.sha": "assertion.sha",<br> "attribute.sub": "attribute.sub",<br> "attribute.user_email": "assertion.user_email",<br> "attribute.user_id": "assertion.user_id",<br> "attribute.user_login": "assertion.user_login",<br> "google.subject": "assertion.sub"<br>}</pre> | no |
118118
| <a name="input_issuer_uri"></a> [issuer\_uri](#input\_issuer\_uri) | Workload Identity Pool Provider issuer URI | `string` | `"https://gitlab.com"` | no |

examples/gitlab-ci-custom/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ With this example the following steps are executed and configured:
1919
# Create Workload Identity Pool Provider for self-managed GitLab installation
2020
module "gitlab-custom-wif" {
2121
source = "Cyclenerd/wif-gitlab/google"
22-
version = "~> 1.0.0"
22+
version = "~> 2.0.0"
2323
project_id = var.project_id
24-
allowed_audiences = "https://gitlab.example.com"
24+
allowed_audiences = ["https://gitlab.example.com"]
2525
issuer_uri = "https://gitlab.example.com"
2626
pool_id = "gitlab-example-com"
2727
pool_display_name = "gitlab.example.com"

examples/gitlab-ci-custom/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Create Workload Identity Pool Provider for self-managed GitLab installation
22
module "gitlab-custom-wif" {
33
source = "Cyclenerd/wif-gitlab/google"
4-
version = "~> 1.0.0"
4+
version = "~> 2.0.0"
55
project_id = var.project_id
6-
allowed_audiences = "https://gitlab.example.com"
6+
allowed_audiences = ["https://gitlab.example.com"]
77
issuer_uri = "https://gitlab.example.com"
88
pool_id = "gitlab-example-com"
99
pool_display_name = "gitlab.example.com"

examples/gitlab-ci/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ With this example the following steps are executed and configured:
1919
# Create Workload Identity Pool Provider for GitLab and restrict access to GitLab group
2020
module "gitlab-wif" {
2121
source = "Cyclenerd/wif-gitlab/google"
22-
version = "~> 1.0.0"
22+
version = "~> 2.0.0"
2323
project_id = var.project_id
2424
# Restrict access to username or the name of a GitLab group
2525
attribute_condition = "assertion.namespace_path == '${var.gitlab_group}'"

examples/gitlab-ci/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create Workload Identity Pool Provider for GitLab and restrict access to GitLab group
22
module "gitlab-wif" {
33
source = "Cyclenerd/wif-gitlab/google"
4-
version = "~> 1.0.0"
4+
version = "~> 2.0.0"
55
project_id = var.project_id
66
# Restrict access to username or the name of a GitLab group
77
attribute_condition = "assertion.namespace_path == '${var.gitlab_group}'"

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ resource "google_iam_workload_identity_pool_provider" "provider" {
7070
attribute_mapping = var.attribute_mapping
7171
attribute_condition = var.attribute_condition
7272
oidc {
73-
allowed_audiences = [var.allowed_audiences]
73+
allowed_audiences = var.allowed_audiences
7474
issuer_uri = var.issuer_uri
7575
}
7676

variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ variable "issuer_uri" {
9898
}
9999

100100
variable "allowed_audiences" {
101-
type = string
101+
type = list(string)
102102
description = "Workload Identity Pool Provider allowed audiences"
103-
default = "https://gitlab.com"
103+
default = ["https://gitlab.com"]
104104
}
105105

106106
variable "attribute_mapping" {

0 commit comments

Comments
 (0)