Skip to content

datarobot-community/terraform-provider-datarobot

Repository files navigation

Terraform provider for DataRobot (Preview)

terraform-provider-datarobot is the Terraform provider for the DataRobot API.

For information on developing terraform-provider-datarobot see DEVELOPMENT.md

Getting Started

Prerequisistes

Before you use terraform-provider-datarobot you must install Terraform and git on your local machine.

Run the Low-Code Monitored RAG Example

  1. 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:

  1. Ensure Go >= 1.16 is installed.

  2. Run cd terraform-provider-datarobot and then go mod tidy

  3. Run make install to build the provider locally.

Now you can continue with the Low Code RAG example:

  1. Go to the examples/workflows/low_code_rag directory.

    cd examples/workflows/low_code_rag
  2. 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 the DATAROBOT_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.

  3. 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.

  4. In a text editor create a new file terraform.tfvars in low_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.

  5. 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. The terraform.tfvars file sets the use case name.

  6. Create the Terraform plan. This shows the actions the provider will take, but won't perform them.

    terraform plan
  7. Create the resources.

    terraform apply

    Enter yes when prompted to apply the plan and create the resources.

  8. 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>"
  9. (optional) Delete the resources when you are done.

    terraform destroy

    Enter yes when prompted to delete the resources.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •