1. Packages
  2. Dbtcloud Provider
  3. API Docs
  4. FabricCredential
dbt Cloud v0.1.25 published on Friday, Nov 8, 2024 by Pulumi

dbtcloud.FabricCredential

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.25 published on Friday, Nov 8, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    // when using AD authentication
    const myFabricCredAd = new dbtcloud.FabricCredential("my_fabric_cred_ad", {
        projectId: dbtProject.id,
        adapterId: myFabricConnection.adapterId,
        schema: "my_schema",
        user: "my_user",
        password: "my_password",
        schemaAuthorization: "abcd",
    });
    // when using service principal authentication
    const myFabricCredServPrinc = new dbtcloud.FabricCredential("my_fabric_cred_serv_princ", {
        projectId: dbtProject.id,
        adapterId: myFabricConnection.adapterId,
        schema: "my_schema",
        clientId: "my_client_id",
        tenantId: "my_tenant_id",
        clientSecret: "my_secret",
        schemaAuthorization: "abcd",
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    # when using AD authentication
    my_fabric_cred_ad = dbtcloud.FabricCredential("my_fabric_cred_ad",
        project_id=dbt_project["id"],
        adapter_id=my_fabric_connection["adapterId"],
        schema="my_schema",
        user="my_user",
        password="my_password",
        schema_authorization="abcd")
    # when using service principal authentication
    my_fabric_cred_serv_princ = dbtcloud.FabricCredential("my_fabric_cred_serv_princ",
        project_id=dbt_project["id"],
        adapter_id=my_fabric_connection["adapterId"],
        schema="my_schema",
        client_id="my_client_id",
        tenant_id="my_tenant_id",
        client_secret="my_secret",
        schema_authorization="abcd")
    
    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 {
    		// when using AD authentication
    		_, err := dbtcloud.NewFabricCredential(ctx, "my_fabric_cred_ad", &dbtcloud.FabricCredentialArgs{
    			ProjectId:           pulumi.Any(dbtProject.Id),
    			AdapterId:           pulumi.Any(myFabricConnection.AdapterId),
    			Schema:              pulumi.String("my_schema"),
    			User:                pulumi.String("my_user"),
    			Password:            pulumi.String("my_password"),
    			SchemaAuthorization: pulumi.String("abcd"),
    		})
    		if err != nil {
    			return err
    		}
    		// when using service principal authentication
    		_, err = dbtcloud.NewFabricCredential(ctx, "my_fabric_cred_serv_princ", &dbtcloud.FabricCredentialArgs{
    			ProjectId:           pulumi.Any(dbtProject.Id),
    			AdapterId:           pulumi.Any(myFabricConnection.AdapterId),
    			Schema:              pulumi.String("my_schema"),
    			ClientId:            pulumi.String("my_client_id"),
    			TenantId:            pulumi.String("my_tenant_id"),
    			ClientSecret:        pulumi.String("my_secret"),
    			SchemaAuthorization: pulumi.String("abcd"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // when using AD authentication
        var myFabricCredAd = new DbtCloud.FabricCredential("my_fabric_cred_ad", new()
        {
            ProjectId = dbtProject.Id,
            AdapterId = myFabricConnection.AdapterId,
            Schema = "my_schema",
            User = "my_user",
            Password = "my_password",
            SchemaAuthorization = "abcd",
        });
    
        // when using service principal authentication
        var myFabricCredServPrinc = new DbtCloud.FabricCredential("my_fabric_cred_serv_princ", new()
        {
            ProjectId = dbtProject.Id,
            AdapterId = myFabricConnection.AdapterId,
            Schema = "my_schema",
            ClientId = "my_client_id",
            TenantId = "my_tenant_id",
            ClientSecret = "my_secret",
            SchemaAuthorization = "abcd",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.FabricCredential;
    import com.pulumi.dbtcloud.FabricCredentialArgs;
    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) {
            // when using AD authentication
            var myFabricCredAd = new FabricCredential("myFabricCredAd", FabricCredentialArgs.builder()
                .projectId(dbtProject.id())
                .adapterId(myFabricConnection.adapterId())
                .schema("my_schema")
                .user("my_user")
                .password("my_password")
                .schemaAuthorization("abcd")
                .build());
    
            // when using service principal authentication
            var myFabricCredServPrinc = new FabricCredential("myFabricCredServPrinc", FabricCredentialArgs.builder()
                .projectId(dbtProject.id())
                .adapterId(myFabricConnection.adapterId())
                .schema("my_schema")
                .clientId("my_client_id")
                .tenantId("my_tenant_id")
                .clientSecret("my_secret")
                .schemaAuthorization("abcd")
                .build());
    
        }
    }
    
    resources:
      # when using AD authentication
      myFabricCredAd:
        type: dbtcloud:FabricCredential
        name: my_fabric_cred_ad
        properties:
          projectId: ${dbtProject.id}
          adapterId: ${myFabricConnection.adapterId}
          schema: my_schema
          user: my_user
          password: my_password
          schemaAuthorization: abcd
      # when using service principal authentication
      myFabricCredServPrinc:
        type: dbtcloud:FabricCredential
        name: my_fabric_cred_serv_princ
        properties:
          projectId: ${dbtProject.id}
          adapterId: ${myFabricConnection.adapterId}
          schema: my_schema
          clientId: my_client_id
          tenantId: my_tenant_id
          clientSecret: my_secret
          schemaAuthorization: abcd
    

    Create FabricCredential Resource

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

    Constructor syntax

    new FabricCredential(name: string, args: FabricCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def FabricCredential(resource_name: str,
                         args: FabricCredentialArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def FabricCredential(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         adapter_id: Optional[int] = None,
                         project_id: Optional[int] = None,
                         schema: Optional[str] = None,
                         client_id: Optional[str] = None,
                         client_secret: Optional[str] = None,
                         password: Optional[str] = None,
                         schema_authorization: Optional[str] = None,
                         tenant_id: Optional[str] = None,
                         user: Optional[str] = None)
    func NewFabricCredential(ctx *Context, name string, args FabricCredentialArgs, opts ...ResourceOption) (*FabricCredential, error)
    public FabricCredential(string name, FabricCredentialArgs args, CustomResourceOptions? opts = null)
    public FabricCredential(String name, FabricCredentialArgs args)
    public FabricCredential(String name, FabricCredentialArgs args, CustomResourceOptions options)
    
    type: dbtcloud:FabricCredential
    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 FabricCredentialArgs
    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 FabricCredentialArgs
    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 FabricCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FabricCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FabricCredentialArgs
    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 fabricCredentialResource = new DbtCloud.FabricCredential("fabricCredentialResource", new()
    {
        AdapterId = 0,
        ProjectId = 0,
        Schema = "string",
        ClientId = "string",
        ClientSecret = "string",
        Password = "string",
        SchemaAuthorization = "string",
        TenantId = "string",
        User = "string",
    });
    
    example, err := dbtcloud.NewFabricCredential(ctx, "fabricCredentialResource", &dbtcloud.FabricCredentialArgs{
    	AdapterId:           pulumi.Int(0),
    	ProjectId:           pulumi.Int(0),
    	Schema:              pulumi.String("string"),
    	ClientId:            pulumi.String("string"),
    	ClientSecret:        pulumi.String("string"),
    	Password:            pulumi.String("string"),
    	SchemaAuthorization: pulumi.String("string"),
    	TenantId:            pulumi.String("string"),
    	User:                pulumi.String("string"),
    })
    
    var fabricCredentialResource = new FabricCredential("fabricCredentialResource", FabricCredentialArgs.builder()
        .adapterId(0)
        .projectId(0)
        .schema("string")
        .clientId("string")
        .clientSecret("string")
        .password("string")
        .schemaAuthorization("string")
        .tenantId("string")
        .user("string")
        .build());
    
    fabric_credential_resource = dbtcloud.FabricCredential("fabricCredentialResource",
        adapter_id=0,
        project_id=0,
        schema="string",
        client_id="string",
        client_secret="string",
        password="string",
        schema_authorization="string",
        tenant_id="string",
        user="string")
    
    const fabricCredentialResource = new dbtcloud.FabricCredential("fabricCredentialResource", {
        adapterId: 0,
        projectId: 0,
        schema: "string",
        clientId: "string",
        clientSecret: "string",
        password: "string",
        schemaAuthorization: "string",
        tenantId: "string",
        user: "string",
    });
    
    type: dbtcloud:FabricCredential
    properties:
        adapterId: 0
        clientId: string
        clientSecret: string
        password: string
        projectId: 0
        schema: string
        schemaAuthorization: string
        tenantId: string
        user: string
    

    FabricCredential 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 FabricCredential resource accepts the following input properties:

    AdapterId int
    Fabric adapter ID for the credential
    ProjectId int
    Project ID to create the Fabric credential in
    Schema string
    The schema where to create the dbt models
    ClientId string
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    ClientSecret string
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    Password string
    The password for the account to connect to. Only used when connection with AD user/pass
    SchemaAuthorization string
    Optionally set this to the principal who should own the schemas created by dbt
    TenantId string
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    User string
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    AdapterId int
    Fabric adapter ID for the credential
    ProjectId int
    Project ID to create the Fabric credential in
    Schema string
    The schema where to create the dbt models
    ClientId string
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    ClientSecret string
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    Password string
    The password for the account to connect to. Only used when connection with AD user/pass
    SchemaAuthorization string
    Optionally set this to the principal who should own the schemas created by dbt
    TenantId string
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    User string
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapterId Integer
    Fabric adapter ID for the credential
    projectId Integer
    Project ID to create the Fabric credential in
    schema String
    The schema where to create the dbt models
    clientId String
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    clientSecret String
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    password String
    The password for the account to connect to. Only used when connection with AD user/pass
    schemaAuthorization String
    Optionally set this to the principal who should own the schemas created by dbt
    tenantId String
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user String
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapterId number
    Fabric adapter ID for the credential
    projectId number
    Project ID to create the Fabric credential in
    schema string
    The schema where to create the dbt models
    clientId string
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    clientSecret string
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    password string
    The password for the account to connect to. Only used when connection with AD user/pass
    schemaAuthorization string
    Optionally set this to the principal who should own the schemas created by dbt
    tenantId string
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user string
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapter_id int
    Fabric adapter ID for the credential
    project_id int
    Project ID to create the Fabric credential in
    schema str
    The schema where to create the dbt models
    client_id str
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    client_secret str
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    password str
    The password for the account to connect to. Only used when connection with AD user/pass
    schema_authorization str
    Optionally set this to the principal who should own the schemas created by dbt
    tenant_id str
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user str
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapterId Number
    Fabric adapter ID for the credential
    projectId Number
    Project ID to create the Fabric credential in
    schema String
    The schema where to create the dbt models
    clientId String
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    clientSecret String
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    password String
    The password for the account to connect to. Only used when connection with AD user/pass
    schemaAuthorization String
    Optionally set this to the principal who should own the schemas created by dbt
    tenantId String
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user String
    The username of the Fabric account to connect to. Only used when connection with AD user/pass

    Outputs

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

    CredentialId int
    The system Fabric credential ID
    Id string
    The provider-assigned unique ID for this managed resource.
    CredentialId int
    The system Fabric credential ID
    Id string
    The provider-assigned unique ID for this managed resource.
    credentialId Integer
    The system Fabric credential ID
    id String
    The provider-assigned unique ID for this managed resource.
    credentialId number
    The system Fabric credential ID
    id string
    The provider-assigned unique ID for this managed resource.
    credential_id int
    The system Fabric credential ID
    id str
    The provider-assigned unique ID for this managed resource.
    credentialId Number
    The system Fabric credential ID
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing FabricCredential Resource

    Get an existing FabricCredential 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?: FabricCredentialState, opts?: CustomResourceOptions): FabricCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            adapter_id: Optional[int] = None,
            client_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            credential_id: Optional[int] = None,
            password: Optional[str] = None,
            project_id: Optional[int] = None,
            schema: Optional[str] = None,
            schema_authorization: Optional[str] = None,
            tenant_id: Optional[str] = None,
            user: Optional[str] = None) -> FabricCredential
    func GetFabricCredential(ctx *Context, name string, id IDInput, state *FabricCredentialState, opts ...ResourceOption) (*FabricCredential, error)
    public static FabricCredential Get(string name, Input<string> id, FabricCredentialState? state, CustomResourceOptions? opts = null)
    public static FabricCredential get(String name, Output<String> id, FabricCredentialState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    AdapterId int
    Fabric adapter ID for the credential
    ClientId string
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    ClientSecret string
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    CredentialId int
    The system Fabric credential ID
    Password string
    The password for the account to connect to. Only used when connection with AD user/pass
    ProjectId int
    Project ID to create the Fabric credential in
    Schema string
    The schema where to create the dbt models
    SchemaAuthorization string
    Optionally set this to the principal who should own the schemas created by dbt
    TenantId string
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    User string
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    AdapterId int
    Fabric adapter ID for the credential
    ClientId string
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    ClientSecret string
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    CredentialId int
    The system Fabric credential ID
    Password string
    The password for the account to connect to. Only used when connection with AD user/pass
    ProjectId int
    Project ID to create the Fabric credential in
    Schema string
    The schema where to create the dbt models
    SchemaAuthorization string
    Optionally set this to the principal who should own the schemas created by dbt
    TenantId string
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    User string
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapterId Integer
    Fabric adapter ID for the credential
    clientId String
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    clientSecret String
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    credentialId Integer
    The system Fabric credential ID
    password String
    The password for the account to connect to. Only used when connection with AD user/pass
    projectId Integer
    Project ID to create the Fabric credential in
    schema String
    The schema where to create the dbt models
    schemaAuthorization String
    Optionally set this to the principal who should own the schemas created by dbt
    tenantId String
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user String
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapterId number
    Fabric adapter ID for the credential
    clientId string
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    clientSecret string
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    credentialId number
    The system Fabric credential ID
    password string
    The password for the account to connect to. Only used when connection with AD user/pass
    projectId number
    Project ID to create the Fabric credential in
    schema string
    The schema where to create the dbt models
    schemaAuthorization string
    Optionally set this to the principal who should own the schemas created by dbt
    tenantId string
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user string
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapter_id int
    Fabric adapter ID for the credential
    client_id str
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    client_secret str
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    credential_id int
    The system Fabric credential ID
    password str
    The password for the account to connect to. Only used when connection with AD user/pass
    project_id int
    Project ID to create the Fabric credential in
    schema str
    The schema where to create the dbt models
    schema_authorization str
    Optionally set this to the principal who should own the schemas created by dbt
    tenant_id str
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user str
    The username of the Fabric account to connect to. Only used when connection with AD user/pass
    adapterId Number
    Fabric adapter ID for the credential
    clientId String
    The client ID of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    clientSecret String
    The client secret of the Azure Active Directory service principal. This is only used when connecting to Azure SQL with an AAD service principal.
    credentialId Number
    The system Fabric credential ID
    password String
    The password for the account to connect to. Only used when connection with AD user/pass
    projectId Number
    Project ID to create the Fabric credential in
    schema String
    The schema where to create the dbt models
    schemaAuthorization String
    Optionally set this to the principal who should own the schemas created by dbt
    tenantId String
    The tenant ID of the Azure Active Directory instance. This is only used when connecting to Azure SQL with a service principal.
    user String
    The username of the Fabric account to connect to. Only used when connection with AD user/pass

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_fabric_credential.my_fabric_credential

    id = “project_id:credential_id”

    }

    import {

    to = dbtcloud_fabric_credential.my_fabric_credential

    id = “12345:6789”

    }

    using the older import command

    $ pulumi import dbtcloud:index/fabricCredential:FabricCredential my_fabric_credential "project_id:credential_id"
    
    $ pulumi import dbtcloud:index/fabricCredential:FabricCredential my_fabric_credential 12345:6789
    

    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
    dbt Cloud v0.1.25 published on Friday, Nov 8, 2024 by Pulumi