...
1apiVersion: external-secrets.io/v1beta1
2kind: ExternalSecret
3metadata:
4 name: gcp-api-key
5spec:
6 data:
7 - remoteRef:
8 key: o11y-${cluster_uuid}-gcp-api-key
9 secretKey: key.json
10 refreshInterval: 1m
11 secretStoreRef:
12 name: gcp-provider
13 kind: ClusterSecretStore
14 target:
15 name: gcp-api-key
16 creationPolicy: Owner
17---
18apiVersion: iam.cnrm.cloud.google.com/v1beta1
19kind: IAMPolicyMember
20metadata:
21 name: essa-o11y-${cluster_uuid}-gcp-api-key
22spec:
23 member: serviceAccount:ext-sec-${cluster_hash}@${gcp_project_id}.iam.gserviceaccount.com
24 resourceRef:
25 apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
26 kind: SecretManagerSecret
27 external: projects/${gcp_project_id}/secrets/o11y-${cluster_uuid}-gcp-api-key
28 role: roles/secretmanager.secretAccessor
View as plain text