README.md

June 10, 2026 ยท View on GitHub

Description

This module creates a Workload Identity binding between a Google Service Account (GSA) and a Kubernetes Service Account (KSA) in a GKE cluster.

Example usage

- id: workload_identity_binding
  source: modules/project/workload_identity_binding
  settings:
    project_id: $(vars.project_id)
    service_account_email: $(service_account.service_account_email)
    namespace: "my-namespace"
    k8s_service_account_name: "my-ksa"

License

Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Requirements

NameVersion
terraform>= 1.12.2
google>= 3.83

Providers

NameVersion
google>= 3.83

Modules

No modules.

Resources

NameType
google_service_account_iam_member.mainresource

Inputs

NameDescriptionTypeDefaultRequired
k8s_service_account_nameThe name of the Kubernetes Service Account (KSA) to bind.stringn/ayes
namespaceThe Kubernetes namespace where the KSA is located.string"default"no
project_idThe GCP project ID where the cluster is located.stringn/ayes
service_account_emailThe email address of the Google Service Account (GSA) to bind (e.g., user@project.iam.gserviceaccount.com).stringn/ayes

Outputs

NameDescription
workload_identity_principalThe Workload Identity principal.