Skip to content

Commit 9fcee8b

Browse files
committed
Upgrade to latest p-go-provider and switch to AssetOrArchive
1 parent b640abb commit 9fcee8b

File tree

16 files changed

+352
-360
lines changed

16 files changed

+352
-360
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
@@ -477,18 +477,14 @@
477477
"description": "The parameters with which to connect to the remote host.",
478478
"secret": true
479479
},
480-
"localArchive": {
481-
"$ref": "pulumi.json#/Archive",
482-
"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."
483-
},
484-
"localAsset": {
485-
"$ref": "pulumi.json#/Asset",
486-
"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."
487-
},
488480
"remotePath": {
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": {
@@ -501,26 +497,23 @@
501497
"type": "object",
502498
"required": [
503499
"connection",
504-
"remotePath"
500+
"remotePath",
501+
"source"
505502
],
506503
"inputProperties": {
507504
"connection": {
508505
"$ref": "#/types/command:remote:Connection",
509506
"description": "The parameters with which to connect to the remote host.",
510507
"secret": true
511508
},
512-
"localArchive": {
513-
"$ref": "pulumi.json#/Archive",
514-
"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."
515-
},
516-
"localAsset": {
517-
"$ref": "pulumi.json#/Asset",
518-
"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."
519-
},
520509
"remotePath": {
521510
"type": "string",
522511
"description": "The destination path in the remote host."
523512
},
513+
"source": {
514+
"$ref": "pulumi.json#/Asset",
515+
"description": "An asset or an archive to upload as the source of the copy. It must be path based."
516+
},
524517
"triggers": {
525518
"type": "array",
526519
"items": {
@@ -532,7 +525,8 @@
532525
},
533526
"requiredInputs": [
534527
"connection",
535-
"remotePath"
528+
"remotePath",
529+
"source"
536530
]
537531
}
538532
},

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.117.0
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.117.0 // 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)