Skip to content

Commit e5dc4bb

Browse files
committed
allowed_audiences is now a list
1 parent 07caa4a commit e5dc4bb

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Create Workload Identity Pool and Provider:
2424
# Create Workload Identity Pool Provider for Bitbucket
2525
module "bitbucket-wif" {
2626
source = "Cyclenerd/wif-bitbucket/google"
27-
version = "~> 1.0.0"
27+
version = "~> 2.0.0"
2828
project_id = "your-project-id"
2929
issuer_uri = "your-bitbucket-identity-provider-url"
30-
allowed_audiences = "your-bitbucket-identity-provider-audience"
30+
allowed_audiences = ["your-bitbucket-identity-provider-audience"]
3131
}
3232
3333
# Get the Workload Identity Pool Provider resource name for Bitbucket pipeline configuration
@@ -101,7 +101,7 @@ Default attribute mapping:
101101

102102
| Name | Description | Type | Default | Required |
103103
|------|-------------|------|---------|:--------:|
104-
| <a name="input_allowed_audiences"></a> [allowed\_audiences](#input\_allowed\_audiences) | Bitbucket identity provider allowed audiences | `string` | n/a | yes |
104+
| <a name="input_allowed_audiences"></a> [allowed\_audiences](#input\_allowed\_audiences) | Bitbucket identity provider allowed audiences | `list(string)` | n/a | yes |
105105
| <a name="input_attribute_condition"></a> [attribute\_condition](#input\_attribute\_condition) | (Optional) Workload Identity Pool Provider attribute condition expression | `string` | `null` | no |
106106
| <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.branch_name": "assertion.branchName",<br> "attribute.iss": "attribute.iss",<br> "attribute.pipeline_uuid": "assertion.pipelineUuid",<br> "attribute.repository": "assertion.repositoryUuid",<br> "attribute.step_uuid": "assertion.stepUuid",<br> "attribute.sub": "attribute.sub",<br> "attribute.workspace_uuid": "assertion.workspaceUuid",<br> "google.subject": "assertion.sub"<br>}</pre> | no |
107107
| <a name="input_issuer_uri"></a> [issuer\_uri](#input\_issuer\_uri) | Bitbucket identity provider URL | `string` | n/a | yes |

examples/bitbucket-pipeline/README.md

Lines changed: 2 additions & 2 deletions
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 Bitbucket
2020
module "bitbucket-wif" {
2121
source = "Cyclenerd/wif-bitbucket/google"
22-
version = "~> 1.0.0"
22+
version = "~> 2.0.0"
2323
project_id = var.project_id
2424
issuer_uri = var.bitbucket_issuer_uri
2525
allowed_audiences = var.bitbucket_allowed_audiences
@@ -56,7 +56,7 @@ output "bitbucket-workload-identity-provider" {
5656
| Name | Description | Type | Default | Required |
5757
|------|-------------|------|---------|:--------:|
5858
| <a name="input_bitbucket_account_id"></a> [bitbucket\_account\_id](#input\_bitbucket\_account\_id) | The account id of the service account for Bitbucket | `string` | n/a | yes |
59-
| <a name="input_bitbucket_allowed_audiences"></a> [bitbucket\_allowed\_audiences](#input\_bitbucket\_allowed\_audiences) | The Bitbucket allowed audience | `string` | n/a | yes |
59+
| <a name="input_bitbucket_allowed_audiences"></a> [bitbucket\_allowed\_audiences](#input\_bitbucket\_allowed\_audiences) | The Bitbucket allowed audiences | `list(string)` | n/a | yes |
6060
| <a name="input_bitbucket_issuer_uri"></a> [bitbucket\_issuer\_uri](#input\_bitbucket\_issuer\_uri) | The Bitbucket identity provider URL | `string` | n/a | yes |
6161
| <a name="input_bitbucket_repository"></a> [bitbucket\_repository](#input\_bitbucket\_repository) | The Bitbucket repository (UUID) | `string` | n/a | yes |
6262
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The ID of the project | `string` | n/a | yes |

examples/bitbucket-pipeline/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Create Workload Identity Pool Provider for Bitbucket
22
module "bitbucket-wif" {
33
source = "Cyclenerd/wif-bitbucket/google"
4-
version = "~> 1.0.0"
4+
version = "~> 2.0.0"
55
project_id = var.project_id
66
issuer_uri = var.bitbucket_issuer_uri
77
allowed_audiences = var.bitbucket_allowed_audiences
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project_id = "your-project-id"
22
bitbucket_issuer_uri = "your-bitbucket-identity-provider-url"
3-
bitbucket_allowed_audiences = "your-bitbucket-identity-provider-audience"
3+
bitbucket_allowed_audiences = ["your-bitbucket-identity-provider-audience"]
44
bitbucket_repository = "your-bitbucket-repository-uuid"
55
bitbucket_account_id = "bitbucket-pipeline"

examples/bitbucket-pipeline/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ variable "bitbucket_issuer_uri" {
99
}
1010

1111
variable "bitbucket_allowed_audiences" {
12-
type = string
13-
description = "The Bitbucket allowed audience"
12+
type = list(string)
13+
description = "The Bitbucket allowed audiences"
1414
}
1515

1616
variable "bitbucket_repository" {

main.tf

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ variable "issuer_uri" {
9797
}
9898

9999
variable "allowed_audiences" {
100-
type = string
100+
type = list(string)
101101
description = "Bitbucket identity provider allowed audiences"
102102
}
103103

0 commit comments

Comments
 (0)