@pulumi/dbtcloud 0.1.0-alpha.1715944408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +177 -0
- package/README.md +70 -0
- package/bigQueryConnection.d.ts +399 -0
- package/bigQueryConnection.js +196 -0
- package/bigQueryConnection.js.map +1 -0
- package/bigQueryCredential.d.ts +117 -0
- package/bigQueryCredential.js +91 -0
- package/bigQueryCredential.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +14 -0
- package/config/vars.js +29 -0
- package/config/vars.js.map +1 -0
- package/connection.d.ts +321 -0
- package/connection.js +149 -0
- package/connection.js.map +1 -0
- package/databricksCredential.d.ts +168 -0
- package/databricksCredential.js +120 -0
- package/databricksCredential.js.map +1 -0
- package/environment.d.ts +209 -0
- package/environment.js +123 -0
- package/environment.js.map +1 -0
- package/environmentVariable.d.ts +120 -0
- package/environmentVariable.js +101 -0
- package/environmentVariable.js.map +1 -0
- package/environmentVariableJobOverride.d.ts +119 -0
- package/environmentVariableJobOverride.js +93 -0
- package/environmentVariableJobOverride.js.map +1 -0
- package/extendedAttributes.d.ts +135 -0
- package/extendedAttributes.js +107 -0
- package/extendedAttributes.js.map +1 -0
- package/fabricConnection.d.ts +177 -0
- package/fabricConnection.js +108 -0
- package/fabricConnection.js.map +1 -0
- package/fabricCredential.d.ts +167 -0
- package/fabricCredential.js +93 -0
- package/fabricCredential.js.map +1 -0
- package/getAzureDevOpsProject.d.ts +72 -0
- package/getAzureDevOpsProject.js +53 -0
- package/getAzureDevOpsProject.js.map +1 -0
- package/getAzureDevOpsRepository.d.ts +98 -0
- package/getAzureDevOpsRepository.js +56 -0
- package/getAzureDevOpsRepository.js.map +1 -0
- package/getBigQueryConnection.d.ts +134 -0
- package/getBigQueryConnection.js +20 -0
- package/getBigQueryConnection.js.map +1 -0
- package/getBigQueryCredential.d.ts +58 -0
- package/getBigQueryCredential.js +20 -0
- package/getBigQueryCredential.js.map +1 -0
- package/getConnection.d.ts +86 -0
- package/getConnection.js +20 -0
- package/getConnection.js.map +1 -0
- package/getDatabricksCredential.d.ts +66 -0
- package/getDatabricksCredential.js +20 -0
- package/getDatabricksCredential.js.map +1 -0
- package/getEnvironment.d.ts +82 -0
- package/getEnvironment.js +20 -0
- package/getEnvironment.js.map +1 -0
- package/getEnvironmentVariable.d.ts +52 -0
- package/getEnvironmentVariable.js +20 -0
- package/getEnvironmentVariable.js.map +1 -0
- package/getExtendedAttributes.d.ts +80 -0
- package/getExtendedAttributes.js +46 -0
- package/getExtendedAttributes.js.map +1 -0
- package/getGroup.d.ts +50 -0
- package/getGroup.js +19 -0
- package/getGroup.js.map +1 -0
- package/getGroupUsers.d.ts +67 -0
- package/getGroupUsers.js +47 -0
- package/getGroupUsers.js.map +1 -0
- package/getJob.d.ts +89 -0
- package/getJob.js +20 -0
- package/getJob.js.map +1 -0
- package/getNotification.d.ts +82 -0
- package/getNotification.js +43 -0
- package/getNotification.js.map +1 -0
- package/getPostgresCredential.d.ts +62 -0
- package/getPostgresCredential.js +20 -0
- package/getPostgresCredential.js.map +1 -0
- package/getPrivatelinkEndpoint.d.ts +98 -0
- package/getPrivatelinkEndpoint.js +61 -0
- package/getPrivatelinkEndpoint.js.map +1 -0
- package/getProject.d.ts +102 -0
- package/getProject.js +57 -0
- package/getProject.js.map +1 -0
- package/getRepository.d.ts +86 -0
- package/getRepository.js +21 -0
- package/getRepository.js.map +1 -0
- package/getServiceToken.d.ts +47 -0
- package/getServiceToken.js +19 -0
- package/getServiceToken.js.map +1 -0
- package/getSnowflakeCredential.d.ts +66 -0
- package/getSnowflakeCredential.js +20 -0
- package/getSnowflakeCredential.js.map +1 -0
- package/getUser.d.ts +58 -0
- package/getUser.js +43 -0
- package/getUser.js.map +1 -0
- package/getUserGroups.d.ts +62 -0
- package/getUserGroups.js +43 -0
- package/getUserGroups.js.map +1 -0
- package/getWebhook.d.ts +66 -0
- package/getWebhook.js +19 -0
- package/getWebhook.js.map +1 -0
- package/group.d.ts +127 -0
- package/group.js +95 -0
- package/group.js.map +1 -0
- package/index.d.ts +144 -0
- package/index.js +220 -0
- package/index.js.map +1 -0
- package/job.d.ts +443 -0
- package/job.js +228 -0
- package/job.js.map +1 -0
- package/licenseMap.d.ts +96 -0
- package/licenseMap.js +90 -0
- package/licenseMap.js.map +1 -0
- package/notification.d.ts +202 -0
- package/notification.js +126 -0
- package/notification.js.map +1 -0
- package/package.json +31 -0
- package/package.json.bak +31 -0
- package/postgresCredential.d.ts +171 -0
- package/postgresCredential.js +110 -0
- package/postgresCredential.js.map +1 -0
- package/project.d.ts +87 -0
- package/project.js +78 -0
- package/project.js.map +1 -0
- package/projectArtefacts.d.ts +99 -0
- package/projectArtefacts.js +83 -0
- package/projectArtefacts.js.map +1 -0
- package/projectConnection.d.ts +86 -0
- package/projectConnection.js +83 -0
- package/projectConnection.js.map +1 -0
- package/projectRepository.d.ts +86 -0
- package/projectRepository.js +83 -0
- package/projectRepository.js.map +1 -0
- package/provider.d.ts +50 -0
- package/provider.js +48 -0
- package/provider.js.map +1 -0
- package/repository.d.ts +204 -0
- package/repository.js +103 -0
- package/repository.js.map +1 -0
- package/serviceToken.d.ts +126 -0
- package/serviceToken.js +95 -0
- package/serviceToken.js.map +1 -0
- package/snowflakeCredential.d.ts +218 -0
- package/snowflakeCredential.js +120 -0
- package/snowflakeCredential.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +43 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +74 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/userGroups.d.ts +105 -0
- package/userGroups.js +102 -0
- package/userGroups.js.map +1 -0
- package/utilities.d.ts +8 -0
- package/utilities.js +101 -0
- package/utilities.js.map +1 -0
- package/webhook.d.ts +175 -0
- package/webhook.js +110 -0
- package/webhook.js.map +1 -0
package/repository.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Repository = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* *Note*: Some upstream resources can be slow to create, so if creating a project at
|
|
10
|
+
* the same time as the repository, it's recommended to use the `dependsOn` meta argument.
|
|
11
|
+
*
|
|
12
|
+
* In order to find the `githubInstallationId`, you can log in to dbt Cloud, replace `<dbt_cloud_url>` by your dbt Cloud
|
|
13
|
+
* URL and run the following commands in the Google Chrome console:
|
|
14
|
+
*
|
|
15
|
+
* Alternatively, you can go to the page `https://<dbt_cloud_url>/api/v2/integrations/github/installations/` and read the
|
|
16
|
+
* value of `id` or use the `http` provider to retrieve it automatically like in the example below.
|
|
17
|
+
*
|
|
18
|
+
* ## Example Usage
|
|
19
|
+
*
|
|
20
|
+
* ## Import
|
|
21
|
+
*
|
|
22
|
+
* Import using a project ID and repository ID found in the URL or via the API.
|
|
23
|
+
*
|
|
24
|
+
* ```sh
|
|
25
|
+
* $ pulumi import dbtcloud:index/repository:Repository test_repository "project_id:repository_id"
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ```sh
|
|
29
|
+
* $ pulumi import dbtcloud:index/repository:Repository test_repository 12345:6789
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
class Repository extends pulumi.CustomResource {
|
|
33
|
+
/**
|
|
34
|
+
* Get an existing Repository resource's state with the given name, ID, and optional extra
|
|
35
|
+
* properties used to qualify the lookup.
|
|
36
|
+
*
|
|
37
|
+
* @param name The _unique_ name of the resulting resource.
|
|
38
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
39
|
+
* @param state Any extra arguments used during the lookup.
|
|
40
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
41
|
+
*/
|
|
42
|
+
static get(name, id, state, opts) {
|
|
43
|
+
return new Repository(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns true if the given object is an instance of Repository. This is designed to work even
|
|
47
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
48
|
+
*/
|
|
49
|
+
static isInstance(obj) {
|
|
50
|
+
if (obj === undefined || obj === null) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return obj['__pulumiType'] === Repository.__pulumiType;
|
|
54
|
+
}
|
|
55
|
+
constructor(name, argsOrState, opts) {
|
|
56
|
+
let resourceInputs = {};
|
|
57
|
+
opts = opts || {};
|
|
58
|
+
if (opts.id) {
|
|
59
|
+
const state = argsOrState;
|
|
60
|
+
resourceInputs["azureActiveDirectoryProjectId"] = state ? state.azureActiveDirectoryProjectId : undefined;
|
|
61
|
+
resourceInputs["azureActiveDirectoryRepositoryId"] = state ? state.azureActiveDirectoryRepositoryId : undefined;
|
|
62
|
+
resourceInputs["azureBypassWebhookRegistrationFailure"] = state ? state.azureBypassWebhookRegistrationFailure : undefined;
|
|
63
|
+
resourceInputs["deployKey"] = state ? state.deployKey : undefined;
|
|
64
|
+
resourceInputs["fetchDeployKey"] = state ? state.fetchDeployKey : undefined;
|
|
65
|
+
resourceInputs["gitCloneStrategy"] = state ? state.gitCloneStrategy : undefined;
|
|
66
|
+
resourceInputs["githubInstallationId"] = state ? state.githubInstallationId : undefined;
|
|
67
|
+
resourceInputs["gitlabProjectId"] = state ? state.gitlabProjectId : undefined;
|
|
68
|
+
resourceInputs["isActive"] = state ? state.isActive : undefined;
|
|
69
|
+
resourceInputs["projectId"] = state ? state.projectId : undefined;
|
|
70
|
+
resourceInputs["remoteUrl"] = state ? state.remoteUrl : undefined;
|
|
71
|
+
resourceInputs["repositoryCredentialsId"] = state ? state.repositoryCredentialsId : undefined;
|
|
72
|
+
resourceInputs["repositoryId"] = state ? state.repositoryId : undefined;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const args = argsOrState;
|
|
76
|
+
if ((!args || args.projectId === undefined) && !opts.urn) {
|
|
77
|
+
throw new Error("Missing required property 'projectId'");
|
|
78
|
+
}
|
|
79
|
+
if ((!args || args.remoteUrl === undefined) && !opts.urn) {
|
|
80
|
+
throw new Error("Missing required property 'remoteUrl'");
|
|
81
|
+
}
|
|
82
|
+
resourceInputs["azureActiveDirectoryProjectId"] = args ? args.azureActiveDirectoryProjectId : undefined;
|
|
83
|
+
resourceInputs["azureActiveDirectoryRepositoryId"] = args ? args.azureActiveDirectoryRepositoryId : undefined;
|
|
84
|
+
resourceInputs["azureBypassWebhookRegistrationFailure"] = args ? args.azureBypassWebhookRegistrationFailure : undefined;
|
|
85
|
+
resourceInputs["fetchDeployKey"] = args ? args.fetchDeployKey : undefined;
|
|
86
|
+
resourceInputs["gitCloneStrategy"] = args ? args.gitCloneStrategy : undefined;
|
|
87
|
+
resourceInputs["githubInstallationId"] = args ? args.githubInstallationId : undefined;
|
|
88
|
+
resourceInputs["gitlabProjectId"] = args ? args.gitlabProjectId : undefined;
|
|
89
|
+
resourceInputs["isActive"] = args ? args.isActive : undefined;
|
|
90
|
+
resourceInputs["projectId"] = args ? args.projectId : undefined;
|
|
91
|
+
resourceInputs["remoteUrl"] = args ? args.remoteUrl : undefined;
|
|
92
|
+
resourceInputs["deployKey"] = undefined /*out*/;
|
|
93
|
+
resourceInputs["repositoryCredentialsId"] = undefined /*out*/;
|
|
94
|
+
resourceInputs["repositoryId"] = undefined /*out*/;
|
|
95
|
+
}
|
|
96
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
97
|
+
super(Repository.__pulumiType, name, resourceInputs, opts);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.Repository = Repository;
|
|
101
|
+
/** @internal */
|
|
102
|
+
Repository.__pulumiType = 'dbtcloud:index/repository:Repository';
|
|
103
|
+
//# sourceMappingURL=repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../repository.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IACjD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAuB,EAAE,IAAmC;QACrH,OAAO,IAAI,UAAU,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACjE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,UAAU,CAAC,YAAY,CAAC;IAC3D,CAAC;IA+DD,YAAY,IAAY,EAAE,WAA8C,EAAE,IAAmC;QACzG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA0C,CAAC;YACzD,cAAc,CAAC,+BAA+B,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1G,cAAc,CAAC,kCAAkC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC,SAAS,CAAC;YAChH,cAAc,CAAC,uCAAuC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C,SAAS,CAAC;YAC9D,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9D,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACtD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;;AAnIL,gCAoIC;AAtHG,gBAAgB;AACO,uBAAY,GAAG,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
9
|
+
* import * as dbtcloud from "@pulumi/dbtcloud";
|
|
10
|
+
*
|
|
11
|
+
* // NOTE for customers using the LEGACY dbt_cloud provider:
|
|
12
|
+
* const testServiceToken = new dbtcloud.ServiceToken("test_service_token", {
|
|
13
|
+
* name: "Test Service Token",
|
|
14
|
+
* serviceTokenPermissions: [
|
|
15
|
+
* {
|
|
16
|
+
* permissionSet: "git_admin",
|
|
17
|
+
* allProjects: true,
|
|
18
|
+
* },
|
|
19
|
+
* {
|
|
20
|
+
* permissionSet: "job_admin",
|
|
21
|
+
* allProjects: false,
|
|
22
|
+
* projectId: dbtProject.id,
|
|
23
|
+
* },
|
|
24
|
+
* ],
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ## Import
|
|
29
|
+
*
|
|
30
|
+
* Import using a group ID found in the URL or via the API.
|
|
31
|
+
*
|
|
32
|
+
* ```sh
|
|
33
|
+
* $ pulumi import dbtcloud:index/serviceToken:ServiceToken test_service_token "service_token_id"
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* ```sh
|
|
37
|
+
* $ pulumi import dbtcloud:index/serviceToken:ServiceToken test_service_token 12345
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class ServiceToken extends pulumi.CustomResource {
|
|
41
|
+
/**
|
|
42
|
+
* Get an existing ServiceToken resource's state with the given name, ID, and optional extra
|
|
43
|
+
* properties used to qualify the lookup.
|
|
44
|
+
*
|
|
45
|
+
* @param name The _unique_ name of the resulting resource.
|
|
46
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
47
|
+
* @param state Any extra arguments used during the lookup.
|
|
48
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
49
|
+
*/
|
|
50
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceTokenState, opts?: pulumi.CustomResourceOptions): ServiceToken;
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the given object is an instance of ServiceToken. This is designed to work even
|
|
53
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
54
|
+
*/
|
|
55
|
+
static isInstance(obj: any): obj is ServiceToken;
|
|
56
|
+
/**
|
|
57
|
+
* Service token name
|
|
58
|
+
*/
|
|
59
|
+
readonly name: pulumi.Output<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Permissions set for the service token
|
|
62
|
+
*/
|
|
63
|
+
readonly serviceTokenPermissions: pulumi.Output<outputs.ServiceTokenServiceTokenPermission[] | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* Service token state (1 is active, 2 is inactive)
|
|
66
|
+
*/
|
|
67
|
+
readonly state: pulumi.Output<number | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* Service token secret value (only accessible on creation))
|
|
70
|
+
*/
|
|
71
|
+
readonly tokenString: pulumi.Output<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Service token UID (part of the token)
|
|
74
|
+
*/
|
|
75
|
+
readonly uid: pulumi.Output<string>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a ServiceToken resource with the given unique name, arguments, and options.
|
|
78
|
+
*
|
|
79
|
+
* @param name The _unique_ name of the resource.
|
|
80
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
81
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
82
|
+
*/
|
|
83
|
+
constructor(name: string, args?: ServiceTokenArgs, opts?: pulumi.CustomResourceOptions);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Input properties used for looking up and filtering ServiceToken resources.
|
|
87
|
+
*/
|
|
88
|
+
export interface ServiceTokenState {
|
|
89
|
+
/**
|
|
90
|
+
* Service token name
|
|
91
|
+
*/
|
|
92
|
+
name?: pulumi.Input<string>;
|
|
93
|
+
/**
|
|
94
|
+
* Permissions set for the service token
|
|
95
|
+
*/
|
|
96
|
+
serviceTokenPermissions?: pulumi.Input<pulumi.Input<inputs.ServiceTokenServiceTokenPermission>[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Service token state (1 is active, 2 is inactive)
|
|
99
|
+
*/
|
|
100
|
+
state?: pulumi.Input<number>;
|
|
101
|
+
/**
|
|
102
|
+
* Service token secret value (only accessible on creation))
|
|
103
|
+
*/
|
|
104
|
+
tokenString?: pulumi.Input<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Service token UID (part of the token)
|
|
107
|
+
*/
|
|
108
|
+
uid?: pulumi.Input<string>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The set of arguments for constructing a ServiceToken resource.
|
|
112
|
+
*/
|
|
113
|
+
export interface ServiceTokenArgs {
|
|
114
|
+
/**
|
|
115
|
+
* Service token name
|
|
116
|
+
*/
|
|
117
|
+
name?: pulumi.Input<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Permissions set for the service token
|
|
120
|
+
*/
|
|
121
|
+
serviceTokenPermissions?: pulumi.Input<pulumi.Input<inputs.ServiceTokenServiceTokenPermission>[]>;
|
|
122
|
+
/**
|
|
123
|
+
* Service token state (1 is active, 2 is inactive)
|
|
124
|
+
*/
|
|
125
|
+
state?: pulumi.Input<number>;
|
|
126
|
+
}
|
package/serviceToken.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ServiceToken = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* ## Example Usage
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as dbtcloud from "@pulumi/dbtcloud";
|
|
14
|
+
*
|
|
15
|
+
* // NOTE for customers using the LEGACY dbt_cloud provider:
|
|
16
|
+
* const testServiceToken = new dbtcloud.ServiceToken("test_service_token", {
|
|
17
|
+
* name: "Test Service Token",
|
|
18
|
+
* serviceTokenPermissions: [
|
|
19
|
+
* {
|
|
20
|
+
* permissionSet: "git_admin",
|
|
21
|
+
* allProjects: true,
|
|
22
|
+
* },
|
|
23
|
+
* {
|
|
24
|
+
* permissionSet: "job_admin",
|
|
25
|
+
* allProjects: false,
|
|
26
|
+
* projectId: dbtProject.id,
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* ## Import
|
|
33
|
+
*
|
|
34
|
+
* Import using a group ID found in the URL or via the API.
|
|
35
|
+
*
|
|
36
|
+
* ```sh
|
|
37
|
+
* $ pulumi import dbtcloud:index/serviceToken:ServiceToken test_service_token "service_token_id"
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* ```sh
|
|
41
|
+
* $ pulumi import dbtcloud:index/serviceToken:ServiceToken test_service_token 12345
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
class ServiceToken extends pulumi.CustomResource {
|
|
45
|
+
/**
|
|
46
|
+
* Get an existing ServiceToken resource's state with the given name, ID, and optional extra
|
|
47
|
+
* properties used to qualify the lookup.
|
|
48
|
+
*
|
|
49
|
+
* @param name The _unique_ name of the resulting resource.
|
|
50
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
51
|
+
* @param state Any extra arguments used during the lookup.
|
|
52
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
53
|
+
*/
|
|
54
|
+
static get(name, id, state, opts) {
|
|
55
|
+
return new ServiceToken(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the given object is an instance of ServiceToken. This is designed to work even
|
|
59
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
60
|
+
*/
|
|
61
|
+
static isInstance(obj) {
|
|
62
|
+
if (obj === undefined || obj === null) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return obj['__pulumiType'] === ServiceToken.__pulumiType;
|
|
66
|
+
}
|
|
67
|
+
constructor(name, argsOrState, opts) {
|
|
68
|
+
let resourceInputs = {};
|
|
69
|
+
opts = opts || {};
|
|
70
|
+
if (opts.id) {
|
|
71
|
+
const state = argsOrState;
|
|
72
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
73
|
+
resourceInputs["serviceTokenPermissions"] = state ? state.serviceTokenPermissions : undefined;
|
|
74
|
+
resourceInputs["state"] = state ? state.state : undefined;
|
|
75
|
+
resourceInputs["tokenString"] = state ? state.tokenString : undefined;
|
|
76
|
+
resourceInputs["uid"] = state ? state.uid : undefined;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const args = argsOrState;
|
|
80
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
81
|
+
resourceInputs["serviceTokenPermissions"] = args ? args.serviceTokenPermissions : undefined;
|
|
82
|
+
resourceInputs["state"] = args ? args.state : undefined;
|
|
83
|
+
resourceInputs["tokenString"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["uid"] = undefined /*out*/;
|
|
85
|
+
}
|
|
86
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
87
|
+
const secretOpts = { additionalSecretOutputs: ["tokenString"] };
|
|
88
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
89
|
+
super(ServiceToken.__pulumiType, name, resourceInputs, opts);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.ServiceToken = ServiceToken;
|
|
93
|
+
/** @internal */
|
|
94
|
+
ServiceToken.__pulumiType = 'dbtcloud:index/serviceToken:ServiceToken';
|
|
95
|
+
//# sourceMappingURL=serviceToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serviceToken.js","sourceRoot":"","sources":["../serviceToken.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAa,YAAa,SAAQ,MAAM,CAAC,cAAc;IACnD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAyB,EAAE,IAAmC;QACvH,OAAO,IAAI,YAAY,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,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AI,CAAC,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5F,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAClD,cAAc,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC7C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;QAChE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;;AA/EL,oCAgFC;AAlEG,gBAAgB;AACO,yBAAY,GAAG,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* ## Example Usage
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
7
|
+
* import * as dbtcloud from "@pulumi/dbtcloud";
|
|
8
|
+
*
|
|
9
|
+
* // NOTE for customers using the LEGACY dbt_cloud provider:
|
|
10
|
+
* const prodCredential = new dbtcloud.SnowflakeCredential("prod_credential", {
|
|
11
|
+
* projectId: dbtProject.id,
|
|
12
|
+
* authType: "password",
|
|
13
|
+
* numThreads: 16,
|
|
14
|
+
* schema: "SCHEMA",
|
|
15
|
+
* user: "user",
|
|
16
|
+
* password: "password",
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* ## Import
|
|
21
|
+
*
|
|
22
|
+
* Import using a project ID and credential ID found in the URL or via the API.
|
|
23
|
+
*
|
|
24
|
+
* ```sh
|
|
25
|
+
* $ pulumi import dbtcloud:index/snowflakeCredential:SnowflakeCredential prod_snowflake_credential "project_id:credential_id"
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ```sh
|
|
29
|
+
* $ pulumi import dbtcloud:index/snowflakeCredential:SnowflakeCredential prod_snowflake_credential 12345:6789
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare class SnowflakeCredential extends pulumi.CustomResource {
|
|
33
|
+
/**
|
|
34
|
+
* Get an existing SnowflakeCredential resource's state with the given name, ID, and optional extra
|
|
35
|
+
* properties used to qualify the lookup.
|
|
36
|
+
*
|
|
37
|
+
* @param name The _unique_ name of the resulting resource.
|
|
38
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
39
|
+
* @param state Any extra arguments used during the lookup.
|
|
40
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
41
|
+
*/
|
|
42
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SnowflakeCredentialState, opts?: pulumi.CustomResourceOptions): SnowflakeCredential;
|
|
43
|
+
/**
|
|
44
|
+
* Returns true if the given object is an instance of SnowflakeCredential. This is designed to work even
|
|
45
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
46
|
+
*/
|
|
47
|
+
static isInstance(obj: any): obj is SnowflakeCredential;
|
|
48
|
+
/**
|
|
49
|
+
* The type of Snowflake credential ('password' or 'keypair')
|
|
50
|
+
*/
|
|
51
|
+
readonly authType: pulumi.Output<string>;
|
|
52
|
+
/**
|
|
53
|
+
* The system Snowflake credential ID
|
|
54
|
+
*/
|
|
55
|
+
readonly credentialId: pulumi.Output<number>;
|
|
56
|
+
/**
|
|
57
|
+
* Database to connect to
|
|
58
|
+
*/
|
|
59
|
+
readonly database: pulumi.Output<string | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the Snowflake credential is active
|
|
62
|
+
*/
|
|
63
|
+
readonly isActive: pulumi.Output<boolean | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* Number of threads to use
|
|
66
|
+
*/
|
|
67
|
+
readonly numThreads: pulumi.Output<number>;
|
|
68
|
+
/**
|
|
69
|
+
* Password for Snowflake
|
|
70
|
+
*/
|
|
71
|
+
readonly password: pulumi.Output<string | undefined>;
|
|
72
|
+
/**
|
|
73
|
+
* Private key for Snowflake
|
|
74
|
+
*/
|
|
75
|
+
readonly privateKey: pulumi.Output<string | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* Private key passphrase for Snowflake
|
|
78
|
+
*/
|
|
79
|
+
readonly privateKeyPassphrase: pulumi.Output<string | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Project ID to create the Snowflake credential in
|
|
82
|
+
*/
|
|
83
|
+
readonly projectId: pulumi.Output<number>;
|
|
84
|
+
/**
|
|
85
|
+
* Role to assume
|
|
86
|
+
*/
|
|
87
|
+
readonly role: pulumi.Output<string | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Default schema name
|
|
90
|
+
*/
|
|
91
|
+
readonly schema: pulumi.Output<string>;
|
|
92
|
+
/**
|
|
93
|
+
* Username for Snowflake
|
|
94
|
+
*/
|
|
95
|
+
readonly user: pulumi.Output<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Warehouse to use
|
|
98
|
+
*/
|
|
99
|
+
readonly warehouse: pulumi.Output<string | undefined>;
|
|
100
|
+
/**
|
|
101
|
+
* Create a SnowflakeCredential resource with the given unique name, arguments, and options.
|
|
102
|
+
*
|
|
103
|
+
* @param name The _unique_ name of the resource.
|
|
104
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
105
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
106
|
+
*/
|
|
107
|
+
constructor(name: string, args: SnowflakeCredentialArgs, opts?: pulumi.CustomResourceOptions);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Input properties used for looking up and filtering SnowflakeCredential resources.
|
|
111
|
+
*/
|
|
112
|
+
export interface SnowflakeCredentialState {
|
|
113
|
+
/**
|
|
114
|
+
* The type of Snowflake credential ('password' or 'keypair')
|
|
115
|
+
*/
|
|
116
|
+
authType?: pulumi.Input<string>;
|
|
117
|
+
/**
|
|
118
|
+
* The system Snowflake credential ID
|
|
119
|
+
*/
|
|
120
|
+
credentialId?: pulumi.Input<number>;
|
|
121
|
+
/**
|
|
122
|
+
* Database to connect to
|
|
123
|
+
*/
|
|
124
|
+
database?: pulumi.Input<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Whether the Snowflake credential is active
|
|
127
|
+
*/
|
|
128
|
+
isActive?: pulumi.Input<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* Number of threads to use
|
|
131
|
+
*/
|
|
132
|
+
numThreads?: pulumi.Input<number>;
|
|
133
|
+
/**
|
|
134
|
+
* Password for Snowflake
|
|
135
|
+
*/
|
|
136
|
+
password?: pulumi.Input<string>;
|
|
137
|
+
/**
|
|
138
|
+
* Private key for Snowflake
|
|
139
|
+
*/
|
|
140
|
+
privateKey?: pulumi.Input<string>;
|
|
141
|
+
/**
|
|
142
|
+
* Private key passphrase for Snowflake
|
|
143
|
+
*/
|
|
144
|
+
privateKeyPassphrase?: pulumi.Input<string>;
|
|
145
|
+
/**
|
|
146
|
+
* Project ID to create the Snowflake credential in
|
|
147
|
+
*/
|
|
148
|
+
projectId?: pulumi.Input<number>;
|
|
149
|
+
/**
|
|
150
|
+
* Role to assume
|
|
151
|
+
*/
|
|
152
|
+
role?: pulumi.Input<string>;
|
|
153
|
+
/**
|
|
154
|
+
* Default schema name
|
|
155
|
+
*/
|
|
156
|
+
schema?: pulumi.Input<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Username for Snowflake
|
|
159
|
+
*/
|
|
160
|
+
user?: pulumi.Input<string>;
|
|
161
|
+
/**
|
|
162
|
+
* Warehouse to use
|
|
163
|
+
*/
|
|
164
|
+
warehouse?: pulumi.Input<string>;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The set of arguments for constructing a SnowflakeCredential resource.
|
|
168
|
+
*/
|
|
169
|
+
export interface SnowflakeCredentialArgs {
|
|
170
|
+
/**
|
|
171
|
+
* The type of Snowflake credential ('password' or 'keypair')
|
|
172
|
+
*/
|
|
173
|
+
authType: pulumi.Input<string>;
|
|
174
|
+
/**
|
|
175
|
+
* Database to connect to
|
|
176
|
+
*/
|
|
177
|
+
database?: pulumi.Input<string>;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the Snowflake credential is active
|
|
180
|
+
*/
|
|
181
|
+
isActive?: pulumi.Input<boolean>;
|
|
182
|
+
/**
|
|
183
|
+
* Number of threads to use
|
|
184
|
+
*/
|
|
185
|
+
numThreads: pulumi.Input<number>;
|
|
186
|
+
/**
|
|
187
|
+
* Password for Snowflake
|
|
188
|
+
*/
|
|
189
|
+
password?: pulumi.Input<string>;
|
|
190
|
+
/**
|
|
191
|
+
* Private key for Snowflake
|
|
192
|
+
*/
|
|
193
|
+
privateKey?: pulumi.Input<string>;
|
|
194
|
+
/**
|
|
195
|
+
* Private key passphrase for Snowflake
|
|
196
|
+
*/
|
|
197
|
+
privateKeyPassphrase?: pulumi.Input<string>;
|
|
198
|
+
/**
|
|
199
|
+
* Project ID to create the Snowflake credential in
|
|
200
|
+
*/
|
|
201
|
+
projectId: pulumi.Input<number>;
|
|
202
|
+
/**
|
|
203
|
+
* Role to assume
|
|
204
|
+
*/
|
|
205
|
+
role?: pulumi.Input<string>;
|
|
206
|
+
/**
|
|
207
|
+
* Default schema name
|
|
208
|
+
*/
|
|
209
|
+
schema: pulumi.Input<string>;
|
|
210
|
+
/**
|
|
211
|
+
* Username for Snowflake
|
|
212
|
+
*/
|
|
213
|
+
user: pulumi.Input<string>;
|
|
214
|
+
/**
|
|
215
|
+
* Warehouse to use
|
|
216
|
+
*/
|
|
217
|
+
warehouse?: pulumi.Input<string>;
|
|
218
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SnowflakeCredential = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* ## Example Usage
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as dbtcloud from "@pulumi/dbtcloud";
|
|
14
|
+
*
|
|
15
|
+
* // NOTE for customers using the LEGACY dbt_cloud provider:
|
|
16
|
+
* const prodCredential = new dbtcloud.SnowflakeCredential("prod_credential", {
|
|
17
|
+
* projectId: dbtProject.id,
|
|
18
|
+
* authType: "password",
|
|
19
|
+
* numThreads: 16,
|
|
20
|
+
* schema: "SCHEMA",
|
|
21
|
+
* user: "user",
|
|
22
|
+
* password: "password",
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* ## Import
|
|
27
|
+
*
|
|
28
|
+
* Import using a project ID and credential ID found in the URL or via the API.
|
|
29
|
+
*
|
|
30
|
+
* ```sh
|
|
31
|
+
* $ pulumi import dbtcloud:index/snowflakeCredential:SnowflakeCredential prod_snowflake_credential "project_id:credential_id"
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* ```sh
|
|
35
|
+
* $ pulumi import dbtcloud:index/snowflakeCredential:SnowflakeCredential prod_snowflake_credential 12345:6789
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
class SnowflakeCredential extends pulumi.CustomResource {
|
|
39
|
+
/**
|
|
40
|
+
* Get an existing SnowflakeCredential resource's state with the given name, ID, and optional extra
|
|
41
|
+
* properties used to qualify the lookup.
|
|
42
|
+
*
|
|
43
|
+
* @param name The _unique_ name of the resulting resource.
|
|
44
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
45
|
+
* @param state Any extra arguments used during the lookup.
|
|
46
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
47
|
+
*/
|
|
48
|
+
static get(name, id, state, opts) {
|
|
49
|
+
return new SnowflakeCredential(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the given object is an instance of SnowflakeCredential. This is designed to work even
|
|
53
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
54
|
+
*/
|
|
55
|
+
static isInstance(obj) {
|
|
56
|
+
if (obj === undefined || obj === null) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
return obj['__pulumiType'] === SnowflakeCredential.__pulumiType;
|
|
60
|
+
}
|
|
61
|
+
constructor(name, argsOrState, opts) {
|
|
62
|
+
let resourceInputs = {};
|
|
63
|
+
opts = opts || {};
|
|
64
|
+
if (opts.id) {
|
|
65
|
+
const state = argsOrState;
|
|
66
|
+
resourceInputs["authType"] = state ? state.authType : undefined;
|
|
67
|
+
resourceInputs["credentialId"] = state ? state.credentialId : undefined;
|
|
68
|
+
resourceInputs["database"] = state ? state.database : undefined;
|
|
69
|
+
resourceInputs["isActive"] = state ? state.isActive : undefined;
|
|
70
|
+
resourceInputs["numThreads"] = state ? state.numThreads : undefined;
|
|
71
|
+
resourceInputs["password"] = state ? state.password : undefined;
|
|
72
|
+
resourceInputs["privateKey"] = state ? state.privateKey : undefined;
|
|
73
|
+
resourceInputs["privateKeyPassphrase"] = state ? state.privateKeyPassphrase : undefined;
|
|
74
|
+
resourceInputs["projectId"] = state ? state.projectId : undefined;
|
|
75
|
+
resourceInputs["role"] = state ? state.role : undefined;
|
|
76
|
+
resourceInputs["schema"] = state ? state.schema : undefined;
|
|
77
|
+
resourceInputs["user"] = state ? state.user : undefined;
|
|
78
|
+
resourceInputs["warehouse"] = state ? state.warehouse : undefined;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const args = argsOrState;
|
|
82
|
+
if ((!args || args.authType === undefined) && !opts.urn) {
|
|
83
|
+
throw new Error("Missing required property 'authType'");
|
|
84
|
+
}
|
|
85
|
+
if ((!args || args.numThreads === undefined) && !opts.urn) {
|
|
86
|
+
throw new Error("Missing required property 'numThreads'");
|
|
87
|
+
}
|
|
88
|
+
if ((!args || args.projectId === undefined) && !opts.urn) {
|
|
89
|
+
throw new Error("Missing required property 'projectId'");
|
|
90
|
+
}
|
|
91
|
+
if ((!args || args.schema === undefined) && !opts.urn) {
|
|
92
|
+
throw new Error("Missing required property 'schema'");
|
|
93
|
+
}
|
|
94
|
+
if ((!args || args.user === undefined) && !opts.urn) {
|
|
95
|
+
throw new Error("Missing required property 'user'");
|
|
96
|
+
}
|
|
97
|
+
resourceInputs["authType"] = args ? args.authType : undefined;
|
|
98
|
+
resourceInputs["database"] = args ? args.database : undefined;
|
|
99
|
+
resourceInputs["isActive"] = args ? args.isActive : undefined;
|
|
100
|
+
resourceInputs["numThreads"] = args ? args.numThreads : undefined;
|
|
101
|
+
resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
|
|
102
|
+
resourceInputs["privateKey"] = (args === null || args === void 0 ? void 0 : args.privateKey) ? pulumi.secret(args.privateKey) : undefined;
|
|
103
|
+
resourceInputs["privateKeyPassphrase"] = (args === null || args === void 0 ? void 0 : args.privateKeyPassphrase) ? pulumi.secret(args.privateKeyPassphrase) : undefined;
|
|
104
|
+
resourceInputs["projectId"] = args ? args.projectId : undefined;
|
|
105
|
+
resourceInputs["role"] = args ? args.role : undefined;
|
|
106
|
+
resourceInputs["schema"] = args ? args.schema : undefined;
|
|
107
|
+
resourceInputs["user"] = args ? args.user : undefined;
|
|
108
|
+
resourceInputs["warehouse"] = args ? args.warehouse : undefined;
|
|
109
|
+
resourceInputs["credentialId"] = undefined /*out*/;
|
|
110
|
+
}
|
|
111
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
112
|
+
const secretOpts = { additionalSecretOutputs: ["password", "privateKey", "privateKeyPassphrase"] };
|
|
113
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
114
|
+
super(SnowflakeCredential.__pulumiType, name, resourceInputs, opts);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.SnowflakeCredential = SnowflakeCredential;
|
|
118
|
+
/** @internal */
|
|
119
|
+
SnowflakeCredential.__pulumiType = 'dbtcloud:index/snowflakeCredential:SnowflakeCredential';
|
|
120
|
+
//# sourceMappingURL=snowflakeCredential.js.map
|