terraform-provider-datarobot
is the Terraform provider for the DataRobot API.
For information on developing terraform-provider-datarobot
see DEVELOPMENT.md
Before you use terraform-provider-datarobot
you must install Terraform and git on your local machine.
-
In a terminal clone the
terraform-provider-datarobot
repository:git clone https://github.com/datarobot-community/terraform-provider-datarobot.git
Since the provider has not been published to the Terraform Registry yet, you must also:
-
Ensure Go >= 1.16 is installed.
-
Run
cd terraform-provider-datarobot
and thengo mod tidy
-
Run
make install
to build the provider locally.
Now you can continue with the Low Code RAG example:
-
Go to the
examples/workflows/low_code_rag
directory.cd examples/workflows/low_code_rag
-
The provider requires an API key set in an environment variable named
DATROBOT_API_TOKEN
. Copy the API key from the DataRobot console and create theDATAROBOT_API_TOKEN
environment variable.export DATAROBOT_API_TOKEN=<YOUR_API_KEY>
Where
<your API key>
is the API key you copied from the DataRobot Console. -
The example requires Google Cloud service account credentials in order to call the Google Vertex AI API. Follow this guide to create a service account key for your Google account.
-
In a text editor create a new file
terraform.tfvars
inlow_code_rag
with the following settings.use_case_name = "<use case name>" google_cloud_credential_source_file = "<source_file>"
Where:
-<use case name>
is the name of the use case you want to create. -<source file>
is the path to your Google Cloud service account key file. -
Initialize the provider.
terraform init
This reads the
main.tf
configuration file, which contains the information on how the provider will create the Datarobot resources. Theterraform.tfvars
file sets the use case name. -
Create the Terraform plan. This shows the actions the provider will take, but won't perform them.
terraform plan
-
Create the resources.
terraform apply
Enter
yes
when prompted to apply the plan and create the resources. -
Once the creation is complete, navigate to the
datarobot_qa_application_url
to view your Q&A application.Apply complete! Resources: 5 added, 0 changed, 0 destroyed. Outputs: datarobot_qa_application_url = "<your_qa_application_url>"
-
(optional) Delete the resources when you are done.
terraform destroy
Enter
yes
when prompted to delete the resources.