@ryan-pip/pulumi-fivetran 1.5.1 → 1.9.4
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/config/index.d.ts +1 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +1 -1
- package/config/index.js.map +1 -1
- package/config/vars.d.ts +1 -0
- package/config/vars.d.ts.map +1 -0
- package/config/vars.js +28 -7
- package/config/vars.js.map +1 -1
- package/connector.d.ts +104 -40
- package/connector.d.ts.map +1 -0
- package/connector.js +150 -41
- package/connector.js.map +1 -1
- package/connectorCertificates.d.ts +51 -0
- package/connectorCertificates.d.ts.map +1 -0
- package/connectorCertificates.js +84 -11
- package/connectorCertificates.js.map +1 -1
- package/connectorFingerprints.d.ts +13 -9
- package/connectorFingerprints.d.ts.map +1 -0
- package/connectorFingerprints.js +46 -20
- package/connectorFingerprints.js.map +1 -1
- package/connectorSchedule.d.ts +24 -33
- package/connectorSchedule.d.ts.map +1 -0
- package/connectorSchedule.js +65 -52
- package/connectorSchedule.js.map +1 -1
- package/connectorSchemaConfig.d.ts +200 -9
- package/connectorSchemaConfig.d.ts.map +1 -0
- package/connectorSchemaConfig.js +231 -21
- package/connectorSchemaConfig.js.map +1 -1
- package/destination.d.ts +63 -37
- package/destination.d.ts.map +1 -0
- package/destination.js +113 -50
- package/destination.js.map +1 -1
- package/destinationCertificates.d.ts +54 -0
- package/destinationCertificates.d.ts.map +1 -0
- package/destinationCertificates.js +87 -11
- package/destinationCertificates.js.map +1 -1
- package/destinationFingerprints.d.ts +13 -9
- package/destinationFingerprints.d.ts.map +1 -0
- package/destinationFingerprints.js +46 -20
- package/destinationFingerprints.js.map +1 -1
- package/externalLogging.d.ts +42 -12
- package/externalLogging.d.ts.map +1 -0
- package/externalLogging.js +82 -30
- package/externalLogging.js.map +1 -1
- package/getConnection.d.ts +143 -0
- package/getConnection.d.ts.map +1 -0
- package/getConnection.js +77 -0
- package/getConnection.js.map +1 -0
- package/getConnectionCertificates.d.ts +64 -0
- package/getConnectionCertificates.d.ts.map +1 -0
- package/getConnectionCertificates.js +75 -0
- package/getConnectionCertificates.js.map +1 -0
- package/getConnectionFingerprints.d.ts +64 -0
- package/getConnectionFingerprints.d.ts.map +1 -0
- package/getConnectionFingerprints.js +75 -0
- package/getConnectionFingerprints.js.map +1 -0
- package/getConnections.d.ts +38 -0
- package/getConnections.d.ts.map +1 -0
- package/getConnections.js +57 -0
- package/getConnections.js.map +1 -0
- package/getConnector.d.ts +3 -2
- package/getConnector.d.ts.map +1 -0
- package/getConnector.js +28 -5
- package/getConnector.js.map +1 -1
- package/getConnectorCertificates.d.ts +29 -0
- package/getConnectorCertificates.d.ts.map +1 -0
- package/getConnectorCertificates.js +54 -3
- package/getConnectorCertificates.js.map +1 -1
- package/getConnectorFingerprints.d.ts +3 -2
- package/getConnectorFingerprints.d.ts.map +1 -0
- package/getConnectorFingerprints.js +28 -5
- package/getConnectorFingerprints.js.map +1 -1
- package/getConnectors.d.ts +5 -0
- package/getConnectors.d.ts.map +1 -0
- package/getConnectors.js +30 -3
- package/getConnectors.js.map +1 -1
- package/getConnectorsMetadata.d.ts +3 -2
- package/getConnectorsMetadata.d.ts.map +1 -0
- package/getConnectorsMetadata.js +28 -5
- package/getConnectorsMetadata.js.map +1 -1
- package/getDestination.d.ts +3 -2
- package/getDestination.d.ts.map +1 -0
- package/getDestination.js +28 -5
- package/getDestination.js.map +1 -1
- package/getDestinationCertificates.d.ts +1 -0
- package/getDestinationCertificates.d.ts.map +1 -0
- package/getDestinationCertificates.js +26 -3
- package/getDestinationCertificates.js.map +1 -1
- package/getDestinationFingerprints.d.ts +3 -2
- package/getDestinationFingerprints.d.ts.map +1 -0
- package/getDestinationFingerprints.js +28 -5
- package/getDestinationFingerprints.js.map +1 -1
- package/getDestinations.d.ts +5 -0
- package/getDestinations.d.ts.map +1 -0
- package/getDestinations.js +30 -3
- package/getDestinations.js.map +1 -1
- package/getExternalLogging.d.ts +3 -2
- package/getExternalLogging.d.ts.map +1 -0
- package/getExternalLogging.js +28 -5
- package/getExternalLogging.js.map +1 -1
- package/getExternalLogs.d.ts +5 -0
- package/getExternalLogs.d.ts.map +1 -0
- package/getExternalLogs.js +30 -3
- package/getExternalLogs.js.map +1 -1
- package/getGroup.d.ts +3 -2
- package/getGroup.d.ts.map +1 -0
- package/getGroup.js +28 -5
- package/getGroup.js.map +1 -1
- package/getGroupConnections.d.ts +78 -0
- package/getGroupConnections.d.ts.map +1 -0
- package/getGroupConnections.js +79 -0
- package/getGroupConnections.js.map +1 -0
- package/getGroupConnectors.d.ts +3 -2
- package/getGroupConnectors.d.ts.map +1 -0
- package/getGroupConnectors.js +28 -5
- package/getGroupConnectors.js.map +1 -1
- package/getGroupServiceAccount.d.ts +3 -2
- package/getGroupServiceAccount.d.ts.map +1 -0
- package/getGroupServiceAccount.js +28 -5
- package/getGroupServiceAccount.js.map +1 -1
- package/getGroupSshKey.d.ts +3 -2
- package/getGroupSshKey.d.ts.map +1 -0
- package/getGroupSshKey.js +28 -5
- package/getGroupSshKey.js.map +1 -1
- package/getGroupUsers.d.ts +3 -2
- package/getGroupUsers.d.ts.map +1 -0
- package/getGroupUsers.js +28 -5
- package/getGroupUsers.js.map +1 -1
- package/getGroups.d.ts +3 -2
- package/getGroups.d.ts.map +1 -0
- package/getGroups.js +28 -5
- package/getGroups.js.map +1 -1
- package/getHybridDeploymentAgent.d.ts +5 -0
- package/getHybridDeploymentAgent.d.ts.map +1 -0
- package/getHybridDeploymentAgent.js +30 -3
- package/getHybridDeploymentAgent.js.map +1 -1
- package/getHybridDeploymentAgents.d.ts +3 -2
- package/getHybridDeploymentAgents.d.ts.map +1 -0
- package/getHybridDeploymentAgents.js +28 -5
- package/getHybridDeploymentAgents.js.map +1 -1
- package/getPrivateLink.d.ts +7 -2
- package/getPrivateLink.d.ts.map +1 -0
- package/getPrivateLink.js +28 -5
- package/getPrivateLink.js.map +1 -1
- package/getPrivateLinks.d.ts +1 -0
- package/getPrivateLinks.d.ts.map +1 -0
- package/getPrivateLinks.js +26 -3
- package/getPrivateLinks.js.map +1 -1
- package/getProxyAgent.d.ts +3 -10
- package/getProxyAgent.d.ts.map +1 -0
- package/getProxyAgent.js +28 -5
- package/getProxyAgent.js.map +1 -1
- package/getProxyAgents.d.ts +3 -2
- package/getProxyAgents.d.ts.map +1 -0
- package/getProxyAgents.js +28 -5
- package/getProxyAgents.js.map +1 -1
- package/getQuickstartPackage.d.ts +3 -2
- package/getQuickstartPackage.d.ts.map +1 -0
- package/getQuickstartPackage.js +28 -5
- package/getQuickstartPackage.js.map +1 -1
- package/getQuickstartPackages.d.ts +3 -2
- package/getQuickstartPackages.d.ts.map +1 -0
- package/getQuickstartPackages.js +28 -5
- package/getQuickstartPackages.js.map +1 -1
- package/getRoles.d.ts +3 -2
- package/getRoles.d.ts.map +1 -0
- package/getRoles.js +28 -5
- package/getRoles.js.map +1 -1
- package/getTeam.d.ts +3 -2
- package/getTeam.d.ts.map +1 -0
- package/getTeam.js +28 -5
- package/getTeam.js.map +1 -1
- package/getTeamConnectionMemberships.d.ts +42 -0
- package/getTeamConnectionMemberships.d.ts.map +1 -0
- package/getTeamConnectionMemberships.js +53 -0
- package/getTeamConnectionMemberships.js.map +1 -0
- package/getTeamConnectorMemberships.d.ts +1 -0
- package/getTeamConnectorMemberships.d.ts.map +1 -0
- package/getTeamConnectorMemberships.js +26 -3
- package/getTeamConnectorMemberships.js.map +1 -1
- package/getTeamGroupMemberships.d.ts +3 -2
- package/getTeamGroupMemberships.d.ts.map +1 -0
- package/getTeamGroupMemberships.js +28 -5
- package/getTeamGroupMemberships.js.map +1 -1
- package/getTeamUserMemberships.d.ts +3 -2
- package/getTeamUserMemberships.d.ts.map +1 -0
- package/getTeamUserMemberships.js +28 -5
- package/getTeamUserMemberships.js.map +1 -1
- package/getTeams.d.ts +3 -2
- package/getTeams.d.ts.map +1 -0
- package/getTeams.js +28 -5
- package/getTeams.js.map +1 -1
- package/getTransformation.d.ts +3 -2
- package/getTransformation.d.ts.map +1 -0
- package/getTransformation.js +28 -5
- package/getTransformation.js.map +1 -1
- package/getTransformationProject.d.ts +3 -2
- package/getTransformationProject.d.ts.map +1 -0
- package/getTransformationProject.js +28 -5
- package/getTransformationProject.js.map +1 -1
- package/getTransformationProjects.d.ts +3 -2
- package/getTransformationProjects.d.ts.map +1 -0
- package/getTransformationProjects.js +28 -5
- package/getTransformationProjects.js.map +1 -1
- package/getTransformations.d.ts +3 -2
- package/getTransformations.d.ts.map +1 -0
- package/getTransformations.js +28 -5
- package/getTransformations.js.map +1 -1
- package/getUser.d.ts +3 -2
- package/getUser.d.ts.map +1 -0
- package/getUser.js +28 -5
- package/getUser.js.map +1 -1
- package/getUserConnectionMemberships.d.ts +64 -0
- package/getUserConnectionMemberships.d.ts.map +1 -0
- package/getUserConnectionMemberships.js +75 -0
- package/getUserConnectionMemberships.js.map +1 -0
- package/getUserConnectorMemberships.d.ts +3 -2
- package/getUserConnectorMemberships.d.ts.map +1 -0
- package/getUserConnectorMemberships.js +28 -5
- package/getUserConnectorMemberships.js.map +1 -1
- package/getUserGroupMemberships.d.ts +3 -2
- package/getUserGroupMemberships.d.ts.map +1 -0
- package/getUserGroupMemberships.js +28 -5
- package/getUserGroupMemberships.js.map +1 -1
- package/getUsers.d.ts +3 -2
- package/getUsers.d.ts.map +1 -0
- package/getUsers.js +28 -5
- package/getUsers.js.map +1 -1
- package/getWebhook.d.ts +3 -2
- package/getWebhook.d.ts.map +1 -0
- package/getWebhook.js +28 -5
- package/getWebhook.js.map +1 -1
- package/getWebhooks.d.ts +3 -2
- package/getWebhooks.d.ts.map +1 -0
- package/getWebhooks.js +28 -5
- package/getWebhooks.js.map +1 -1
- package/group.d.ts +12 -10
- package/group.d.ts.map +1 -0
- package/group.js +44 -20
- package/group.js.map +1 -1
- package/groupUsers.d.ts +3 -2
- package/groupUsers.d.ts.map +1 -0
- package/groupUsers.js +37 -14
- package/groupUsers.js.map +1 -1
- package/hybridDeploymentAgent.d.ts +14 -3
- package/hybridDeploymentAgent.d.ts.map +1 -0
- package/hybridDeploymentAgent.js +51 -25
- package/hybridDeploymentAgent.js.map +1 -1
- package/index.d.ts +23 -24
- package/index.d.ts.map +1 -0
- package/index.js +58 -38
- package/index.js.map +1 -1
- package/package.json +4 -3
- package/privateLink.d.ts +28 -6
- package/privateLink.d.ts.map +1 -0
- package/privateLink.js +63 -22
- package/privateLink.js.map +1 -1
- package/provider.d.ts +15 -0
- package/provider.d.ts.map +1 -0
- package/provider.js +39 -9
- package/provider.js.map +1 -1
- package/proxyAgent.d.ts +28 -15
- package/proxyAgent.d.ts.map +1 -0
- package/proxyAgent.js +47 -22
- package/proxyAgent.js.map +1 -1
- package/team.d.ts +12 -11
- package/team.d.ts.map +1 -0
- package/team.js +47 -24
- package/team.js.map +1 -1
- package/teamConnectorMembership.d.ts +11 -11
- package/teamConnectorMembership.d.ts.map +1 -0
- package/teamConnectorMembership.js +44 -22
- package/teamConnectorMembership.js.map +1 -1
- package/teamGroupMembership.d.ts +33 -8
- package/teamGroupMembership.d.ts.map +1 -0
- package/teamGroupMembership.js +66 -19
- package/teamGroupMembership.js.map +1 -1
- package/teamUserMembership.d.ts +11 -11
- package/teamUserMembership.d.ts.map +1 -0
- package/teamUserMembership.js +44 -22
- package/teamUserMembership.js.map +1 -1
- package/transformation.d.ts +57 -16
- package/transformation.d.ts.map +1 -0
- package/transformation.js +97 -34
- package/transformation.js.map +1 -1
- package/transformationProject.d.ts +97 -8
- package/transformationProject.d.ts.map +1 -0
- package/transformationProject.js +139 -28
- package/transformationProject.js.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +26 -3
- package/types/index.js.map +1 -1
- package/types/input.d.ts +2750 -299
- package/types/input.d.ts.map +1 -0
- package/types/input.js +1 -1
- package/types/input.js.map +1 -1
- package/types/output.d.ts +1705 -221
- package/types/output.d.ts.map +1 -0
- package/types/output.js +1 -1
- package/types/output.js.map +1 -1
- package/user.d.ts +11 -9
- package/user.d.ts.map +1 -0
- package/user.js +60 -36
- package/user.js.map +1 -1
- package/userConnectorMembership.d.ts +11 -11
- package/userConnectorMembership.d.ts.map +1 -0
- package/userConnectorMembership.js +44 -22
- package/userConnectorMembership.js.map +1 -1
- package/userGroupMembership.d.ts +33 -8
- package/userGroupMembership.d.ts.map +1 -0
- package/userGroupMembership.js +66 -19
- package/userGroupMembership.js.map +1 -1
- package/utilities.d.ts +1 -4
- package/utilities.d.ts.map +1 -0
- package/utilities.js +43 -30
- package/utilities.js.map +1 -1
- package/webhook.d.ts +10 -8
- package/webhook.d.ts.map +1 -0
- package/webhook.js +59 -35
- package/webhook.js.map +1 -1
- package/dbtGitProjectConfig.d.ts +0 -141
- package/dbtGitProjectConfig.js +0 -105
- package/dbtGitProjectConfig.js.map +0 -1
- package/dbtProject.d.ts +0 -237
- package/dbtProject.js +0 -134
- package/dbtProject.js.map +0 -1
- package/dbtTransformation.d.ts +0 -162
- package/dbtTransformation.js +0 -105
- package/dbtTransformation.js.map +0 -1
- package/getDbtModels.d.ts +0 -67
- package/getDbtModels.js +0 -52
- package/getDbtModels.js.map +0 -1
- package/getDbtProject.d.ts +0 -112
- package/getDbtProject.js +0 -52
- package/getDbtProject.js.map +0 -1
- package/getDbtProjects.d.ts +0 -38
- package/getDbtProjects.js +0 -42
- package/getDbtProjects.js.map +0 -1
- package/getDbtTransformation.d.ts +0 -99
- package/getDbtTransformation.js +0 -52
- package/getDbtTransformation.js.map +0 -1
- package/package.json.bak +0 -29
package/transformation.js
CHANGED
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// *** WARNING: this file was generated by
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
4
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
28
|
exports.Transformation = void 0;
|
|
6
|
-
const pulumi = require("@pulumi/pulumi");
|
|
7
|
-
const utilities = require("./utilities");
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
8
31
|
/**
|
|
9
32
|
* Resource is in ALPHA state.
|
|
10
33
|
*
|
|
@@ -12,47 +35,87 @@ const utilities = require("./utilities");
|
|
|
12
35
|
*
|
|
13
36
|
* ## Example Usage
|
|
14
37
|
*
|
|
15
|
-
* ###
|
|
16
|
-
*
|
|
17
|
-
* ```typescript
|
|
18
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
-
* ```
|
|
38
|
+
* ### Dbt Core Transformation
|
|
20
39
|
*
|
|
21
40
|
* ```typescript
|
|
22
41
|
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
43
|
+
*
|
|
44
|
+
* const transformation = new fivetran.Transformation("transformation", {
|
|
45
|
+
* type: "DBT_CORE",
|
|
46
|
+
* paused: true,
|
|
47
|
+
* schedule: {
|
|
48
|
+
* scheduleType: "TIME_OF_DAY",
|
|
49
|
+
* timeOfDay: "11:00",
|
|
50
|
+
* },
|
|
51
|
+
* transformationConfig: {
|
|
52
|
+
* projectId: "project_id",
|
|
53
|
+
* name: "name",
|
|
54
|
+
* steps: [
|
|
55
|
+
* {
|
|
56
|
+
* name: "name1",
|
|
57
|
+
* command: "command1",
|
|
58
|
+
* },
|
|
59
|
+
* {
|
|
60
|
+
* name: "name2",
|
|
61
|
+
* command: "command2",
|
|
62
|
+
* },
|
|
63
|
+
* ],
|
|
64
|
+
* },
|
|
65
|
+
* });
|
|
23
66
|
* ```
|
|
24
67
|
*
|
|
25
|
-
*
|
|
26
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
27
|
-
* ```
|
|
68
|
+
* ### Quickstart Transformation
|
|
28
69
|
*
|
|
29
70
|
* ```typescript
|
|
30
71
|
* import * as pulumi from "@pulumi/pulumi";
|
|
72
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
73
|
+
*
|
|
74
|
+
* const transformation = new fivetran.Transformation("transformation", {
|
|
75
|
+
* type: "QUICKSTART",
|
|
76
|
+
* paused: true,
|
|
77
|
+
* schedule: {
|
|
78
|
+
* scheduleType: "TIME_OF_DAY",
|
|
79
|
+
* timeOfDay: "11:00",
|
|
80
|
+
* },
|
|
81
|
+
* transformationConfig: {
|
|
82
|
+
* packageName: "package_name",
|
|
83
|
+
* connectionIds: [
|
|
84
|
+
* "connection_id1",
|
|
85
|
+
* "connection_id2",
|
|
86
|
+
* ],
|
|
87
|
+
* excludedModels: [
|
|
88
|
+
* "excluded_model1",
|
|
89
|
+
* "excluded_model2",
|
|
90
|
+
* ],
|
|
91
|
+
* },
|
|
92
|
+
* });
|
|
31
93
|
* ```
|
|
32
94
|
*
|
|
33
95
|
* ## Import
|
|
34
96
|
*
|
|
35
|
-
* 1. To import an existing `
|
|
36
|
-
*
|
|
97
|
+
* 1. To import an existing `fivetran.Transformation` resource into your Terraform state, you need to get **Transformation ID** via API call `GET https://api.fivetran.com/v1/transformations` to retrieve available projects.
|
|
37
98
|
* 2. Fetch transformation details for particular `transformation-id` using `GET https://api.fivetran.com/v1/transformations/{transformation-id}` to ensure that this is the transformation you want to import.
|
|
38
|
-
*
|
|
39
99
|
* 3. Define an empty resource in your `.tf` configuration:
|
|
40
100
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
101
|
+
* ```typescript
|
|
102
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
103
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
44
104
|
*
|
|
45
|
-
* }
|
|
105
|
+
* const myImportedFivetranTransformation = new fivetran.Transformation("my_imported_fivetran_transformation", {});
|
|
106
|
+
* ```
|
|
46
107
|
*
|
|
47
108
|
* 4. Run the `pulumi import` command:
|
|
48
109
|
*
|
|
49
110
|
* ```sh
|
|
50
|
-
*
|
|
111
|
+
* terraform import fivetran_transformation.my_imported_fivetran_transformation {Transformation ID}
|
|
51
112
|
* ```
|
|
52
113
|
*
|
|
53
114
|
* 4. Use the `terraform state show` command to get the values from the state:
|
|
54
115
|
*
|
|
116
|
+
* ```sh
|
|
55
117
|
* terraform state show 'fivetran_transformation.my_imported_fivetran_transformation'
|
|
118
|
+
* ```
|
|
56
119
|
*
|
|
57
120
|
* 5. Copy the values and paste them to your `.tf` configuration.
|
|
58
121
|
*/
|
|
@@ -67,8 +130,10 @@ class Transformation extends pulumi.CustomResource {
|
|
|
67
130
|
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
68
131
|
*/
|
|
69
132
|
static get(name, id, state, opts) {
|
|
70
|
-
return new Transformation(name, state,
|
|
133
|
+
return new Transformation(name, state, { ...opts, id: id });
|
|
71
134
|
}
|
|
135
|
+
/** @internal */
|
|
136
|
+
static __pulumiType = 'fivetran:index/transformation:Transformation';
|
|
72
137
|
/**
|
|
73
138
|
* Returns true if the given object is an instance of Transformation. This is designed to work even
|
|
74
139
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
@@ -84,21 +149,21 @@ class Transformation extends pulumi.CustomResource {
|
|
|
84
149
|
opts = opts || {};
|
|
85
150
|
if (opts.id) {
|
|
86
151
|
const state = argsOrState;
|
|
87
|
-
resourceInputs["createdAt"] = state
|
|
88
|
-
resourceInputs["createdById"] = state
|
|
89
|
-
resourceInputs["outputModelNames"] = state
|
|
90
|
-
resourceInputs["paused"] = state
|
|
91
|
-
resourceInputs["schedule"] = state
|
|
92
|
-
resourceInputs["status"] = state
|
|
93
|
-
resourceInputs["transformationConfig"] = state
|
|
94
|
-
resourceInputs["type"] = state
|
|
152
|
+
resourceInputs["createdAt"] = state?.createdAt;
|
|
153
|
+
resourceInputs["createdById"] = state?.createdById;
|
|
154
|
+
resourceInputs["outputModelNames"] = state?.outputModelNames;
|
|
155
|
+
resourceInputs["paused"] = state?.paused;
|
|
156
|
+
resourceInputs["schedule"] = state?.schedule;
|
|
157
|
+
resourceInputs["status"] = state?.status;
|
|
158
|
+
resourceInputs["transformationConfig"] = state?.transformationConfig;
|
|
159
|
+
resourceInputs["type"] = state?.type;
|
|
95
160
|
}
|
|
96
161
|
else {
|
|
97
162
|
const args = argsOrState;
|
|
98
|
-
resourceInputs["paused"] = args
|
|
99
|
-
resourceInputs["schedule"] = args
|
|
100
|
-
resourceInputs["transformationConfig"] = args
|
|
101
|
-
resourceInputs["type"] = args
|
|
163
|
+
resourceInputs["paused"] = args?.paused;
|
|
164
|
+
resourceInputs["schedule"] = args?.schedule;
|
|
165
|
+
resourceInputs["transformationConfig"] = args?.transformationConfig;
|
|
166
|
+
resourceInputs["type"] = args?.type;
|
|
102
167
|
resourceInputs["createdAt"] = undefined /*out*/;
|
|
103
168
|
resourceInputs["createdById"] = undefined /*out*/;
|
|
104
169
|
resourceInputs["outputModelNames"] = undefined /*out*/;
|
|
@@ -109,6 +174,4 @@ class Transformation extends pulumi.CustomResource {
|
|
|
109
174
|
}
|
|
110
175
|
}
|
|
111
176
|
exports.Transformation = Transformation;
|
|
112
|
-
/** @internal */
|
|
113
|
-
Transformation.__pulumiType = 'fivetran:index/transformation:Transformation';
|
|
114
177
|
//# sourceMappingURL=transformation.js.map
|
package/transformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformation.js","sourceRoot":"","sources":["../transformation.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"transformation.js","sourceRoot":"","sources":["../transformation.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,8CAA8C,CAAC;IAErF;;;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,cAAc,CA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CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAChD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;;AAzFL,wCA0FC"}
|
|
@@ -2,29 +2,117 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
2
2
|
import * as inputs from "./types/input";
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Resource is in ALPHA state.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* This resource allows you to add, manage and delete transformation projects in your account.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* ## Example Usage
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
14
|
+
*
|
|
15
|
+
* const project = new fivetran.TransformationProject("project", {
|
|
16
|
+
* groupId: "group_id",
|
|
17
|
+
* type: "DBT_GIT",
|
|
18
|
+
* runTests: true,
|
|
19
|
+
* projectConfig: {
|
|
20
|
+
* gitRemoteUrl: "git_remote_url",
|
|
21
|
+
* gitBranch: "git_branch",
|
|
22
|
+
* folderPath: "folder_path",
|
|
23
|
+
* dbtVersion: "dbt_version",
|
|
24
|
+
* defaultSchema: "default_schema",
|
|
25
|
+
* threads: 1,
|
|
26
|
+
* targetName: "target_name",
|
|
27
|
+
* environmentVars: ["DBT_VARIABLE=variable_value"],
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* ## How to set up a Transformation Project with private Git Repo.
|
|
33
|
+
*
|
|
34
|
+
* To be able to use private Transformation Project Git repository you have to grant Fivetran access to this repo.
|
|
35
|
+
* To do that you need to add a Deploy Key to your repository.
|
|
36
|
+
* To get SSH key from Fivetran create `fivetran.TransformationProject` resource:
|
|
37
|
+
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
40
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
41
|
+
*
|
|
42
|
+
* const myGroup = new fivetran.Group("my_group", {name: "My_Group"});
|
|
43
|
+
* const project = new fivetran.TransformationProject("project", {
|
|
44
|
+
* groupId: "group_id",
|
|
45
|
+
* type: "DBT_GIT",
|
|
46
|
+
* runTests: true,
|
|
47
|
+
* projectConfig: {
|
|
48
|
+
* gitRemoteUrl: "git_remote_url",
|
|
49
|
+
* gitBranch: "git_branch",
|
|
50
|
+
* folderPath: "folder_path",
|
|
51
|
+
* dbtVersion: "dbt_version",
|
|
52
|
+
* defaultSchema: "default_schema",
|
|
53
|
+
* threads: 1,
|
|
54
|
+
* targetName: "target_name",
|
|
55
|
+
* environmentVars: ["DBT_VARIABLE=variable_value"],
|
|
56
|
+
* },
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* Then you need to set up the Transformation Project public key (field `publicKey` in created resource) as a deploy key into your repo using:
|
|
61
|
+
*
|
|
62
|
+
* GitHub Provider Repository Deploy Key Resource:
|
|
63
|
+
* ```typescript
|
|
64
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
65
|
+
* import * as github from "@pulumi/github";
|
|
66
|
+
*
|
|
67
|
+
* const exampleRepositoryDeployKey = new github.RepositoryDeployKey("example_repository_deploy_key", {
|
|
68
|
+
* title: "Repository test key",
|
|
69
|
+
* repository: "repo-owner/repo-name",
|
|
70
|
+
* key: testProject.projectConfig.publicKey,
|
|
71
|
+
* readOnly: true,
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* or
|
|
12
76
|
*
|
|
13
|
-
*
|
|
77
|
+
* [Bitbucket Provider Repository Deploy Key Resource]https://registry.terraform.io/providers/DrFaust92/bitbucket/latest/docs/resources/deploy_key)
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
80
|
+
* import * as bitbucket from "@pulumi/bitbucket";
|
|
14
81
|
*
|
|
15
|
-
*
|
|
82
|
+
* const test = new bitbucket.index.DeployKey("test", {
|
|
83
|
+
* workspace: "repo-owner",
|
|
84
|
+
* repository: "repo-name",
|
|
85
|
+
* key: testProject.projectConfig.publicKey,
|
|
86
|
+
* label: "Repository test key",
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
16
89
|
*
|
|
17
|
-
*
|
|
90
|
+
* Since we recommend using third-party providers in this case, please make sure that access to the repositories is provided correctly and the providers are configured correctly for connection.
|
|
91
|
+
*
|
|
92
|
+
* ## Import
|
|
93
|
+
*
|
|
94
|
+
* 1. To import an existing `fivetran.TransformationProject` resource into your Terraform state, you need to get **Transformation Project ID** via API call `GET https://api.fivetran.com/v1/transformation-projects` to retrieve available projects.
|
|
95
|
+
* 2. Fetch project details for particular `project-id` using `GET https://api.fivetran.com/v1/transformation-projects/{project-id}` to ensure that this is the project you want to import.
|
|
96
|
+
* 3. Define an empty resource in your `.tf` configuration:
|
|
97
|
+
*
|
|
98
|
+
* ```typescript
|
|
99
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
100
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
101
|
+
*
|
|
102
|
+
* const myImportedFivetranTransformationProject = new fivetran.TransformationProject("my_imported_fivetran_transformation_project", {});
|
|
103
|
+
* ```
|
|
18
104
|
*
|
|
19
105
|
* 4. Run the `pulumi import` command:
|
|
20
106
|
*
|
|
21
107
|
* ```sh
|
|
22
|
-
*
|
|
108
|
+
* terraform import fivetran_transformation_project.my_imported_fivetran_transformation_project {Transformation Project ID}
|
|
23
109
|
* ```
|
|
24
110
|
*
|
|
25
111
|
* 4. Use the `terraform state show` command to get the values from the state:
|
|
26
112
|
*
|
|
113
|
+
* ```sh
|
|
27
114
|
* terraform state show 'fivetran_transformation_project.my_imported_fivetran_transformation_project'
|
|
115
|
+
* ```
|
|
28
116
|
*
|
|
29
117
|
* 5. Copy the values and paste them to your `.tf` configuration.
|
|
30
118
|
*/
|
|
@@ -134,3 +222,4 @@ export interface TransformationProjectArgs {
|
|
|
134
222
|
*/
|
|
135
223
|
type: pulumi.Input<string>;
|
|
136
224
|
}
|
|
225
|
+
//# sourceMappingURL=transformationProject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformationProject.d.ts","sourceRoot":"","sources":["../transformationProject.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AACH,qBAAa,qBAAsB,SAAQ,MAAM,CAAC,cAAc;IAC5D;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,0BAA0B,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,qBAAqB;IAO5J;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,qBAAqB;IAOhE;;OAEG;IACH,SAAgC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjE;;OAEG;IACH,SAAgC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnE;;OAEG;IACH,SAAgC,MAAM,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;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,kCAAkC,CAAC,CAAC;IACxE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9B"}
|
package/transformationProject.js
CHANGED
|
@@ -1,34 +1,145 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// *** WARNING: this file was generated by
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
4
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
28
|
exports.TransformationProject = void 0;
|
|
6
|
-
const pulumi = require("@pulumi/pulumi");
|
|
7
|
-
const utilities = require("./utilities");
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
8
31
|
/**
|
|
9
|
-
*
|
|
32
|
+
* Resource is in ALPHA state.
|
|
10
33
|
*
|
|
11
|
-
*
|
|
34
|
+
* This resource allows you to add, manage and delete transformation projects in your account.
|
|
12
35
|
*
|
|
13
|
-
*
|
|
36
|
+
* ## Example Usage
|
|
14
37
|
*
|
|
15
|
-
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
40
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
41
|
+
*
|
|
42
|
+
* const project = new fivetran.TransformationProject("project", {
|
|
43
|
+
* groupId: "group_id",
|
|
44
|
+
* type: "DBT_GIT",
|
|
45
|
+
* runTests: true,
|
|
46
|
+
* projectConfig: {
|
|
47
|
+
* gitRemoteUrl: "git_remote_url",
|
|
48
|
+
* gitBranch: "git_branch",
|
|
49
|
+
* folderPath: "folder_path",
|
|
50
|
+
* dbtVersion: "dbt_version",
|
|
51
|
+
* defaultSchema: "default_schema",
|
|
52
|
+
* threads: 1,
|
|
53
|
+
* targetName: "target_name",
|
|
54
|
+
* environmentVars: ["DBT_VARIABLE=variable_value"],
|
|
55
|
+
* },
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* ## How to set up a Transformation Project with private Git Repo.
|
|
16
60
|
*
|
|
17
|
-
*
|
|
61
|
+
* To be able to use private Transformation Project Git repository you have to grant Fivetran access to this repo.
|
|
62
|
+
* To do that you need to add a Deploy Key to your repository.
|
|
63
|
+
* To get SSH key from Fivetran create `fivetran.TransformationProject` resource:
|
|
64
|
+
*
|
|
65
|
+
* ```typescript
|
|
66
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
67
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
68
|
+
*
|
|
69
|
+
* const myGroup = new fivetran.Group("my_group", {name: "My_Group"});
|
|
70
|
+
* const project = new fivetran.TransformationProject("project", {
|
|
71
|
+
* groupId: "group_id",
|
|
72
|
+
* type: "DBT_GIT",
|
|
73
|
+
* runTests: true,
|
|
74
|
+
* projectConfig: {
|
|
75
|
+
* gitRemoteUrl: "git_remote_url",
|
|
76
|
+
* gitBranch: "git_branch",
|
|
77
|
+
* folderPath: "folder_path",
|
|
78
|
+
* dbtVersion: "dbt_version",
|
|
79
|
+
* defaultSchema: "default_schema",
|
|
80
|
+
* threads: 1,
|
|
81
|
+
* targetName: "target_name",
|
|
82
|
+
* environmentVars: ["DBT_VARIABLE=variable_value"],
|
|
83
|
+
* },
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* Then you need to set up the Transformation Project public key (field `publicKey` in created resource) as a deploy key into your repo using:
|
|
88
|
+
*
|
|
89
|
+
* GitHub Provider Repository Deploy Key Resource:
|
|
90
|
+
* ```typescript
|
|
91
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
92
|
+
* import * as github from "@pulumi/github";
|
|
93
|
+
*
|
|
94
|
+
* const exampleRepositoryDeployKey = new github.RepositoryDeployKey("example_repository_deploy_key", {
|
|
95
|
+
* title: "Repository test key",
|
|
96
|
+
* repository: "repo-owner/repo-name",
|
|
97
|
+
* key: testProject.projectConfig.publicKey,
|
|
98
|
+
* readOnly: true,
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
18
101
|
*
|
|
19
|
-
*
|
|
102
|
+
* or
|
|
20
103
|
*
|
|
21
|
-
*
|
|
104
|
+
* [Bitbucket Provider Repository Deploy Key Resource]https://registry.terraform.io/providers/DrFaust92/bitbucket/latest/docs/resources/deploy_key)
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
107
|
+
* import * as bitbucket from "@pulumi/bitbucket";
|
|
108
|
+
*
|
|
109
|
+
* const test = new bitbucket.index.DeployKey("test", {
|
|
110
|
+
* workspace: "repo-owner",
|
|
111
|
+
* repository: "repo-name",
|
|
112
|
+
* key: testProject.projectConfig.publicKey,
|
|
113
|
+
* label: "Repository test key",
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* Since we recommend using third-party providers in this case, please make sure that access to the repositories is provided correctly and the providers are configured correctly for connection.
|
|
118
|
+
*
|
|
119
|
+
* ## Import
|
|
120
|
+
*
|
|
121
|
+
* 1. To import an existing `fivetran.TransformationProject` resource into your Terraform state, you need to get **Transformation Project ID** via API call `GET https://api.fivetran.com/v1/transformation-projects` to retrieve available projects.
|
|
122
|
+
* 2. Fetch project details for particular `project-id` using `GET https://api.fivetran.com/v1/transformation-projects/{project-id}` to ensure that this is the project you want to import.
|
|
123
|
+
* 3. Define an empty resource in your `.tf` configuration:
|
|
124
|
+
*
|
|
125
|
+
* ```typescript
|
|
126
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
127
|
+
* import * as fivetran from "@ryan-pip/pulumi-fivetran";
|
|
128
|
+
*
|
|
129
|
+
* const myImportedFivetranTransformationProject = new fivetran.TransformationProject("my_imported_fivetran_transformation_project", {});
|
|
130
|
+
* ```
|
|
22
131
|
*
|
|
23
132
|
* 4. Run the `pulumi import` command:
|
|
24
133
|
*
|
|
25
134
|
* ```sh
|
|
26
|
-
*
|
|
135
|
+
* terraform import fivetran_transformation_project.my_imported_fivetran_transformation_project {Transformation Project ID}
|
|
27
136
|
* ```
|
|
28
137
|
*
|
|
29
138
|
* 4. Use the `terraform state show` command to get the values from the state:
|
|
30
139
|
*
|
|
140
|
+
* ```sh
|
|
31
141
|
* terraform state show 'fivetran_transformation_project.my_imported_fivetran_transformation_project'
|
|
142
|
+
* ```
|
|
32
143
|
*
|
|
33
144
|
* 5. Copy the values and paste them to your `.tf` configuration.
|
|
34
145
|
*/
|
|
@@ -43,8 +154,10 @@ class TransformationProject extends pulumi.CustomResource {
|
|
|
43
154
|
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
44
155
|
*/
|
|
45
156
|
static get(name, id, state, opts) {
|
|
46
|
-
return new TransformationProject(name, state,
|
|
157
|
+
return new TransformationProject(name, state, { ...opts, id: id });
|
|
47
158
|
}
|
|
159
|
+
/** @internal */
|
|
160
|
+
static __pulumiType = 'fivetran:index/transformationProject:TransformationProject';
|
|
48
161
|
/**
|
|
49
162
|
* Returns true if the given object is an instance of TransformationProject. This is designed to work even
|
|
50
163
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
@@ -60,27 +173,27 @@ class TransformationProject extends pulumi.CustomResource {
|
|
|
60
173
|
opts = opts || {};
|
|
61
174
|
if (opts.id) {
|
|
62
175
|
const state = argsOrState;
|
|
63
|
-
resourceInputs["createdAt"] = state
|
|
64
|
-
resourceInputs["createdById"] = state
|
|
65
|
-
resourceInputs["errors"] = state
|
|
66
|
-
resourceInputs["groupId"] = state
|
|
67
|
-
resourceInputs["projectConfig"] = state
|
|
68
|
-
resourceInputs["runTests"] = state
|
|
69
|
-
resourceInputs["status"] = state
|
|
70
|
-
resourceInputs["type"] = state
|
|
176
|
+
resourceInputs["createdAt"] = state?.createdAt;
|
|
177
|
+
resourceInputs["createdById"] = state?.createdById;
|
|
178
|
+
resourceInputs["errors"] = state?.errors;
|
|
179
|
+
resourceInputs["groupId"] = state?.groupId;
|
|
180
|
+
resourceInputs["projectConfig"] = state?.projectConfig;
|
|
181
|
+
resourceInputs["runTests"] = state?.runTests;
|
|
182
|
+
resourceInputs["status"] = state?.status;
|
|
183
|
+
resourceInputs["type"] = state?.type;
|
|
71
184
|
}
|
|
72
185
|
else {
|
|
73
186
|
const args = argsOrState;
|
|
74
|
-
if (
|
|
187
|
+
if (args?.groupId === undefined && !opts.urn) {
|
|
75
188
|
throw new Error("Missing required property 'groupId'");
|
|
76
189
|
}
|
|
77
|
-
if (
|
|
190
|
+
if (args?.type === undefined && !opts.urn) {
|
|
78
191
|
throw new Error("Missing required property 'type'");
|
|
79
192
|
}
|
|
80
|
-
resourceInputs["groupId"] = args
|
|
81
|
-
resourceInputs["projectConfig"] = args
|
|
82
|
-
resourceInputs["runTests"] = args
|
|
83
|
-
resourceInputs["type"] = args
|
|
193
|
+
resourceInputs["groupId"] = args?.groupId;
|
|
194
|
+
resourceInputs["projectConfig"] = args?.projectConfig;
|
|
195
|
+
resourceInputs["runTests"] = args?.runTests;
|
|
196
|
+
resourceInputs["type"] = args?.type;
|
|
84
197
|
resourceInputs["createdAt"] = undefined /*out*/;
|
|
85
198
|
resourceInputs["createdById"] = undefined /*out*/;
|
|
86
199
|
resourceInputs["errors"] = undefined /*out*/;
|
|
@@ -91,6 +204,4 @@ class TransformationProject extends pulumi.CustomResource {
|
|
|
91
204
|
}
|
|
92
205
|
}
|
|
93
206
|
exports.TransformationProject = TransformationProject;
|
|
94
|
-
/** @internal */
|
|
95
|
-
TransformationProject.__pulumiType = 'fivetran:index/transformationProject:TransformationProject';
|
|
96
207
|
//# sourceMappingURL=transformationProject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformationProject.js","sourceRoot":"","sources":["../transformationProject.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"transformationProject.js","sourceRoot":"","sources":["../transformationProject.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACH,KAAK,EACL,MAAM,GACT,CAAC"}
|
package/types/index.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// *** WARNING: this file was generated by
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
4
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
28
|
exports.output = exports.input = void 0;
|
|
6
29
|
// Export sub-modules:
|
|
7
|
-
const input = require("./input");
|
|
30
|
+
const input = __importStar(require("./input"));
|
|
8
31
|
exports.input = input;
|
|
9
|
-
const output = require("./output");
|
|
32
|
+
const output = __importStar(require("./output"));
|
|
10
33
|
exports.output = output;
|
|
11
34
|
//# sourceMappingURL=index.js.map
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAIjF,sBAAsB;AACtB,+CAAiC;AAI7B,sBAAK;AAHT,iDAAmC;AAI/B,wBAAM"}
|