1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. PostgresSemanticLayerCredential
dbt Cloud v1.0.2 published on Tuesday, Jun 24, 2025 by Pulumi

dbtcloud.PostgresSemanticLayerCredential

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v1.0.2 published on Tuesday, Jun 24, 2025 by Pulumi

    Postgres credential resource. This resource is composed of a Postgres credential and a Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      testPostgresSemanticLayerCredential:
        type: dbtcloud:PostgresSemanticLayerCredential
        name: test_postgres_semantic_layer_credential
        properties:
          configuration:
            project_id: ${projectId}
            name: Postgres SL Credential
            adapter_version: postgres_v0
          credential:
            project_id: ${projectId}
            username: ${username}
            password: ${password}
            semantic_layer_credential: true
    

    Create PostgresSemanticLayerCredential Resource

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

    Constructor syntax

    new PostgresSemanticLayerCredential(name: string, args: PostgresSemanticLayerCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresSemanticLayerCredential(resource_name: str,
                                        args: PostgresSemanticLayerCredentialArgs,
                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresSemanticLayerCredential(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        configuration: Optional[PostgresSemanticLayerCredentialConfigurationArgs] = None,
                                        credential: Optional[PostgresSemanticLayerCredentialCredentialArgs] = None)
    func NewPostgresSemanticLayerCredential(ctx *Context, name string, args PostgresSemanticLayerCredentialArgs, opts ...ResourceOption) (*PostgresSemanticLayerCredential, error)
    public PostgresSemanticLayerCredential(string name, PostgresSemanticLayerCredentialArgs args, CustomResourceOptions? opts = null)
    public PostgresSemanticLayerCredential(String name, PostgresSemanticLayerCredentialArgs args)
    public PostgresSemanticLayerCredential(String name, PostgresSemanticLayerCredentialArgs args, CustomResourceOptions options)
    
    type: dbtcloud:PostgresSemanticLayerCredential
    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 PostgresSemanticLayerCredentialArgs
    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 PostgresSemanticLayerCredentialArgs
    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 PostgresSemanticLayerCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresSemanticLayerCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresSemanticLayerCredentialArgs
    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 postgresSemanticLayerCredentialResource = new DbtCloud.PostgresSemanticLayerCredential("postgresSemanticLayerCredentialResource", new()
    {
        Configuration = new DbtCloud.Inputs.PostgresSemanticLayerCredentialConfigurationArgs
        {
            AdapterVersion = "string",
            Name = "string",
            ProjectId = 0,
        },
        Credential = new DbtCloud.Inputs.PostgresSemanticLayerCredentialCredentialArgs
        {
            ProjectId = 0,
            Username = "string",
            CredentialId = 0,
            DefaultSchema = "string",
            Id = "string",
            IsActive = false,
            NumThreads = 0,
            Password = "string",
            SemanticLayerCredential = false,
            TargetName = "string",
            Type = "string",
        },
    });
    
    example, err := dbtcloud.NewPostgresSemanticLayerCredential(ctx, "postgresSemanticLayerCredentialResource", &dbtcloud.PostgresSemanticLayerCredentialArgs{
    	Configuration: &dbtcloud.PostgresSemanticLayerCredentialConfigurationArgs{
    		AdapterVersion: pulumi.String("string"),
    		Name:           pulumi.String("string"),
    		ProjectId:      pulumi.Int(0),
    	},
    	Credential: &dbtcloud.PostgresSemanticLayerCredentialCredentialArgs{
    		ProjectId:               pulumi.Int(0),
    		Username:                pulumi.String("string"),
    		CredentialId:            pulumi.Int(0),
    		DefaultSchema:           pulumi.String("string"),
    		Id:                      pulumi.String("string"),
    		IsActive:                pulumi.Bool(false),
    		NumThreads:              pulumi.Int(0),
    		Password:                pulumi.String("string"),
    		SemanticLayerCredential: pulumi.Bool(false),
    		TargetName:              pulumi.String("string"),
    		Type:                    pulumi.String("string"),
    	},
    })
    
    var postgresSemanticLayerCredentialResource = new PostgresSemanticLayerCredential("postgresSemanticLayerCredentialResource", PostgresSemanticLayerCredentialArgs.builder()
        .configuration(PostgresSemanticLayerCredentialConfigurationArgs.builder()
            .adapterVersion("string")
            .name("string")
            .projectId(0)
            .build())
        .credential(PostgresSemanticLayerCredentialCredentialArgs.builder()
            .projectId(0)
            .username("string")
            .credentialId(0)
            .defaultSchema("string")
            .id("string")
            .isActive(false)
            .numThreads(0)
            .password("string")
            .semanticLayerCredential(false)
            .targetName("string")
            .type("string")
            .build())
        .build());
    
    postgres_semantic_layer_credential_resource = dbtcloud.PostgresSemanticLayerCredential("postgresSemanticLayerCredentialResource",
        configuration={
            "adapter_version": "string",
            "name": "string",
            "project_id": 0,
        },
        credential={
            "project_id": 0,
            "username": "string",
            "credential_id": 0,
            "default_schema": "string",
            "id": "string",
            "is_active": False,
            "num_threads": 0,
            "password": "string",
            "semantic_layer_credential": False,
            "target_name": "string",
            "type": "string",
        })
    
    const postgresSemanticLayerCredentialResource = new dbtcloud.PostgresSemanticLayerCredential("postgresSemanticLayerCredentialResource", {
        configuration: {
            adapterVersion: "string",
            name: "string",
            projectId: 0,
        },
        credential: {
            projectId: 0,
            username: "string",
            credentialId: 0,
            defaultSchema: "string",
            id: "string",
            isActive: false,
            numThreads: 0,
            password: "string",
            semanticLayerCredential: false,
            targetName: "string",
            type: "string",
        },
    });
    
    type: dbtcloud:PostgresSemanticLayerCredential
    properties:
        configuration:
            adapterVersion: string
            name: string
            projectId: 0
        credential:
            credentialId: 0
            defaultSchema: string
            id: string
            isActive: false
            numThreads: 0
            password: string
            projectId: 0
            semanticLayerCredential: false
            targetName: string
            type: string
            username: string
    

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

    Configuration Pulumi.DbtCloud.Inputs.PostgresSemanticLayerCredentialConfiguration
    Semantic Layer credential configuration details.
    Credential Pulumi.DbtCloud.Inputs.PostgresSemanticLayerCredentialCredential
    Postgres credential details, but used in the context of the Semantic Layer.
    Configuration PostgresSemanticLayerCredentialConfigurationArgs
    Semantic Layer credential configuration details.
    Credential PostgresSemanticLayerCredentialCredentialArgs
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration PostgresSemanticLayerCredentialConfiguration
    Semantic Layer credential configuration details.
    credential PostgresSemanticLayerCredentialCredential
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration PostgresSemanticLayerCredentialConfiguration
    Semantic Layer credential configuration details.
    credential PostgresSemanticLayerCredentialCredential
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration PostgresSemanticLayerCredentialConfigurationArgs
    Semantic Layer credential configuration details.
    credential PostgresSemanticLayerCredentialCredentialArgs
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration Property Map
    Semantic Layer credential configuration details.
    credential Property Map
    Postgres credential details, but used in the context of the Semantic Layer.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PostgresSemanticLayerCredential Resource

    Get an existing PostgresSemanticLayerCredential 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?: PostgresSemanticLayerCredentialState, opts?: CustomResourceOptions): PostgresSemanticLayerCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            configuration: Optional[PostgresSemanticLayerCredentialConfigurationArgs] = None,
            credential: Optional[PostgresSemanticLayerCredentialCredentialArgs] = None) -> PostgresSemanticLayerCredential
    func GetPostgresSemanticLayerCredential(ctx *Context, name string, id IDInput, state *PostgresSemanticLayerCredentialState, opts ...ResourceOption) (*PostgresSemanticLayerCredential, error)
    public static PostgresSemanticLayerCredential Get(string name, Input<string> id, PostgresSemanticLayerCredentialState? state, CustomResourceOptions? opts = null)
    public static PostgresSemanticLayerCredential get(String name, Output<String> id, PostgresSemanticLayerCredentialState state, CustomResourceOptions options)
    resources:  _:    type: dbtcloud:PostgresSemanticLayerCredential    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:
    Configuration Pulumi.DbtCloud.Inputs.PostgresSemanticLayerCredentialConfiguration
    Semantic Layer credential configuration details.
    Credential Pulumi.DbtCloud.Inputs.PostgresSemanticLayerCredentialCredential
    Postgres credential details, but used in the context of the Semantic Layer.
    Configuration PostgresSemanticLayerCredentialConfigurationArgs
    Semantic Layer credential configuration details.
    Credential PostgresSemanticLayerCredentialCredentialArgs
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration PostgresSemanticLayerCredentialConfiguration
    Semantic Layer credential configuration details.
    credential PostgresSemanticLayerCredentialCredential
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration PostgresSemanticLayerCredentialConfiguration
    Semantic Layer credential configuration details.
    credential PostgresSemanticLayerCredentialCredential
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration PostgresSemanticLayerCredentialConfigurationArgs
    Semantic Layer credential configuration details.
    credential PostgresSemanticLayerCredentialCredentialArgs
    Postgres credential details, but used in the context of the Semantic Layer.
    configuration Property Map
    Semantic Layer credential configuration details.
    credential Property Map
    Postgres credential details, but used in the context of the Semantic Layer.

    Supporting Types

    PostgresSemanticLayerCredentialConfiguration, PostgresSemanticLayerCredentialConfigurationArgs

    AdapterVersion string
    The adapter version
    Name string
    The name of the configuration
    ProjectId int
    The ID of the project
    AdapterVersion string
    The adapter version
    Name string
    The name of the configuration
    ProjectId int
    The ID of the project
    adapterVersion String
    The adapter version
    name String
    The name of the configuration
    projectId Integer
    The ID of the project
    adapterVersion string
    The adapter version
    name string
    The name of the configuration
    projectId number
    The ID of the project
    adapter_version str
    The adapter version
    name str
    The name of the configuration
    project_id int
    The ID of the project
    adapterVersion String
    The adapter version
    name String
    The name of the configuration
    projectId Number
    The ID of the project

    PostgresSemanticLayerCredentialCredential, PostgresSemanticLayerCredentialCredentialArgs

    ProjectId int
    Project ID to create the Postgres/Redshift/AlloyDB credential in.
    Username string
    Username for Postgres/Redshift/AlloyDB
    CredentialId int
    The system Postgres/Redshift/AlloyDB credential ID.
    DefaultSchema string
    Default schema name. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    Id string
    The ID of this resource. Contains the project ID and the credential ID.
    IsActive bool
    Whether the Postgres/Redshift/AlloyDB credential is active
    NumThreads int
    Number of threads to use (required for Redshift)
    Password string
    Password for Postgres/Redshift/AlloyDB
    SemanticLayerCredential bool
    This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.
    TargetName string
    Default schema name
    Type string
    Type of connection. One of (postgres/redshift). Use postgres for alloydb connections. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    ProjectId int
    Project ID to create the Postgres/Redshift/AlloyDB credential in.
    Username string
    Username for Postgres/Redshift/AlloyDB
    CredentialId int
    The system Postgres/Redshift/AlloyDB credential ID.
    DefaultSchema string
    Default schema name. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    Id string
    The ID of this resource. Contains the project ID and the credential ID.
    IsActive bool
    Whether the Postgres/Redshift/AlloyDB credential is active
    NumThreads int
    Number of threads to use (required for Redshift)
    Password string
    Password for Postgres/Redshift/AlloyDB
    SemanticLayerCredential bool
    This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.
    TargetName string
    Default schema name
    Type string
    Type of connection. One of (postgres/redshift). Use postgres for alloydb connections. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    projectId Integer
    Project ID to create the Postgres/Redshift/AlloyDB credential in.
    username String
    Username for Postgres/Redshift/AlloyDB
    credentialId Integer
    The system Postgres/Redshift/AlloyDB credential ID.
    defaultSchema String
    Default schema name. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    id String
    The ID of this resource. Contains the project ID and the credential ID.
    isActive Boolean
    Whether the Postgres/Redshift/AlloyDB credential is active
    numThreads Integer
    Number of threads to use (required for Redshift)
    password String
    Password for Postgres/Redshift/AlloyDB
    semanticLayerCredential Boolean
    This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.
    targetName String
    Default schema name
    type String
    Type of connection. One of (postgres/redshift). Use postgres for alloydb connections. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    projectId number
    Project ID to create the Postgres/Redshift/AlloyDB credential in.
    username string
    Username for Postgres/Redshift/AlloyDB
    credentialId number
    The system Postgres/Redshift/AlloyDB credential ID.
    defaultSchema string
    Default schema name. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    id string
    The ID of this resource. Contains the project ID and the credential ID.
    isActive boolean
    Whether the Postgres/Redshift/AlloyDB credential is active
    numThreads number
    Number of threads to use (required for Redshift)
    password string
    Password for Postgres/Redshift/AlloyDB
    semanticLayerCredential boolean
    This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.
    targetName string
    Default schema name
    type string
    Type of connection. One of (postgres/redshift). Use postgres for alloydb connections. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    project_id int
    Project ID to create the Postgres/Redshift/AlloyDB credential in.
    username str
    Username for Postgres/Redshift/AlloyDB
    credential_id int
    The system Postgres/Redshift/AlloyDB credential ID.
    default_schema str
    Default schema name. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    id str
    The ID of this resource. Contains the project ID and the credential ID.
    is_active bool
    Whether the Postgres/Redshift/AlloyDB credential is active
    num_threads int
    Number of threads to use (required for Redshift)
    password str
    Password for Postgres/Redshift/AlloyDB
    semantic_layer_credential bool
    This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.
    target_name str
    Default schema name
    type str
    Type of connection. One of (postgres/redshift). Use postgres for alloydb connections. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    projectId Number
    Project ID to create the Postgres/Redshift/AlloyDB credential in.
    username String
    Username for Postgres/Redshift/AlloyDB
    credentialId Number
    The system Postgres/Redshift/AlloyDB credential ID.
    defaultSchema String
    Default schema name. Optional only when semanticlayercredential is set to true; otherwise, this field is required.
    id String
    The ID of this resource. Contains the project ID and the credential ID.
    isActive Boolean
    Whether the Postgres/Redshift/AlloyDB credential is active
    numThreads Number
    Number of threads to use (required for Redshift)
    password String
    Password for Postgres/Redshift/AlloyDB
    semanticLayerCredential Boolean
    This field indicates that the credential is used as part of the Semantic Layer configuration. It is used to create a Postgres credential for the Semantic Layer.
    targetName String
    Default schema name
    type String
    Type of connection. One of (postgres/redshift). Use postgres for alloydb connections. Optional only when semanticlayercredential is set to true; otherwise, this field is required.

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_postgres_semantic_layer_credential.example

    id = “credential_id”

    }

    import {

    to = dbtcloud_postgres_semantic_layer_credential.example

    id = “12345”

    }

    using the older import command

    $ pulumi import dbtcloud:index/postgresSemanticLayerCredential:PostgresSemanticLayerCredential example "credential_id"
    
    $ pulumi import dbtcloud:index/postgresSemanticLayerCredential:PostgresSemanticLayerCredential example 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
    dbt Cloud v1.0.2 published on Tuesday, Jun 24, 2025 by Pulumi