Can i ask if someone has a terraform example that ...
# terraform
f
Can i ask if someone has a terraform example that creates a WIF in GCP, this way i can deploy from github directly, but i would like to setup IAM with WIF, not with service account (old style)
k
just few googling will give you plenty of examples
you have a great foudation template from Google also https://github.com/terraform-google-modules/terraform-example-foundation
f
Thanks is not super easy actually
I got an error that i don't understand
Copy code
google_iam_workload_identity_pool_provider.github: Creating...
╷
│ 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 google_iam_workload_identity_pool_provider.github,
│   on <http://github_wif.tf|github_wif.tf> line 12, in resource "google_iam_workload_identity_pool_provider" "github":
│   12: resource "google_iam_workload_identity_pool_provider" "github" {
│
Maybe i figured out 😄