Skip to content

Commit da0404d

Browse files
author
Nils
committed
attribute_condition
1 parent 479e29d commit da0404d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Attribute mapping:
8181

8282
| Name | Description | Type | Default | Required |
8383
|------|-------------|------|---------|:--------:|
84+
| <a name="input_attribute_condition"></a> [attribute\_condition](#input\_attribute\_condition) | (Optional) Workload Identity Pool Provider attribute condition expression | `string` | `null` | no |
8485
| <a name="input_attribute_mapping"></a> [attribute\_mapping](#input\_attribute\_mapping) | Workload Identity Pool Provider attribute mapping | `map(string)` | <pre>{<br> "attribute.actor": "assertion.actor",<br> "attribute.actor_id": "assertion.actor_id",<br> "attribute.base_ref": "assertion.base_ref",<br> "attribute.environment": "assertion.environment",<br> "attribute.event_name": "assertion.event_name",<br> "attribute.head_ref": "assertion.head_ref",<br> "attribute.job_workflow_ref": "assertion.job_workflow_ref",<br> "attribute.job_workflow_sha": "assertion.job_workflow_sha",<br> "attribute.ref": "assertion.ref",<br> "attribute.ref_type": "assertion.ref_type",<br> "attribute.repository": "assertion.repository",<br> "attribute.repository_id": "assertion.repository_id",<br> "attribute.repository_owner": "assertion.repository_owner",<br> "attribute.repository_owner_id": "assertion.repository_owner_id",<br> "attribute.repository_visibility": "assertion.repository_visibility",<br> "attribute.run_attempt": "assertion.run_attempt",<br> "attribute.run_id": "assertion.run_id",<br> "attribute.run_number": "assertion.run_number",<br> "attribute.runner_environment": "assertion.runner_environment",<br> "attribute.sub": "attribute.sub",<br> "attribute.workflow": "assertion.workflow",<br> "attribute.workflow_ref": "assertion.workflow_ref",<br> "attribute.workflow_sha": "assertion.workflow_sha",<br> "google.subject": "assertion.sub"<br>}</pre> | no |
8586
| <a name="input_issuer_uri"></a> [issuer\_uri](#input\_issuer\_uri) | Workload Identity Pool Provider issuer URI | `string` | `"https://token.actions.githubusercontent.com"` | no |
8687
| <a name="input_pool_description"></a> [pool\_description](#input\_pool\_description) | Workload Identity Pool description | `string` | `"Workload Identity Pool for GitHub (Terraform managed)"` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ resource "google_iam_workload_identity_pool_provider" "provider" {
6868
description = var.provider_description
6969
disabled = var.provider_disabled
7070
attribute_mapping = var.attribute_mapping
71+
attribute_condition = var.attribute_condition
7172
oidc {
7273
issuer_uri = var.issuer_uri
7374
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,10 @@ variable "attribute_mapping" {
131131
"attribute.workflow_ref" = "assertion.workflow_ref" # The ref path to the workflow. For example, octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch.
132132
"attribute.workflow_sha" = "assertion.workflow_sha" # The commit SHA for the workflow file.
133133
}
134+
}
135+
136+
variable "attribute_condition" {
137+
type = string
138+
description = "(Optional) Workload Identity Pool Provider attribute condition expression"
139+
default = null
134140
}

0 commit comments

Comments
 (0)