Configure providers
This topic assumes that you have completed the preparations.
Create a .tf file (for example, main.tf) in your Terraform project. Then, add the following code snippet to the .tf file:
terraform {
required_providers {
celerdatabyoc = {
source = "CelerData/celerdatabyoc"
version = "<provider_version>"
}
azuread = {
source = "hashicorp/azuread"
version = "2.47.0"
}
azurerm = {
source = "hashicorp/azurerm"
version = "=3.0.0"
}
}
}
provider "celerdatabyoc" {
client_id = "<client_id>"
client_secret = "<client_secret>"
}
locals {
cluster_region = "<Azure_region_ID>"
azure_region = "<Azure_region_name>"
}
The parameters you need to specify are as follows:
provider_version
: Enter the CelerData provider version of your choice. We recommend that you select the latest provider version. You can view the provider versions offered by CelerData Cloud BYOC from the CelerData Cloud BYOC provider page.client_id
andclient_secret
: Enter the Client ID and Secret of your application key or service account. See Authentication.cluster_region
andazure_region
: Enter the ID (for example,eastus
) and name (for example,East US
), respectively, of the Azure region in which you want your CelerData cluster to run. See Supported cloud platforms and regions. The Azure region you specify here must be the same as the Azure region of the resource group you create in Configure Azure objects. By setting these region elements as local values, you can then directly set the arguments for these region elements in your Terraform configuration tolocal.cluster_region
andlocal.azure_region
to save time.