@pulumi/command 0.0.1-alpha.100
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 +202 -0
- package/README.md +400 -0
- package/index.d.ts +7 -0
- package/index.js +26 -0
- package/index.js.map +1 -0
- package/local/command.d.ts +404 -0
- package/local/command.js +164 -0
- package/local/command.js.map +1 -0
- package/local/index.d.ts +7 -0
- package/local/index.js +41 -0
- package/local/index.js.map +1 -0
- package/local/run.d.ts +391 -0
- package/local/run.js +46 -0
- package/local/run.js.map +1 -0
- package/package.json +29 -0
- package/package.json.dev +28 -0
- package/provider.d.ts +21 -0
- package/provider.js +38 -0
- package/provider.js.map +1 -0
- package/remote/command.d.ts +206 -0
- package/remote/command.js +141 -0
- package/remote/command.js.map +1 -0
- package/remote/copyFile.d.ts +70 -0
- package/remote/copyFile.js +79 -0
- package/remote/copyFile.js.map +1 -0
- package/remote/copyToRemote.d.ts +125 -0
- package/remote/copyToRemote.js +134 -0
- package/remote/copyToRemote.js.map +1 -0
- package/remote/index.d.ts +10 -0
- package/remote/index.js +46 -0
- package/remote/index.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +21 -0
- package/types/enums/index.d.ts +3 -0
- package/types/enums/index.js +11 -0
- package/types/enums/index.js.map +1 -0
- package/types/enums/local/index.d.ts +19 -0
- package/types/enums/local/index.js +24 -0
- package/types/enums/local/index.js.map +1 -0
- package/types/enums/remote/index.d.ts +19 -0
- package/types/enums/remote/index.js +24 -0
- package/types/enums/remote/index.js.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +13 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +98 -0
- package/types/input.js +27 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +97 -0
- package/types/output.js +26 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +8 -0
- package/utilities.js +101 -0
- package/utilities.js.map +1 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
import * as enums from "../types/enums";
|
|
5
|
+
/**
|
|
6
|
+
* A command to run on a remote host. The connection is established via ssh.
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ### A Basic Example
|
|
11
|
+
* This program connects to a server and runs the `hostname` command. The output is then available via the `stdout` property.
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as command from "@pulumi/command";
|
|
16
|
+
*
|
|
17
|
+
* const config = new pulumi.Config();
|
|
18
|
+
* const server = config.require("server");
|
|
19
|
+
* const userName = config.require("userName");
|
|
20
|
+
* const privateKey = config.require("privateKey");
|
|
21
|
+
*
|
|
22
|
+
* const hostnameCmd = new command.remote.Command("hostnameCmd", {
|
|
23
|
+
* create: "hostname",
|
|
24
|
+
* connection: {
|
|
25
|
+
* host: server,
|
|
26
|
+
* user: userName,
|
|
27
|
+
* privateKey: privateKey,
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* export const hostname = hostnameCmd.stdout;
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* ### Triggers
|
|
34
|
+
* This example defines several trigger values of various kinds. Changes to any of them will cause `cmd` to be re-run.
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
38
|
+
* import * as command from "@pulumi/command";
|
|
39
|
+
* import * as random from "@pulumi/random";
|
|
40
|
+
*
|
|
41
|
+
* const str = "foo";
|
|
42
|
+
* const fileAsset = new pulumi.asset.FileAsset("Pulumi.yaml");
|
|
43
|
+
* const rand = new random.RandomString("rand", {length: 5});
|
|
44
|
+
* const localFile = new command.local.Command("localFile", {
|
|
45
|
+
* create: "touch foo.txt",
|
|
46
|
+
* archivePaths: ["*.txt"],
|
|
47
|
+
* });
|
|
48
|
+
* const cmd = new command.remote.Command("cmd", {
|
|
49
|
+
* connection: {
|
|
50
|
+
* host: "insert host here",
|
|
51
|
+
* },
|
|
52
|
+
* create: "echo create > op.txt",
|
|
53
|
+
* delete: "echo delete >> op.txt",
|
|
54
|
+
* triggers: [
|
|
55
|
+
* str,
|
|
56
|
+
* rand.result,
|
|
57
|
+
* fileAsset,
|
|
58
|
+
* localFile.archive,
|
|
59
|
+
* ],
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare class Command extends pulumi.CustomResource {
|
|
65
|
+
/**
|
|
66
|
+
* Get an existing Command resource's state with the given name, ID, and optional extra
|
|
67
|
+
* properties used to qualify the lookup.
|
|
68
|
+
*
|
|
69
|
+
* @param name The _unique_ name of the resulting resource.
|
|
70
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
71
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
72
|
+
*/
|
|
73
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Command;
|
|
74
|
+
/**
|
|
75
|
+
* Returns true if the given object is an instance of Command. This is designed to work even
|
|
76
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
77
|
+
*/
|
|
78
|
+
static isInstance(obj: any): obj is Command;
|
|
79
|
+
/**
|
|
80
|
+
* If the previous command's stdout and stderr (as generated by the prior create/update) is
|
|
81
|
+
* injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
|
|
82
|
+
* Defaults to true.
|
|
83
|
+
*/
|
|
84
|
+
readonly addPreviousOutputInEnv: pulumi.Output<boolean | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* The parameters with which to connect to the remote host.
|
|
87
|
+
*/
|
|
88
|
+
readonly connection: pulumi.Output<outputs.remote.Connection>;
|
|
89
|
+
/**
|
|
90
|
+
* The command to run on create.
|
|
91
|
+
*/
|
|
92
|
+
readonly create: pulumi.Output<string | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* The command to run on delete. The environment variables PULUMI_COMMAND_STDOUT
|
|
95
|
+
* and PULUMI_COMMAND_STDERR are set to the stdout and stderr properties of the
|
|
96
|
+
* Command resource from previous create or update steps.
|
|
97
|
+
*/
|
|
98
|
+
readonly delete: pulumi.Output<string | undefined>;
|
|
99
|
+
/**
|
|
100
|
+
* Additional environment variables available to the command's process.
|
|
101
|
+
* Note that this only works if the SSH server is configured to accept these variables via AcceptEnv.
|
|
102
|
+
* Alternatively, if a Bash-like shell runs the command on the remote host, you could prefix the command itself
|
|
103
|
+
* with the variables in the form 'VAR=value command'.
|
|
104
|
+
*/
|
|
105
|
+
readonly environment: pulumi.Output<{
|
|
106
|
+
[key: string]: string;
|
|
107
|
+
} | undefined>;
|
|
108
|
+
/**
|
|
109
|
+
* If the command's stdout and stderr should be logged. This doesn't affect the capturing of
|
|
110
|
+
* stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
|
|
111
|
+
* outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
|
|
112
|
+
*/
|
|
113
|
+
readonly logging: pulumi.Output<enums.remote.Logging | undefined>;
|
|
114
|
+
/**
|
|
115
|
+
* The standard error of the command's process
|
|
116
|
+
*/
|
|
117
|
+
readonly stderr: pulumi.Output<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Pass a string to the command's process as standard in
|
|
120
|
+
*/
|
|
121
|
+
readonly stdin: pulumi.Output<string | undefined>;
|
|
122
|
+
/**
|
|
123
|
+
* The standard output of the command's process
|
|
124
|
+
*/
|
|
125
|
+
readonly stdout: pulumi.Output<string>;
|
|
126
|
+
/**
|
|
127
|
+
* Trigger a resource replacement on changes to any of these values. The
|
|
128
|
+
* trigger values can be of any type. If a value is different in the current update compared to the
|
|
129
|
+
* previous update, the resource will be replaced, i.e., the "create" command will be re-run.
|
|
130
|
+
* Please see the resource documentation for examples.
|
|
131
|
+
*/
|
|
132
|
+
readonly triggers: pulumi.Output<any[] | undefined>;
|
|
133
|
+
/**
|
|
134
|
+
* The command to run on update, if empty, create will
|
|
135
|
+
* run again. The environment variables PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR
|
|
136
|
+
* are set to the stdout and stderr properties of the Command resource from previous
|
|
137
|
+
* create or update steps.
|
|
138
|
+
*/
|
|
139
|
+
readonly update: pulumi.Output<string | undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* Create a Command resource with the given unique name, arguments, and options.
|
|
142
|
+
*
|
|
143
|
+
* @param name The _unique_ name of the resource.
|
|
144
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
145
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
146
|
+
*/
|
|
147
|
+
constructor(name: string, args: CommandArgs, opts?: pulumi.CustomResourceOptions);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The set of arguments for constructing a Command resource.
|
|
151
|
+
*/
|
|
152
|
+
export interface CommandArgs {
|
|
153
|
+
/**
|
|
154
|
+
* If the previous command's stdout and stderr (as generated by the prior create/update) is
|
|
155
|
+
* injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
|
|
156
|
+
* Defaults to true.
|
|
157
|
+
*/
|
|
158
|
+
addPreviousOutputInEnv?: pulumi.Input<boolean>;
|
|
159
|
+
/**
|
|
160
|
+
* The parameters with which to connect to the remote host.
|
|
161
|
+
*/
|
|
162
|
+
connection: pulumi.Input<inputs.remote.ConnectionArgs>;
|
|
163
|
+
/**
|
|
164
|
+
* The command to run on create.
|
|
165
|
+
*/
|
|
166
|
+
create?: pulumi.Input<string>;
|
|
167
|
+
/**
|
|
168
|
+
* The command to run on delete. The environment variables PULUMI_COMMAND_STDOUT
|
|
169
|
+
* and PULUMI_COMMAND_STDERR are set to the stdout and stderr properties of the
|
|
170
|
+
* Command resource from previous create or update steps.
|
|
171
|
+
*/
|
|
172
|
+
delete?: pulumi.Input<string>;
|
|
173
|
+
/**
|
|
174
|
+
* Additional environment variables available to the command's process.
|
|
175
|
+
* Note that this only works if the SSH server is configured to accept these variables via AcceptEnv.
|
|
176
|
+
* Alternatively, if a Bash-like shell runs the command on the remote host, you could prefix the command itself
|
|
177
|
+
* with the variables in the form 'VAR=value command'.
|
|
178
|
+
*/
|
|
179
|
+
environment?: pulumi.Input<{
|
|
180
|
+
[key: string]: pulumi.Input<string>;
|
|
181
|
+
}>;
|
|
182
|
+
/**
|
|
183
|
+
* If the command's stdout and stderr should be logged. This doesn't affect the capturing of
|
|
184
|
+
* stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
|
|
185
|
+
* outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
|
|
186
|
+
*/
|
|
187
|
+
logging?: pulumi.Input<enums.remote.Logging>;
|
|
188
|
+
/**
|
|
189
|
+
* Pass a string to the command's process as standard in
|
|
190
|
+
*/
|
|
191
|
+
stdin?: pulumi.Input<string>;
|
|
192
|
+
/**
|
|
193
|
+
* Trigger a resource replacement on changes to any of these values. The
|
|
194
|
+
* trigger values can be of any type. If a value is different in the current update compared to the
|
|
195
|
+
* previous update, the resource will be replaced, i.e., the "create" command will be re-run.
|
|
196
|
+
* Please see the resource documentation for examples.
|
|
197
|
+
*/
|
|
198
|
+
triggers?: pulumi.Input<any[]>;
|
|
199
|
+
/**
|
|
200
|
+
* The command to run on update, if empty, create will
|
|
201
|
+
* run again. The environment variables PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR
|
|
202
|
+
* are set to the stdout and stderr properties of the Command resource from previous
|
|
203
|
+
* create or update steps.
|
|
204
|
+
*/
|
|
205
|
+
update?: pulumi.Input<string>;
|
|
206
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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.Command = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const inputs = require("../types/input");
|
|
8
|
+
const utilities = require("../utilities");
|
|
9
|
+
/**
|
|
10
|
+
* A command to run on a remote host. The connection is established via ssh.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ### A Basic Example
|
|
15
|
+
* This program connects to a server and runs the `hostname` command. The output is then available via the `stdout` property.
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
+
* import * as command from "@pulumi/command";
|
|
20
|
+
*
|
|
21
|
+
* const config = new pulumi.Config();
|
|
22
|
+
* const server = config.require("server");
|
|
23
|
+
* const userName = config.require("userName");
|
|
24
|
+
* const privateKey = config.require("privateKey");
|
|
25
|
+
*
|
|
26
|
+
* const hostnameCmd = new command.remote.Command("hostnameCmd", {
|
|
27
|
+
* create: "hostname",
|
|
28
|
+
* connection: {
|
|
29
|
+
* host: server,
|
|
30
|
+
* user: userName,
|
|
31
|
+
* privateKey: privateKey,
|
|
32
|
+
* },
|
|
33
|
+
* });
|
|
34
|
+
* export const hostname = hostnameCmd.stdout;
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ### Triggers
|
|
38
|
+
* This example defines several trigger values of various kinds. Changes to any of them will cause `cmd` to be re-run.
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as command from "@pulumi/command";
|
|
43
|
+
* import * as random from "@pulumi/random";
|
|
44
|
+
*
|
|
45
|
+
* const str = "foo";
|
|
46
|
+
* const fileAsset = new pulumi.asset.FileAsset("Pulumi.yaml");
|
|
47
|
+
* const rand = new random.RandomString("rand", {length: 5});
|
|
48
|
+
* const localFile = new command.local.Command("localFile", {
|
|
49
|
+
* create: "touch foo.txt",
|
|
50
|
+
* archivePaths: ["*.txt"],
|
|
51
|
+
* });
|
|
52
|
+
* const cmd = new command.remote.Command("cmd", {
|
|
53
|
+
* connection: {
|
|
54
|
+
* host: "insert host here",
|
|
55
|
+
* },
|
|
56
|
+
* create: "echo create > op.txt",
|
|
57
|
+
* delete: "echo delete >> op.txt",
|
|
58
|
+
* triggers: [
|
|
59
|
+
* str,
|
|
60
|
+
* rand.result,
|
|
61
|
+
* fileAsset,
|
|
62
|
+
* localFile.archive,
|
|
63
|
+
* ],
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
class Command extends pulumi.CustomResource {
|
|
69
|
+
/**
|
|
70
|
+
* Get an existing Command resource's state with the given name, ID, and optional extra
|
|
71
|
+
* properties used to qualify the lookup.
|
|
72
|
+
*
|
|
73
|
+
* @param name The _unique_ name of the resulting resource.
|
|
74
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
75
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
76
|
+
*/
|
|
77
|
+
static get(name, id, opts) {
|
|
78
|
+
return new Command(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns true if the given object is an instance of Command. This is designed to work even
|
|
82
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
83
|
+
*/
|
|
84
|
+
static isInstance(obj) {
|
|
85
|
+
if (obj === undefined || obj === null) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return obj['__pulumiType'] === Command.__pulumiType;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Create a Command resource with the given unique name, arguments, and options.
|
|
92
|
+
*
|
|
93
|
+
* @param name The _unique_ name of the resource.
|
|
94
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
95
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
96
|
+
*/
|
|
97
|
+
constructor(name, args, opts) {
|
|
98
|
+
var _a;
|
|
99
|
+
let resourceInputs = {};
|
|
100
|
+
opts = opts || {};
|
|
101
|
+
if (!opts.id) {
|
|
102
|
+
if ((!args || args.connection === undefined) && !opts.urn) {
|
|
103
|
+
throw new Error("Missing required property 'connection'");
|
|
104
|
+
}
|
|
105
|
+
resourceInputs["addPreviousOutputInEnv"] = (_a = (args ? args.addPreviousOutputInEnv : undefined)) !== null && _a !== void 0 ? _a : true;
|
|
106
|
+
resourceInputs["connection"] = (args === null || args === void 0 ? void 0 : args.connection) ? pulumi.secret((args.connection ? pulumi.output(args.connection).apply(inputs.remote.connectionArgsProvideDefaults) : undefined)) : undefined;
|
|
107
|
+
resourceInputs["create"] = args ? args.create : undefined;
|
|
108
|
+
resourceInputs["delete"] = args ? args.delete : undefined;
|
|
109
|
+
resourceInputs["environment"] = args ? args.environment : undefined;
|
|
110
|
+
resourceInputs["logging"] = args ? args.logging : undefined;
|
|
111
|
+
resourceInputs["stdin"] = args ? args.stdin : undefined;
|
|
112
|
+
resourceInputs["triggers"] = args ? args.triggers : undefined;
|
|
113
|
+
resourceInputs["update"] = args ? args.update : undefined;
|
|
114
|
+
resourceInputs["stderr"] = undefined /*out*/;
|
|
115
|
+
resourceInputs["stdout"] = undefined /*out*/;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
resourceInputs["addPreviousOutputInEnv"] = undefined /*out*/;
|
|
119
|
+
resourceInputs["connection"] = undefined /*out*/;
|
|
120
|
+
resourceInputs["create"] = undefined /*out*/;
|
|
121
|
+
resourceInputs["delete"] = undefined /*out*/;
|
|
122
|
+
resourceInputs["environment"] = undefined /*out*/;
|
|
123
|
+
resourceInputs["logging"] = undefined /*out*/;
|
|
124
|
+
resourceInputs["stderr"] = undefined /*out*/;
|
|
125
|
+
resourceInputs["stdin"] = undefined /*out*/;
|
|
126
|
+
resourceInputs["stdout"] = undefined /*out*/;
|
|
127
|
+
resourceInputs["triggers"] = undefined /*out*/;
|
|
128
|
+
resourceInputs["update"] = undefined /*out*/;
|
|
129
|
+
}
|
|
130
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
131
|
+
const secretOpts = { additionalSecretOutputs: ["connection"] };
|
|
132
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
133
|
+
const replaceOnChanges = { replaceOnChanges: ["triggers[*]"] };
|
|
134
|
+
opts = pulumi.mergeOptions(opts, replaceOnChanges);
|
|
135
|
+
super(Command.__pulumiType, name, resourceInputs, opts);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.Command = Command;
|
|
139
|
+
/** @internal */
|
|
140
|
+
Command.__pulumiType = 'command:remote:Command';
|
|
141
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../remote/command.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,MAAa,OAAQ,SAAQ,MAAM,CAAC,cAAc;IAC9C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,SAAgB,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACpE,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,OAAO,CAAC,YAAY,CAAC;IACxD,CAAC;IA8DD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAiB,EAAE,IAAmC;;Q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AM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;QAC/D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,MAAM,gBAAgB,GAAG,EAAE,gBAAgB,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;QAC/D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACnD,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;;AAnIL,0BAoIC;AAvHG,gBAAgB;AACO,oBAAY,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Copy a local file to a remote host.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CopyFile extends pulumi.CustomResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get an existing CopyFile resource's state with the given name, ID, and optional extra
|
|
12
|
+
* properties used to qualify the lookup.
|
|
13
|
+
*
|
|
14
|
+
* @param name The _unique_ name of the resulting resource.
|
|
15
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
16
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
17
|
+
*/
|
|
18
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): CopyFile;
|
|
19
|
+
/**
|
|
20
|
+
* Returns true if the given object is an instance of CopyFile. This is designed to work even
|
|
21
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
22
|
+
*/
|
|
23
|
+
static isInstance(obj: any): obj is CopyFile;
|
|
24
|
+
/**
|
|
25
|
+
* The parameters with which to connect to the remote host.
|
|
26
|
+
*/
|
|
27
|
+
readonly connection: pulumi.Output<outputs.remote.Connection>;
|
|
28
|
+
/**
|
|
29
|
+
* The path of the file to be copied.
|
|
30
|
+
*/
|
|
31
|
+
readonly localPath: pulumi.Output<string>;
|
|
32
|
+
/**
|
|
33
|
+
* The destination path in the remote host.
|
|
34
|
+
*/
|
|
35
|
+
readonly remotePath: pulumi.Output<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Trigger replacements on changes to this input.
|
|
38
|
+
*/
|
|
39
|
+
readonly triggers: pulumi.Output<any[] | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a CopyFile resource with the given unique name, arguments, and options.
|
|
42
|
+
*
|
|
43
|
+
* @param name The _unique_ name of the resource.
|
|
44
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
45
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
46
|
+
*/
|
|
47
|
+
/** @deprecated This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead. */
|
|
48
|
+
constructor(name: string, args: CopyFileArgs, opts?: pulumi.CustomResourceOptions);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The set of arguments for constructing a CopyFile resource.
|
|
52
|
+
*/
|
|
53
|
+
export interface CopyFileArgs {
|
|
54
|
+
/**
|
|
55
|
+
* The parameters with which to connect to the remote host.
|
|
56
|
+
*/
|
|
57
|
+
connection: pulumi.Input<inputs.remote.ConnectionArgs>;
|
|
58
|
+
/**
|
|
59
|
+
* The path of the file to be copied.
|
|
60
|
+
*/
|
|
61
|
+
localPath: pulumi.Input<string>;
|
|
62
|
+
/**
|
|
63
|
+
* The destination path in the remote host.
|
|
64
|
+
*/
|
|
65
|
+
remotePath: pulumi.Input<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Trigger replacements on changes to this input.
|
|
68
|
+
*/
|
|
69
|
+
triggers?: pulumi.Input<any[]>;
|
|
70
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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.CopyFile = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const inputs = require("../types/input");
|
|
8
|
+
const utilities = require("../utilities");
|
|
9
|
+
/**
|
|
10
|
+
* Copy a local file to a remote host.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead.
|
|
13
|
+
*/
|
|
14
|
+
class CopyFile extends pulumi.CustomResource {
|
|
15
|
+
/**
|
|
16
|
+
* Get an existing CopyFile resource's state with the given name, ID, and optional extra
|
|
17
|
+
* properties used to qualify the lookup.
|
|
18
|
+
*
|
|
19
|
+
* @param name The _unique_ name of the resulting resource.
|
|
20
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
21
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
22
|
+
*/
|
|
23
|
+
static get(name, id, opts) {
|
|
24
|
+
pulumi.log.warn("CopyFile is deprecated: This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead.");
|
|
25
|
+
return new CopyFile(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns true if the given object is an instance of CopyFile. This is designed to work even
|
|
29
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
30
|
+
*/
|
|
31
|
+
static isInstance(obj) {
|
|
32
|
+
if (obj === undefined || obj === null) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return obj['__pulumiType'] === CopyFile.__pulumiType;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create a CopyFile resource with the given unique name, arguments, and options.
|
|
39
|
+
*
|
|
40
|
+
* @param name The _unique_ name of the resource.
|
|
41
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
42
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
43
|
+
*/
|
|
44
|
+
/** @deprecated This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead. */
|
|
45
|
+
constructor(name, args, opts) {
|
|
46
|
+
pulumi.log.warn("CopyFile is deprecated: This resource is deprecated and will be removed in a future release. Please use the `CopyToRemote` resource instead.");
|
|
47
|
+
let resourceInputs = {};
|
|
48
|
+
opts = opts || {};
|
|
49
|
+
if (!opts.id) {
|
|
50
|
+
if ((!args || args.connection === undefined) && !opts.urn) {
|
|
51
|
+
throw new Error("Missing required property 'connection'");
|
|
52
|
+
}
|
|
53
|
+
if ((!args || args.localPath === undefined) && !opts.urn) {
|
|
54
|
+
throw new Error("Missing required property 'localPath'");
|
|
55
|
+
}
|
|
56
|
+
if ((!args || args.remotePath === undefined) && !opts.urn) {
|
|
57
|
+
throw new Error("Missing required property 'remotePath'");
|
|
58
|
+
}
|
|
59
|
+
resourceInputs["connection"] = (args === null || args === void 0 ? void 0 : args.connection) ? pulumi.secret((args.connection ? pulumi.output(args.connection).apply(inputs.remote.connectionArgsProvideDefaults) : undefined)) : undefined;
|
|
60
|
+
resourceInputs["localPath"] = args ? args.localPath : undefined;
|
|
61
|
+
resourceInputs["remotePath"] = args ? args.remotePath : undefined;
|
|
62
|
+
resourceInputs["triggers"] = args ? args.triggers : undefined;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
resourceInputs["connection"] = undefined /*out*/;
|
|
66
|
+
resourceInputs["localPath"] = undefined /*out*/;
|
|
67
|
+
resourceInputs["remotePath"] = undefined /*out*/;
|
|
68
|
+
resourceInputs["triggers"] = undefined /*out*/;
|
|
69
|
+
}
|
|
70
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
71
|
+
const secretOpts = { additionalSecretOutputs: ["connection"] };
|
|
72
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
73
|
+
super(CopyFile.__pulumiType, name, resourceInputs, opts);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.CopyFile = CopyFile;
|
|
77
|
+
/** @internal */
|
|
78
|
+
CopyFile.__pulumiType = 'command:remote:CopyFile';
|
|
79
|
+
//# sourceMappingURL=copyFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyFile.js","sourceRoot":"","sources":["../../remote/copyFile.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;GAIG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,cAAc;IAC/C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,8IAA8I,CAAC,CAAA;QAC/J,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,SAAgB,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,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,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;IAmBD;;;;;;OAMG;IACH,uIAAuI;IACvI,YAAY,IAAY,EAAE,IAAkB,EAAE,IAAmC;QAC7E,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,8IAA8I,CAAC,CAAA;QAC/J,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,I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YACjD,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAClD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;QAC/D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AAjFL,4BAkFC;AApEG,gBAAgB;AACO,qBAAY,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Copy an Asset or Archive to a remote host.
|
|
6
|
+
*
|
|
7
|
+
* ## Example usage
|
|
8
|
+
*
|
|
9
|
+
* This example copies a local directory to a remote host via SSH. For brevity, the remote server is assumed to exist, but it could also be provisioned in the same Pulumi program.
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import { remote, types } from "@pulumi/command";
|
|
14
|
+
* import * as fs from "fs";
|
|
15
|
+
* import * as os from "os";
|
|
16
|
+
* import * as path from "path";
|
|
17
|
+
*
|
|
18
|
+
* export = async () => {
|
|
19
|
+
* const config = new pulumi.Config();
|
|
20
|
+
*
|
|
21
|
+
* // Get the private key to connect to the server. If a key is
|
|
22
|
+
* // provided, use it, otherwise default to the standard id_rsa SSH key.
|
|
23
|
+
* const privateKeyBase64 = config.get("privateKeyBase64");
|
|
24
|
+
* const privateKey = privateKeyBase64 ?
|
|
25
|
+
* Buffer.from(privateKeyBase64, 'base64').toString('ascii') :
|
|
26
|
+
* fs.readFileSync(path.join(os.homedir(), ".ssh", "id_rsa")).toString("utf8");
|
|
27
|
+
*
|
|
28
|
+
* const serverPublicIp = config.require("serverPublicIp");
|
|
29
|
+
* const userName = config.require("userName");
|
|
30
|
+
*
|
|
31
|
+
* // The configuration of our SSH connection to the instance.
|
|
32
|
+
* const connection: types.input.remote.ConnectionArgs = {
|
|
33
|
+
* host: serverPublicIp,
|
|
34
|
+
* user: userName,
|
|
35
|
+
* privateKey: privateKey,
|
|
36
|
+
* };
|
|
37
|
+
*
|
|
38
|
+
* // Set up source and target of the remote copy.
|
|
39
|
+
* const from = config.require("payload")!;
|
|
40
|
+
* const archive = new pulumi.asset.FileArchive(from);
|
|
41
|
+
* const to = config.require("destDir")!;
|
|
42
|
+
*
|
|
43
|
+
* // Copy the files to the remote.
|
|
44
|
+
* const copy = new remote.CopyToRemote("copy", {
|
|
45
|
+
* connection,
|
|
46
|
+
* source: archive,
|
|
47
|
+
* remotePath: to,
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* // Verify that the expected files were copied to the remote.
|
|
51
|
+
* // We want to run this after each copy, i.e., when something changed,
|
|
52
|
+
* // so we use the asset to be copied as a trigger.
|
|
53
|
+
* const find = new remote.Command("ls", {
|
|
54
|
+
* connection,
|
|
55
|
+
* create: `find ${to}/${from} | sort`,
|
|
56
|
+
* triggers: [archive],
|
|
57
|
+
* }, { dependsOn: copy });
|
|
58
|
+
*
|
|
59
|
+
* return {
|
|
60
|
+
* remoteContents: find.stdout
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare class CopyToRemote extends pulumi.CustomResource {
|
|
66
|
+
/**
|
|
67
|
+
* Get an existing CopyToRemote resource's state with the given name, ID, and optional extra
|
|
68
|
+
* properties used to qualify the lookup.
|
|
69
|
+
*
|
|
70
|
+
* @param name The _unique_ name of the resulting resource.
|
|
71
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
72
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
73
|
+
*/
|
|
74
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): CopyToRemote;
|
|
75
|
+
/**
|
|
76
|
+
* Returns true if the given object is an instance of CopyToRemote. This is designed to work even
|
|
77
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
78
|
+
*/
|
|
79
|
+
static isInstance(obj: any): obj is CopyToRemote;
|
|
80
|
+
/**
|
|
81
|
+
* The parameters with which to connect to the remote host.
|
|
82
|
+
*/
|
|
83
|
+
readonly connection: pulumi.Output<outputs.remote.Connection>;
|
|
84
|
+
/**
|
|
85
|
+
* The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
|
|
86
|
+
*/
|
|
87
|
+
readonly remotePath: pulumi.Output<string>;
|
|
88
|
+
/**
|
|
89
|
+
* An [asset or an archive](https://www.pulumi.com/docs/concepts/assets-archives/) to upload as the source of the copy. It must be path-based, i.e., be a `FileAsset` or a `FileArchive`. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
|
|
90
|
+
*/
|
|
91
|
+
readonly source: pulumi.Output<pulumi.asset.Asset | pulumi.asset.Archive>;
|
|
92
|
+
/**
|
|
93
|
+
* Trigger replacements on changes to this input.
|
|
94
|
+
*/
|
|
95
|
+
readonly triggers: pulumi.Output<any[] | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* Create a CopyToRemote resource with the given unique name, arguments, and options.
|
|
98
|
+
*
|
|
99
|
+
* @param name The _unique_ name of the resource.
|
|
100
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
101
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
102
|
+
*/
|
|
103
|
+
constructor(name: string, args: CopyToRemoteArgs, opts?: pulumi.CustomResourceOptions);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The set of arguments for constructing a CopyToRemote resource.
|
|
107
|
+
*/
|
|
108
|
+
export interface CopyToRemoteArgs {
|
|
109
|
+
/**
|
|
110
|
+
* The parameters with which to connect to the remote host.
|
|
111
|
+
*/
|
|
112
|
+
connection: pulumi.Input<inputs.remote.ConnectionArgs>;
|
|
113
|
+
/**
|
|
114
|
+
* The destination path on the remote host. The last element of the path will be created if it doesn't exist but it's an error when additional elements don't exist. When the remote path is an existing directory, the source file or directory will be copied into that directory. When the source is a file and the remote path is an existing file, that file will be overwritten. When the source is a directory and the remote path an existing file, the copy will fail.
|
|
115
|
+
*/
|
|
116
|
+
remotePath: pulumi.Input<string>;
|
|
117
|
+
/**
|
|
118
|
+
* An [asset or an archive](https://www.pulumi.com/docs/concepts/assets-archives/) to upload as the source of the copy. It must be path-based, i.e., be a `FileAsset` or a `FileArchive`. The item will be copied as-is; archives like .tgz will not be unpacked. Directories are copied recursively, overwriting existing files.
|
|
119
|
+
*/
|
|
120
|
+
source: pulumi.Input<pulumi.asset.Asset | pulumi.asset.Archive>;
|
|
121
|
+
/**
|
|
122
|
+
* Trigger replacements on changes to this input.
|
|
123
|
+
*/
|
|
124
|
+
triggers?: pulumi.Input<any[]>;
|
|
125
|
+
}
|