1. Packages
  2. Packages
  3. dbt Cloud Provider
  4. API Docs
  5. OpenaiIntegration
Viewing docs for dbt Cloud v1.8.1
published on Friday, May 8, 2026 by Pulumi
dbtcloud logo
Viewing docs for dbt Cloud v1.8.1
published on Friday, May 8, 2026 by Pulumi

    Manages a bring-your-own-key OpenAI integration for a dbt Cloud account, enabling AI-powered features such as dbt Copilot.

    Two key types are supported:

    • openai — your own OpenAI API key
    • azureOpenai — your own Azure OpenAI deployment

    Lifecycle note: dbt Cloud defaults to a dbt Labs-managed OpenAI key when no integration record exists. Creating this resource switches the account to a customer-managed key. Destroying it (or removing it from the Terraform config) deletes the record and automatically reverts the account to the dbt Labs-managed key — no additional steps are required.

    Secret handling: the API key is write-only and never returned after creation. Use keyValueWo with keyValueWoVersion (Terraform 1.11+) to keep the secret out of state entirely. Use keyValue for older Terraform versions — it is stored as a sensitive value in state.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    // Use a native OpenAI API key.
    // Recommended: write-only (Terraform 1.11+) — the key is never stored in state.
    const openai = new dbtcloud.OpenaiIntegration("openai", {
        keyType: "openai",
        keyValueWo: openaiApiKey,
        keyValueWoVersion: 1,
    });
    // For older Terraform versions, use key_value instead — stored as a sensitive value in state.
    // resource "dbtcloud_openai_integration" "openai" {
    //   key_type  = "openai"
    //   key_value = var.openai_api_key
    // }
    // Use an Azure OpenAI deployment.
    const azure = new dbtcloud.OpenaiIntegration("azure", {
        keyType: "azure_openai",
        keyValueWo: azureOpenaiApiKey,
        keyValueWoVersion: 1,
        azureEndpoint: "https://my-deployment.openai.azure.com/",
        azureDeploymentName: "gpt-4o",
        azureApiVersion: "2024-02-01",
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    # Use a native OpenAI API key.
    # Recommended: write-only (Terraform 1.11+) — the key is never stored in state.
    openai = dbtcloud.OpenaiIntegration("openai",
        key_type="openai",
        key_value_wo=openai_api_key,
        key_value_wo_version=1)
    # For older Terraform versions, use key_value instead — stored as a sensitive value in state.
    # resource "dbtcloud_openai_integration" "openai" {
    #   key_type  = "openai"
    #   key_value = var.openai_api_key
    # }
    # Use an Azure OpenAI deployment.
    azure = dbtcloud.OpenaiIntegration("azure",
        key_type="azure_openai",
        key_value_wo=azure_openai_api_key,
        key_value_wo_version=1,
        azure_endpoint="https://my-deployment.openai.azure.com/",
        azure_deployment_name="gpt-4o",
        azure_api_version="2024-02-01")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Use a native OpenAI API key.
    		// Recommended: write-only (Terraform 1.11+) — the key is never stored in state.
    		_, err := dbtcloud.NewOpenaiIntegration(ctx, "openai", &dbtcloud.OpenaiIntegrationArgs{
    			KeyType:           pulumi.String("openai"),
    			KeyValueWo:        pulumi.Any(openaiApiKey),
    			KeyValueWoVersion: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		// Use an Azure OpenAI deployment.
    		_, err = dbtcloud.NewOpenaiIntegration(ctx, "azure", &dbtcloud.OpenaiIntegrationArgs{
    			KeyType:             pulumi.String("azure_openai"),
    			KeyValueWo:          pulumi.Any(azureOpenaiApiKey),
    			KeyValueWoVersion:   pulumi.Int(1),
    			AzureEndpoint:       pulumi.String("https://my-deployment.openai.azure.com/"),
    			AzureDeploymentName: pulumi.String("gpt-4o"),
    			AzureApiVersion:     pulumi.String("2024-02-01"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Use a native OpenAI API key.
        // Recommended: write-only (Terraform 1.11+) — the key is never stored in state.
        var openai = new DbtCloud.Index.OpenaiIntegration("openai", new()
        {
            KeyType = "openai",
            KeyValueWo = openaiApiKey,
            KeyValueWoVersion = 1,
        });
    
        // For older Terraform versions, use key_value instead — stored as a sensitive value in state.
        // resource "dbtcloud_openai_integration" "openai" {
        //   key_type  = "openai"
        //   key_value = var.openai_api_key
        // }
        // Use an Azure OpenAI deployment.
        var azure = new DbtCloud.Index.OpenaiIntegration("azure", new()
        {
            KeyType = "azure_openai",
            KeyValueWo = azureOpenaiApiKey,
            KeyValueWoVersion = 1,
            AzureEndpoint = "https://my-deployment.openai.azure.com/",
            AzureDeploymentName = "gpt-4o",
            AzureApiVersion = "2024-02-01",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.OpenaiIntegration;
    import com.pulumi.dbtcloud.OpenaiIntegrationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Use a native OpenAI API key.
            // Recommended: write-only (Terraform 1.11+) — the key is never stored in state.
            var openai = new OpenaiIntegration("openai", OpenaiIntegrationArgs.builder()
                .keyType("openai")
                .keyValueWo(openaiApiKey)
                .keyValueWoVersion(1)
                .build());
    
            // For older Terraform versions, use key_value instead — stored as a sensitive value in state.
            // resource "dbtcloud_openai_integration" "openai" {
            //   key_type  = "openai"
            //   key_value = var.openai_api_key
            // }
            // Use an Azure OpenAI deployment.
            var azure = new OpenaiIntegration("azure", OpenaiIntegrationArgs.builder()
                .keyType("azure_openai")
                .keyValueWo(azureOpenaiApiKey)
                .keyValueWoVersion(1)
                .azureEndpoint("https://my-deployment.openai.azure.com/")
                .azureDeploymentName("gpt-4o")
                .azureApiVersion("2024-02-01")
                .build());
    
        }
    }
    
    resources:
      # Use a native OpenAI API key.
      # Recommended: write-only (Terraform 1.11+) — the key is never stored in state.
      openai: # For older Terraform versions, use key_value instead — stored as a sensitive value in state.
      # resource "dbtcloud_openai_integration" "openai" {
      #   key_type  = "openai"
      #   key_value = var.openai_api_key
      # }
        type: dbtcloud:OpenaiIntegration
        properties:
          keyType: openai
          keyValueWo: ${openaiApiKey}
          keyValueWoVersion: 1
      # Use an Azure OpenAI deployment.
      azure:
        type: dbtcloud:OpenaiIntegration
        properties:
          keyType: azure_openai
          keyValueWo: ${azureOpenaiApiKey}
          keyValueWoVersion: 1
          azureEndpoint: https://my-deployment.openai.azure.com/
          azureDeploymentName: gpt-4o
          azureApiVersion: 2024-02-01
    

    Create OpenaiIntegration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OpenaiIntegration(name: string, args: OpenaiIntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def OpenaiIntegration(resource_name: str,
                          args: OpenaiIntegrationArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def OpenaiIntegration(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          key_type: Optional[str] = None,
                          azure_api_version: Optional[str] = None,
                          azure_deployment_name: Optional[str] = None,
                          azure_endpoint: Optional[str] = None,
                          key_value: Optional[str] = None,
                          key_value_wo: Optional[str] = None,
                          key_value_wo_version: Optional[int] = None)
    func NewOpenaiIntegration(ctx *Context, name string, args OpenaiIntegrationArgs, opts ...ResourceOption) (*OpenaiIntegration, error)
    public OpenaiIntegration(string name, OpenaiIntegrationArgs args, CustomResourceOptions? opts = null)
    public OpenaiIntegration(String name, OpenaiIntegrationArgs args)
    public OpenaiIntegration(String name, OpenaiIntegrationArgs args, CustomResourceOptions options)
    
    type: dbtcloud:OpenaiIntegration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OpenaiIntegrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OpenaiIntegrationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OpenaiIntegrationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OpenaiIntegrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OpenaiIntegrationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var openaiIntegrationResource = new DbtCloud.OpenaiIntegration("openaiIntegrationResource", new()
    {
        KeyType = "string",
        AzureApiVersion = "string",
        AzureDeploymentName = "string",
        AzureEndpoint = "string",
        KeyValue = "string",
        KeyValueWo = "string",
        KeyValueWoVersion = 0,
    });
    
    example, err := dbtcloud.NewOpenaiIntegration(ctx, "openaiIntegrationResource", &dbtcloud.OpenaiIntegrationArgs{
    	KeyType:             pulumi.String("string"),
    	AzureApiVersion:     pulumi.String("string"),
    	AzureDeploymentName: pulumi.String("string"),
    	AzureEndpoint:       pulumi.String("string"),
    	KeyValue:            pulumi.String("string"),
    	KeyValueWo:          pulumi.String("string"),
    	KeyValueWoVersion:   pulumi.Int(0),
    })
    
    var openaiIntegrationResource = new OpenaiIntegration("openaiIntegrationResource", OpenaiIntegrationArgs.builder()
        .keyType("string")
        .azureApiVersion("string")
        .azureDeploymentName("string")
        .azureEndpoint("string")
        .keyValue("string")
        .keyValueWo("string")
        .keyValueWoVersion(0)
        .build());
    
    openai_integration_resource = dbtcloud.OpenaiIntegration("openaiIntegrationResource",
        key_type="string",
        azure_api_version="string",
        azure_deployment_name="string",
        azure_endpoint="string",
        key_value="string",
        key_value_wo="string",
        key_value_wo_version=0)
    
    const openaiIntegrationResource = new dbtcloud.OpenaiIntegration("openaiIntegrationResource", {
        keyType: "string",
        azureApiVersion: "string",
        azureDeploymentName: "string",
        azureEndpoint: "string",
        keyValue: "string",
        keyValueWo: "string",
        keyValueWoVersion: 0,
    });
    
    type: dbtcloud:OpenaiIntegration
    properties:
        azureApiVersion: string
        azureDeploymentName: string
        azureEndpoint: string
        keyType: string
        keyValue: string
        keyValueWo: string
        keyValueWoVersion: 0
    

    OpenaiIntegration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OpenaiIntegration resource accepts the following input properties:

    KeyType string
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    AzureApiVersion string
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureDeploymentName string
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureEndpoint string
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    KeyValue string
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    KeyValueWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    KeyValueWoVersion int
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    KeyType string
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    AzureApiVersion string
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureDeploymentName string
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureEndpoint string
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    KeyValue string
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    KeyValueWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    KeyValueWoVersion int
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    keyType String
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    azureApiVersion String
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureDeploymentName String
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureEndpoint String
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    keyValue String
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    keyValueWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    keyValueWoVersion Integer
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    keyType string
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    azureApiVersion string
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureDeploymentName string
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureEndpoint string
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    keyValue string
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    keyValueWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    keyValueWoVersion number
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    key_type str
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    azure_api_version str
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azure_deployment_name str
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azure_endpoint str
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    key_value str
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    key_value_wo str
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    key_value_wo_version int
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    keyType String
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    azureApiVersion String
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureDeploymentName String
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureEndpoint String
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    keyValue String
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    keyValueWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    keyValueWoVersion Number
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OpenaiIntegration resource produces the following output properties:

    AccountId int
    The ID of the dbt Cloud account.
    CreatedAt string
    Timestamp when the integration was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Timestamp when the integration was last updated.
    AccountId int
    The ID of the dbt Cloud account.
    CreatedAt string
    Timestamp when the integration was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Timestamp when the integration was last updated.
    accountId Integer
    The ID of the dbt Cloud account.
    createdAt String
    Timestamp when the integration was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Timestamp when the integration was last updated.
    accountId number
    The ID of the dbt Cloud account.
    createdAt string
    Timestamp when the integration was created.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    Timestamp when the integration was last updated.
    account_id int
    The ID of the dbt Cloud account.
    created_at str
    Timestamp when the integration was created.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    Timestamp when the integration was last updated.
    accountId Number
    The ID of the dbt Cloud account.
    createdAt String
    Timestamp when the integration was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Timestamp when the integration was last updated.

    Look up Existing OpenaiIntegration Resource

    Get an existing OpenaiIntegration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OpenaiIntegrationState, opts?: CustomResourceOptions): OpenaiIntegration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[int] = None,
            azure_api_version: Optional[str] = None,
            azure_deployment_name: Optional[str] = None,
            azure_endpoint: Optional[str] = None,
            created_at: Optional[str] = None,
            key_type: Optional[str] = None,
            key_value: Optional[str] = None,
            key_value_wo: Optional[str] = None,
            key_value_wo_version: Optional[int] = None,
            updated_at: Optional[str] = None) -> OpenaiIntegration
    func GetOpenaiIntegration(ctx *Context, name string, id IDInput, state *OpenaiIntegrationState, opts ...ResourceOption) (*OpenaiIntegration, error)
    public static OpenaiIntegration Get(string name, Input<string> id, OpenaiIntegrationState? state, CustomResourceOptions? opts = null)
    public static OpenaiIntegration get(String name, Output<String> id, OpenaiIntegrationState state, CustomResourceOptions options)
    resources:  _:    type: dbtcloud:OpenaiIntegration    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId int
    The ID of the dbt Cloud account.
    AzureApiVersion string
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureDeploymentName string
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureEndpoint string
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    CreatedAt string
    Timestamp when the integration was created.
    KeyType string
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    KeyValue string
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    KeyValueWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    KeyValueWoVersion int
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    UpdatedAt string
    Timestamp when the integration was last updated.
    AccountId int
    The ID of the dbt Cloud account.
    AzureApiVersion string
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureDeploymentName string
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    AzureEndpoint string
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    CreatedAt string
    Timestamp when the integration was created.
    KeyType string
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    KeyValue string
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    KeyValueWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    KeyValueWoVersion int
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    UpdatedAt string
    Timestamp when the integration was last updated.
    accountId Integer
    The ID of the dbt Cloud account.
    azureApiVersion String
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureDeploymentName String
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureEndpoint String
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    createdAt String
    Timestamp when the integration was created.
    keyType String
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    keyValue String
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    keyValueWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    keyValueWoVersion Integer
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    updatedAt String
    Timestamp when the integration was last updated.
    accountId number
    The ID of the dbt Cloud account.
    azureApiVersion string
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureDeploymentName string
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureEndpoint string
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    createdAt string
    Timestamp when the integration was created.
    keyType string
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    keyValue string
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    keyValueWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    keyValueWoVersion number
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    updatedAt string
    Timestamp when the integration was last updated.
    account_id int
    The ID of the dbt Cloud account.
    azure_api_version str
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azure_deployment_name str
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azure_endpoint str
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    created_at str
    Timestamp when the integration was created.
    key_type str
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    key_value str
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    key_value_wo str
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    key_value_wo_version int
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    updated_at str
    Timestamp when the integration was last updated.
    accountId Number
    The ID of the dbt Cloud account.
    azureApiVersion String
    The Azure OpenAI API version (e.g. ~~~2024-02-01~~~). Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureDeploymentName String
    The Azure OpenAI deployment name. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    azureEndpoint String
    The Azure OpenAI endpoint URL. Required when ~~~keytype~~~ is ~~~azureopenai~~~.
    createdAt String
    Timestamp when the integration was created.
    keyType String
    The type of OpenAI key. One of: ~~~openai~~~, ~~~azure_openai~~~. To revert to the dbt Labs-managed key, destroy this resource.
    keyValue String
    The OpenAI or Azure OpenAI API key. Stored as a sensitive value in Terraform state. Conflicts with ~~~keyvaluewo~~~. For Terraform 1.11+, prefer ~~~keyvaluewo~~~ to avoid storing secrets in state.
    keyValueWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only variant of the API key (Terraform 1.11+). Never stored in state. Increment ~~~keyvaluewoversion~~~ to rotate the key. Conflicts with ~~~keyvalue~~~.
    keyValueWoVersion Number
    Increment this value to rotate the key when using ~~~keyvaluewo~~~.
    updatedAt String
    Timestamp when the integration was last updated.

    Import

    Import an existing OpenAI integration by its numeric ID. Note: keyValue will be absent after import — the API never returns it. Use keyValueWo or keyValueWoVersion to manage the key going forward.

    $ pulumi import dbtcloud:index/openaiIntegration:OpenaiIntegration openai 12345
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    dbtcloud pulumi/pulumi-dbtcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dbtcloud Terraform Provider.
    dbtcloud logo
    Viewing docs for dbt Cloud v1.8.1
    published on Friday, May 8, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.