terraform-provider-datarobot

command module
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

README

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.

Documentation

Overview

Copyright 2024 DataRobot, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
internal
Package mock_client is a generated GoMock package.
Package mock_client is a generated GoMock package.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL