dbtcloud.ProjectConnection
Explore with Pulumi AI
This resource is deprecated with the release of global connections and it will be removed in a future version of the provider. Going forward, please set the
connection_id
in thedbtcloud.Environment
resource instead.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
const dbtProjectConnection = new dbtcloud.ProjectConnection("dbt_project_connection", {
projectId: dbtProject.id,
connectionId: dbtConnection.connectionId,
});
import pulumi
import pulumi_dbtcloud as dbtcloud
dbt_project_connection = dbtcloud.ProjectConnection("dbt_project_connection",
project_id=dbt_project["id"],
connection_id=dbt_connection["connectionId"])
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 {
_, err := dbtcloud.NewProjectConnection(ctx, "dbt_project_connection", &dbtcloud.ProjectConnectionArgs{
ProjectId: pulumi.Any(dbtProject.Id),
ConnectionId: pulumi.Any(dbtConnection.ConnectionId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;
return await Deployment.RunAsync(() =>
{
var dbtProjectConnection = new DbtCloud.ProjectConnection("dbt_project_connection", new()
{
ProjectId = dbtProject.Id,
ConnectionId = dbtConnection.ConnectionId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.ProjectConnection;
import com.pulumi.dbtcloud.ProjectConnectionArgs;
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) {
var dbtProjectConnection = new ProjectConnection("dbtProjectConnection", ProjectConnectionArgs.builder()
.projectId(dbtProject.id())
.connectionId(dbtConnection.connectionId())
.build());
}
}
resources:
dbtProjectConnection:
type: dbtcloud:ProjectConnection
name: dbt_project_connection
properties:
projectId: ${dbtProject.id}
connectionId: ${dbtConnection.connectionId}
Create ProjectConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectConnection(name: string, args: ProjectConnectionArgs, opts?: CustomResourceOptions);
@overload
def ProjectConnection(resource_name: str,
args: ProjectConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
connection_id: Optional[int] = None,
project_id: Optional[int] = None)
func NewProjectConnection(ctx *Context, name string, args ProjectConnectionArgs, opts ...ResourceOption) (*ProjectConnection, error)
public ProjectConnection(string name, ProjectConnectionArgs args, CustomResourceOptions? opts = null)
public ProjectConnection(String name, ProjectConnectionArgs args)
public ProjectConnection(String name, ProjectConnectionArgs args, CustomResourceOptions options)
type: dbtcloud:ProjectConnection
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 ProjectConnectionArgs
- 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 ProjectConnectionArgs
- 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 ProjectConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectConnectionArgs
- 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 projectConnectionResource = new DbtCloud.ProjectConnection("projectConnectionResource", new()
{
ConnectionId = 0,
ProjectId = 0,
});
example, err := dbtcloud.NewProjectConnection(ctx, "projectConnectionResource", &dbtcloud.ProjectConnectionArgs{
ConnectionId: pulumi.Int(0),
ProjectId: pulumi.Int(0),
})
var projectConnectionResource = new ProjectConnection("projectConnectionResource", ProjectConnectionArgs.builder()
.connectionId(0)
.projectId(0)
.build());
project_connection_resource = dbtcloud.ProjectConnection("projectConnectionResource",
connection_id=0,
project_id=0)
const projectConnectionResource = new dbtcloud.ProjectConnection("projectConnectionResource", {
connectionId: 0,
projectId: 0,
});
type: dbtcloud:ProjectConnection
properties:
connectionId: 0
projectId: 0
ProjectConnection 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 ProjectConnection resource accepts the following input properties:
- Connection
Id int - Connection ID
- Project
Id int - Project ID
- Connection
Id int - Connection ID
- Project
Id int - Project ID
- connection
Id Integer - Connection ID
- project
Id Integer - Project ID
- connection
Id number - Connection ID
- project
Id number - Project ID
- connection_
id int - Connection ID
- project_
id int - Project ID
- connection
Id Number - Connection ID
- project
Id Number - Project ID
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectConnection 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 ProjectConnection Resource
Get an existing ProjectConnection 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?: ProjectConnectionState, opts?: CustomResourceOptions): ProjectConnection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connection_id: Optional[int] = None,
project_id: Optional[int] = None) -> ProjectConnection
func GetProjectConnection(ctx *Context, name string, id IDInput, state *ProjectConnectionState, opts ...ResourceOption) (*ProjectConnection, error)
public static ProjectConnection Get(string name, Input<string> id, ProjectConnectionState? state, CustomResourceOptions? opts = null)
public static ProjectConnection get(String name, Output<String> id, ProjectConnectionState 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.
- Connection
Id int - Connection ID
- Project
Id int - Project ID
- Connection
Id int - Connection ID
- Project
Id int - Project ID
- connection
Id Integer - Connection ID
- project
Id Integer - Project ID
- connection
Id number - Connection ID
- project
Id number - Project ID
- connection_
id int - Connection ID
- project_
id int - Project ID
- connection
Id Number - Connection ID
- project
Id Number - Project ID
Import
using import blocks (requires Terraform >= 1.5)
import {
to = dbtcloud_project_connection.my_project
id = “project_id:connection_id”
}
import {
to = dbtcloud_project_connection.my_project
id = “12345:5678”
}
using the older import command
$ pulumi import dbtcloud:index/projectConnection:ProjectConnection my_project "project_id:connection_id"
$ pulumi import dbtcloud:index/projectConnection:ProjectConnection my_project 12345:5678
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.