Skip to content

Commit e156726

Browse files
committed
Upgrade to latest p-go-provider and switch to AssetOrArchive
1 parent f2c18ae commit e156726

File tree

16 files changed

+362
-370
lines changed

16 files changed

+362
-370
lines changed

examples/ec2_dir_copy/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ export = async () => {
7070
const archive = new pulumi.asset.FileArchive(from);
7171
const copy = new remote.Copy("copy", {
7272
connection,
73-
archive: archive,
73+
source: archive,
7474
remotePath: to,
7575
}, { dependsOn: poll });
7676

77-
// Run `ls` on the remote to verify that the expected files were copied there.
77+
// Verify that the expected files were copied to the remote.
7878
// We want to run this after each copy, i.e., when something changed, but not otherwise to avoid unclean refreshes.
7979
// We use the hash of the source directory as a trigger to achieve this, since the trigger needs to be a primitive
8080
// value and we cannot use the Copy resource itself.

provider/cmd/pulumi-resource-command/schema.json

+12-18
Original file line numberDiff line numberDiff line change
@@ -472,14 +472,6 @@
472472
"command:remote:Copy": {
473473
"description": "Copy an Asset or Archive to a remote host.",
474474
"properties": {
475-
"archive": {
476-
"$ref": "pulumi.json#/Archive",
477-
"description": "An archive to upload as the source of the copy. It must be a path based archive. Only one of Asset or Archive can be set."
478-
},
479-
"asset": {
480-
"$ref": "pulumi.json#/Asset",
481-
"description": "An asset to upload as the source of the copy. It must be a path based asset. Only one of Asset or Archive can be set."
482-
},
483475
"connection": {
484476
"$ref": "#/types/command:remote:Connection",
485477
"description": "The parameters with which to connect to the remote host.",
@@ -489,6 +481,10 @@
489481
"type": "string",
490482
"description": "The destination path in the remote host."
491483
},
484+
"source": {
485+
"$ref": "pulumi.json#/Asset",
486+
"description": "An asset or an archive to upload as the source of the copy. It must be path based."
487+
},
492488
"triggers": {
493489
"type": "array",
494490
"items": {
@@ -500,17 +496,10 @@
500496
"type": "object",
501497
"required": [
502498
"connection",
503-
"remotePath"
499+
"remotePath",
500+
"source"
504501
],
505502
"inputProperties": {
506-
"archive": {
507-
"$ref": "pulumi.json#/Archive",
508-
"description": "An archive to upload as the source of the copy. It must be a path based archive. Only one of Asset or Archive can be set."
509-
},
510-
"asset": {
511-
"$ref": "pulumi.json#/Asset",
512-
"description": "An asset to upload as the source of the copy. It must be a path based asset. Only one of Asset or Archive can be set."
513-
},
514503
"connection": {
515504
"$ref": "#/types/command:remote:Connection",
516505
"description": "The parameters with which to connect to the remote host.",
@@ -520,6 +509,10 @@
520509
"type": "string",
521510
"description": "The destination path in the remote host."
522511
},
512+
"source": {
513+
"$ref": "pulumi.json#/Asset",
514+
"description": "An asset or an archive to upload as the source of the copy. It must be path based."
515+
},
523516
"triggers": {
524517
"type": "array",
525518
"items": {
@@ -530,7 +523,8 @@
530523
},
531524
"requiredInputs": [
532525
"connection",
533-
"remotePath"
526+
"remotePath",
527+
"source"
534528
]
535529
}
536530
},

provider/go.mod

+22-18
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ require (
66
github.com/gliderlabs/ssh v0.3.7
77
github.com/gobwas/glob v0.2.3
88
github.com/pkg/sftp v1.13.6
9-
github.com/pulumi/pulumi-go-provider v0.17.0
10-
github.com/pulumi/pulumi/sdk/v3 v3.116.1
9+
github.com/pulumi/pulumi-go-provider v0.19.0
10+
github.com/pulumi/pulumi/sdk/v3 v3.120.0
1111
github.com/stretchr/testify v1.9.0
12-
golang.org/x/crypto v0.23.0
12+
golang.org/x/crypto v0.24.0
1313
)
1414

1515
require (
@@ -24,10 +24,14 @@ require (
2424
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
2525
github.com/blang/semver v3.5.1+incompatible // indirect
2626
github.com/charmbracelet/bubbles v0.18.0 // indirect
27-
github.com/charmbracelet/bubbletea v0.26.2 // indirect
28-
github.com/charmbracelet/lipgloss v0.10.0 // indirect
27+
github.com/charmbracelet/bubbletea v0.26.4 // indirect
28+
github.com/charmbracelet/lipgloss v0.11.0 // indirect
29+
github.com/charmbracelet/x/ansi v0.1.2 // indirect
30+
github.com/charmbracelet/x/input v0.1.2 // indirect
31+
github.com/charmbracelet/x/term v0.1.1 // indirect
32+
github.com/charmbracelet/x/windows v0.1.2 // indirect
2933
github.com/cheggaaa/pb v1.0.29 // indirect
30-
github.com/cloudflare/circl v1.3.8 // indirect
34+
github.com/cloudflare/circl v1.3.9 // indirect
3135
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
3236
github.com/davecgh/go-spew v1.1.1 // indirect
3337
github.com/djherbis/times v1.6.0 // indirect
@@ -57,7 +61,6 @@ require (
5761
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
5862
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
5963
github.com/muesli/cancelreader v0.2.2 // indirect
60-
github.com/muesli/reflow v0.3.0 // indirect
6164
github.com/muesli/termenv v0.15.2 // indirect
6265
github.com/natefinch/atomic v1.0.1 // indirect
6366
github.com/opentracing/basictracer-go v1.1.0 // indirect
@@ -69,8 +72,8 @@ require (
6972
github.com/pkg/term v1.1.0 // indirect
7073
github.com/pmezard/go-difflib v1.0.0 // indirect
7174
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
72-
github.com/pulumi/esc v0.8.3 // indirect
73-
github.com/pulumi/pulumi/pkg/v3 v3.116.1 // indirect
75+
github.com/pulumi/esc v0.9.1 // indirect
76+
github.com/pulumi/pulumi/pkg/v3 v3.120.0 // indirect
7477
github.com/rivo/uniseg v0.4.7 // indirect
7578
github.com/rogpeppe/go-internal v1.12.0 // indirect
7679
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
@@ -86,19 +89,20 @@ require (
8689
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
8790
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
8891
github.com/xanzy/ssh-agent v0.3.3 // indirect
92+
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
8993
github.com/zclconf/go-cty v1.14.4 // indirect
9094
go.uber.org/atomic v1.11.0 // indirect
91-
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
92-
golang.org/x/mod v0.17.0 // indirect
93-
golang.org/x/net v0.25.0 // indirect
95+
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
96+
golang.org/x/mod v0.18.0 // indirect
97+
golang.org/x/net v0.26.0 // indirect
9498
golang.org/x/sync v0.7.0 // indirect
95-
golang.org/x/sys v0.20.0 // indirect
96-
golang.org/x/term v0.20.0 // indirect
97-
golang.org/x/text v0.15.0 // indirect
98-
golang.org/x/tools v0.21.0 // indirect
99-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
99+
golang.org/x/sys v0.21.0 // indirect
100+
golang.org/x/term v0.21.0 // indirect
101+
golang.org/x/text v0.16.0 // indirect
102+
golang.org/x/tools v0.22.0 // indirect
103+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 // indirect
100104
google.golang.org/grpc v1.64.0 // indirect
101-
google.golang.org/protobuf v1.34.1 // indirect
105+
google.golang.org/protobuf v1.34.2 // indirect
102106
gopkg.in/warnings.v0 v0.1.2 // indirect
103107
gopkg.in/yaml.v3 v3.0.1 // indirect
104108
lukechampine.com/frand v1.4.2 // indirect

0 commit comments

Comments
 (0)