To add credentials for the supported providers you need to go to the cloud providers configuration menu where you can see the list of the supported providers.
There are two main configurations that are common for all terraform providers:
Credentials specific credentials needed to access the cloud provider
Scope the scope in Brainboard where you are going to use the provider. It might be at the organizational/project/environment/architecture level.
After selecting one of the providers, you can click on the + button on the right and open the configuration for the provider.
Azure RM
To configure the Azure provider (AzureRM) for Terraform, you have to specify the appropriate credentials and the subscription in which you want to create resources.
Here are the steps to configure the Azure provider:
Create a service principal in Azure Active Directory (AAD) with the "Contributor" role. This service principal will be used to authenticate the Terraform Azure Provider to Azure. You can create the service principal using the Azure CLI, Azure PowerShell, or the Azure Portal.
Once you have the service principal created, you will need to get the following information from it:
subscription_id
client_id
tenant_id
client_secret
Next, you need to add the information in the AzureRM configuration below:
Generate Azure credentials for Terraform
To generate Azure credentials for use with Terraform, you can use the Azure Portal.
Go to the Azure portal and navigate to the Azure Active Directory section
Select App registrations and then click on New registration
Give a name to your app and select the appropriate account type (single or multi-tenant)
After creating the app, go to Certificates & secrets and create a new client secret
Go to the Subscription's Access control (IAM) to add a new role assignment
Assign the appropriate role (e.g. Contributor) to the app created above
Tips:
ARM SUBSCRIPTION ID: you will find it in the Subscription's Overview
ARM CLIENT ID: you will find it in the App registrations' Overview with the name Application (client) ID
ARM TENANT ID: you will find it in the App registrations' Overview with the name Directory (tenant) ID
ARM CLIENT SECRET: you will find it in the App registrations' Certificates & secrets, you must copy the client secret Value (not the Secret ID).
AWS
To configure the AWS provider for Terraform, you will have to specify the name and the appropriate credentials as below :
Generate AWS credentials for Terraform
To generate AWS credentials for use with Terraform, you can use the AWS Management Console.
Log in to the AWS Management Console
Go to the IAM (Identity and Access Management) service
Select Users from the navigation menu
Click on the "Add user" button
Enter a username, select "Programmatic access" for the access type, and then click on "Next: Permissions"
Select "Attach existing policies directly" and then choose the appropriate permissions for the user (e.g. "AdministratorAccess" or "IAMFullAccess")
Click on "Next: Tags" (if desired) and then "Next: Review"
Click on "Create user" to create the user
On the "Success" page, click on the "Download .csv" button to download the credentials
GCP
To configure the GCP (Google Cloud Platform) provider for Terraform, you will have to specify the appropriate credentials and the project in which you want to create resources.
Generate GCP credentials for Terraform
To generate GCP credentials for Terraform, you will need to create a service account in the Google Cloud Console. Here are the steps to generate GCP credentials:
Go to the Google Cloud Console (https://console.cloud.google.com) and select your project.
In the navigation menu, click on the hamburger icon (≡) and then select "IAM & admin" and then "Service accounts"
Click on the "Create Service Account" button.
In the "Create service account" form, give a name to the service account and provide a brief description.
Under "Role", select the role that you want to assign to the service account. This role will determine the actions that Terraform can perform with the service account.
Click on "Create" to create the service account.
Once the service account is created, you will see the option to create a key. Select "JSON" as the key type and click on "Create"
The JSON key file will be downloaded to your local machine. This file contains the credentials for the service account and it should be kept secure.
Once you have the JSON key file, you can use it to authenticate the Terraform GCP Provider to GCP.
Once you have the service account created, you will have to get the following information from it:
project_id
credentials file
OCI
To configure the Oracle Cloud Infrastructure (OCI) provider in Terraform, you will need to specify the information in the OCI configuration as below and set the appropriate variables.
The tenancy_ocid variable specifies the OCID of the tenancy that you want to use. You can find your tenancy OCID in the Oracle Cloud Infrastructure Console under the "Tenancy Information" section.
The user_ocid variable specifies the OCID of the user to use. You can find your user OCID in the Oracle Cloud Infrastructure Console under the "User Settings" section.
The fingerprint variable specifies the fingerprint of the public key that you have added to your user. You can find your public key fingerprint in the Oracle Cloud Infrastructure Console under the "User Settings" section.
The private_key_path variable specifies the path to the private key file that corresponds to the public key that you have added to your user. This private key will be used to sign the requests to the OCI API.
Generate OCI credentials for Terraform
To generate Oracle Cloud Infrastructure (OCI) credentials for use with Terraform, you can use the OCI Console or the OCI CLI.
Using OCI Console:
Log in to the OCI Console
Go to the Identity service
Select Users from the navigation menu
Click on the "Create User" button
Enter a username, select "Programmatic" for the access type and then click on "Create"
Click on the username of the user you just created
Click on the "Create API Key" button
Click on the "Download" button to download the private key in PEM format
Scaleway
To configure the Scaleway provider in Terraform, you will need to specify the provider block in your Terraform configuration file and set the appropriate variables.
Name
Scaleway Access Key
Scaleway Secret Key
To generate access and secret keys in Scaleway, you will need to create an API token in the Scaleway console.
Generate Scaleway credentials for Terraform
Here are the steps to generate access key and secret key in Scaleway:
Go to the Scaleway console (https://console.scaleway.com) and sign in.
In the navigation menu, click on "Account" and then "API Tokens"
Click on the "Create a token" button.
In the "Create an API Token" form, give a name to the token and provide a brief description.
Under "Rights" select the rights that you want to assign to the token. These rights will determine the actions that can be performed by the token.
Click on "Create" to create the token.
Once the token is created, you will see the option to "Show the token". This is the only time the token will be displayed.
Once you have the token, you can use it as an access key.
You can also assign or revoke rights to the token by clicking on the pencil icon next to the token.
Scaleway does not provide a secret key. Instead, it uses the token generated as the access key and no separate secret key is required.