-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add another example constraint for CPA user managed keys. (#217)
- Loading branch information
1 parent
5da3883
commit ee400f9
Showing
2 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...rg-policy/samples/control-plane-authority/control_plane_user_managed_keys_must_exist.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: organizations/${ORG_ID}/customConstraints/custom.controlPlaneUserManagedKeys | ||
resource_types: container.googleapis.com/Cluster | ||
method_types: | ||
- CREATE | ||
- UPDATE | ||
condition: resource.userManagedKeysConfig.clusterCa != "" && resource.userManagedKeysConfig.etcdApiCa != "" && resource.userManagedKeysConfig.etcdPeerCa != "" && resource.userManagedKeysConfig.aggregationCa != "" && resource.userManagedKeysConfig.controlPlaneDiskEncryptionKey != "" && resource.userManagedKeysConfig.gkeopsEtcdBackupEncryptionKey != "" && size(resource.userManagedKeysConfig.serviceAccountSigningKeys) != 0 && size(resource.userManagedKeysConfig.serviceAccountVerificationKeys) != 0 | ||
action_type: ALLOW | ||
display_name: GKE Control Plane Authority CMEK | ||
description: Only allow Clusters to be created and updated with GKE Control Plane Authority features, namely inputting the Cluster CA, etcd-API CA, etcd-peer CA, service account signing & verification key, etcd backup encryption key, and the control plane boot disk & etcd storage key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters