@@ -86,6 +86,10 @@ func (fs windowsOSCommand) NewCopyFile(runner Runner, name string, localPath, re
86
86
return runner .newCopyFile (name , localPath , remotePath , opts ... )
87
87
}
88
88
89
+ func (fs windowsOSCommand ) NewCopyToRemoteFile (runner Runner , name string , localPath , remotePath pulumi.StringInput , opts ... pulumi.ResourceOption ) (pulumi.Resource , error ) {
90
+ return runner .newCopyToRemoteFile (name , localPath , remotePath , opts ... )
91
+ }
92
+
89
93
func (fs windowsOSCommand ) MoveFile (runner Runner , name string , source , destination pulumi.StringInput , sudo bool , opts ... pulumi.ResourceOption ) (Command , error ) {
90
94
backupPath := pulumi .Sprintf ("%v.%s" , destination , backupExtension )
91
95
copyCommand := pulumi .Sprintf (`Copy-Item -Path '%v' -Destination '%v'` , source , destination )
@@ -116,3 +120,16 @@ func (fs windowsOSCommand) copyRemoteFile(runner *RemoteRunner, name string, src
116
120
Triggers : pulumi.Array {src , dst },
117
121
}, utils .MergeOptions (runner .PulumiOptions (), opts ... )... )
118
122
}
123
+
124
+ func (fs windowsOSCommand ) copyRemoteFileV2 (runner * RemoteRunner , name string , src , dst pulumi.StringInput , opts ... pulumi.ResourceOption ) (pulumi.Resource , error ) {
125
+ srcAsset := src .ToStringOutput ().ApplyT (func (path string ) pulumi.AssetOrArchive {
126
+ return pulumi .NewFileAsset (path )
127
+ }).(pulumi.AssetOrArchiveOutput )
128
+
129
+ return remote .NewCopyToRemote (runner .Environment ().Ctx (), runner .Namer ().ResourceName ("copy" , name ), & remote.CopyToRemoteArgs {
130
+ Connection : runner .Config ().connection ,
131
+ Source : srcAsset ,
132
+ RemotePath : dst ,
133
+ Triggers : pulumi.Array {src , dst },
134
+ }, utils .MergeOptions (runner .PulumiOptions (), opts ... )... )
135
+ }
0 commit comments