From 00b16a37636225ec5d12fc268ed0ffbe0083bd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Sat, 17 Jun 2023 19:19:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20Add=20documentation=20for=20clou?= =?UTF-8?q?d=20credentials?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare-labs/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/prepare-labs/README.md b/prepare-labs/README.md index 90d9da792..bfa33ccb7 100644 --- a/prepare-labs/README.md +++ b/prepare-labs/README.md @@ -59,6 +59,27 @@ You don't **have to** install the CLI tools of the cloud provider(s) that you wa If you want to provide your cloud credentials through other means, you will have to adjust the Terraform configuration files in `terraform/provider-config` accordingly. +Here is where we look for credentials for each provider: + +- AWS: Terraform defaults; see [AWS provider documentation][creds-aws] (for instance, you can use the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables, or AWS config and profile files) +- Azure: Terraform defaults; see [AzureRM provider documentation][creds-azure] (typically, you can authenticate with the `az` CLI and Terraform will pick it up automatically) +- Civo: CLI configuration file (`~/.civo.json`) +- Digital Ocean: CLI configuration file (`~/.config/doctl/config.yaml`) +- Exoscale: CLI configuration file (`~/.config/exoscale/exoscale.toml`) +- Google Cloud: FIXME, note that the project name is currently hard-coded to `prepare-tf` +- Hetzner: CLI configuration file (`~/.config/hcloud/cli.toml`) +- Linode: CLI configuration file (`~/.config/linode-cli`) +- OpenStack: you will need to write a tfvars file (check [that exemple](terraform/virtual-machines/tfvars.example)) +- Oracle: Terraform defaults; see [OCI provider documentation][creds-oci] (for instance, you can set up API keys; or you can use a short-lived token generated by the OCI CLI with `oci session authenticate`) +- OVH: Terraform defaults; see [OVH provider documentation][creds-ovh] (this typically involves setting up 5 `OVH_...` environment variables) +- Scaleway: Terraform defaults; see [Scaleway provider documentation][creds-scw] (for instance, you can set environment variables, but it will also automatically pick up CLI authentication from `~/.config/scw/config.yaml`) + +[creds-aws]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration +[creds-azure]: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#authenticating-to-azure +[creds-oci]: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformproviderconfiguration.htm#authentication +[creds-ovh]: https://registry.terraform.io/providers/ovh/ovh/latest/docs#provider-configuration +[creds-scw]: https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication + ## General Workflow - fork/clone repo