From a53d517d7e8b9a28fa1ee022899d1c07d76c6802 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 7 May 2022 16:06:20 -0700 Subject: docs: some documentation --- docs/gcloud.org | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/gcloud.org (limited to 'docs') diff --git a/docs/gcloud.org b/docs/gcloud.org new file mode 100644 index 0000000..95e7531 --- /dev/null +++ b/docs/gcloud.org @@ -0,0 +1,21 @@ +#+TITLE: Gcloud + +* Initial setup +First we need to create a service account, with: +#+begin_src sh +gcloud --project fcuny-homelab iam service-accounts create world-nix +#+end_src + +Next we need to bind the new policy: +#+begin_src sh +gcloud projects add-iam-policy-binding fcuny-homelab --member="serviceAccount:world-nix@fcuny-homelab.iam.gserviceaccount.com" --role="roles/accessapproval.configEditor" +#+end_src + +Note: I had to add DNS administrator in the console, I don't know what I need to add to this command. + +Finally we need the key: +#+begin_src sh +gcloud iam service-accounts keys create world-nix.json --iam-account=world-nix@fcuny-homelab.iam.gserviceaccount.com +#+end_src + +This will create a file name =world-nix.json=. It's best to encrypt it with =age= and move it under the =secrets= directory for a host. -- cgit 1.4.1