Skip to main content

GCP Policy Definition

< Workload Identities

The policy definition outlines the actions that the Kubernetes service account is allowed to undertake in GCP when running on a GCP GKE cluster, such as interacting with cloud services like DNS zones or cloud storage.

Add your policy in the YAML generated by wf init package or prepare it using the Web Interface. See the CLI instructions section for details where you selected 'yes' when asked if your workload identity required cloud access.


Web Interface Instructions

Steps


Screenshot(s):

GCP Policy Definition


Properties

FieldDescription
Policy DefinitionThe YAML of the custom policy definition.

Define a list of role bindings in YAML using the key's role and scopeType:
- Role: name of a pre-defined (or self-managed) GCP role to use.
- ScopeType: Project

Note: 'Project' is currently the only supported scope type.

See example template for reference.


What comes next?

If the package requires cloud access to other Providers, then you need to configure the corresponding Policy Definition(s):


If your package doesn't require further cloud access configuration:



Examples

GCP Workload Identity Role Bindings Template

- role: roles/dns.reader
scopeType: Project
{{- if .Cluster.DNSZones }}
{{- range .Cluster.DNSZones }}
{{- if .GCP }}
- role: roles/dns.admin
scopeType: Project
{{- end }}
{{- end }}
{{- end }}