Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add GH required attribute_condition (#672)
this module hasn't been updated in a while, and it seems to have fallen into a broken state. ``` ╷ │ Error: Error creating WorkloadIdentityPoolProvider: googleapi: Error 400: The attribute condition must reference one of the provider's claims. For more information, see https://cloud.google.com/iam/docs/workload-identity-federation-with-deployment-pipelines#conditions │ │ with module.github_wif.google_iam_workload_identity_pool_provider.this, │ on .terraform/modules/github_wif/modules/github-wif-provider/main.tf line 8, in resource "google_iam_workload_identity_pool_provider" "this": │ 8: resource "google_iam_workload_identity_pool_provider" "this" { ``` according to https://cloud.google.com/iam/docs/workload-identity-federation-with-deployment-pipelines#conditions, for GH WIF, the following `attribute_condition` is now required: > Warning: GitHub, GitLab SaaS, and Terraform Cloud use a single issuer URL across all organizations and some of the claims embedded in OIDC tokens might not be unique to your organization. To help protect against [spoofing threats](https://cloud.google.com/iam/docs/best-practices-for-using-workload-identity-federation#protecting_against_spoofing_threats), you must use an attribute condition that restricts access to tokens issued by your GitHub organization, GitLab group, or Terraform Cloud organization. this PR adds `var.repository_owner` as a required variable (a breaking change), but I think this is ok since the module is already broken, now it'll at least fail with a reason/fix
- Loading branch information