Skip to content

Commit 33e531d

Browse files
committed
Clarify property descriptions and names
1 parent c8c200f commit 33e531d

File tree

13 files changed

+205
-205
lines changed

13 files changed

+205
-205
lines changed

examples/ec2_dir_copy/index.ts

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

examples/ec2_remote/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ new local.Command("localPrivateIP", {
8282

8383
const sizeFile = new remote.Copy("size", {
8484
connection,
85-
localAsset: new asset.FileAsset("./size.ts"),
85+
asset: new asset.FileAsset("./size.ts"),
8686
remotePath: "size.ts",
8787
}, { dependsOn: poll })
8888

examples/ec2_remote_proxy/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ new local.Command("localPrivateIP", {
9292

9393
const sizeFile = new remote.Copy("size", {
9494
connection: connection,
95-
localAsset: new asset.FileAsset("./size.ts"),
95+
asset: new asset.FileAsset("./size.ts"),
9696
remotePath: "size.ts",
9797
}, { dependsOn: hostname })
9898

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

+16-16
Original file line numberDiff line numberDiff line change
@@ -447,19 +447,19 @@
447447
"command:remote:Copy": {
448448
"description": "Copy an Asset or Archive to a remote host.",
449449
"properties": {
450+
"archive": {
451+
"$ref": "pulumi.json#/Archive",
452+
"description": "An archive to upload as the source of the copy. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set."
453+
},
454+
"asset": {
455+
"$ref": "pulumi.json#/Asset",
456+
"description": "An asset to upload as the source of the copy. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set."
457+
},
450458
"connection": {
451459
"$ref": "#/types/command:remote:Connection",
452460
"description": "The parameters with which to connect to the remote host.",
453461
"secret": true
454462
},
455-
"localArchive": {
456-
"$ref": "pulumi.json#/Archive",
457-
"description": "An archive to upload. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set."
458-
},
459-
"localAsset": {
460-
"$ref": "pulumi.json#/Asset",
461-
"description": "An asset to upload. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set."
462-
},
463463
"remotePath": {
464464
"type": "string",
465465
"description": "The destination path in the remote host."
@@ -478,19 +478,19 @@
478478
"remotePath"
479479
],
480480
"inputProperties": {
481+
"archive": {
482+
"$ref": "pulumi.json#/Archive",
483+
"description": "An archive to upload as the source of the copy. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set."
484+
},
485+
"asset": {
486+
"$ref": "pulumi.json#/Asset",
487+
"description": "An asset to upload as the source of the copy. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set."
488+
},
481489
"connection": {
482490
"$ref": "#/types/command:remote:Connection",
483491
"description": "The parameters with which to connect to the remote host.",
484492
"secret": true
485493
},
486-
"localArchive": {
487-
"$ref": "pulumi.json#/Archive",
488-
"description": "An archive to upload. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set."
489-
},
490-
"localAsset": {
491-
"$ref": "pulumi.json#/Asset",
492-
"description": "An asset to upload. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set."
493-
},
494494
"remotePath": {
495495
"type": "string",
496496
"description": "The destination path in the remote host."

provider/pkg/provider/remote/copy.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,33 @@ func (c *Copy) Annotate(a infer.Annotator) {
3030
}
3131

3232
type CopyInputs struct {
33-
Connection *Connection `pulumi:"connection" provider:"secret"`
34-
Triggers *[]interface{} `pulumi:"triggers,optional" providers:"replaceOnDelete"`
35-
LocalAsset *asset.Asset `pulumi:"localAsset,optional"`
36-
LocalArchive *archive.Archive `pulumi:"localArchive,optional"`
37-
RemotePath string `pulumi:"remotePath"`
33+
Connection *Connection `pulumi:"connection" provider:"secret"`
34+
Triggers *[]interface{} `pulumi:"triggers,optional" providers:"replaceOnDelete"`
35+
Asset *asset.Asset `pulumi:"asset,optional"`
36+
Archive *archive.Archive `pulumi:"archive,optional"`
37+
RemotePath string `pulumi:"remotePath"`
3838
}
3939

4040
func (c *CopyInputs) Annotate(a infer.Annotator) {
4141
a.Describe(&c.Connection, "The parameters with which to connect to the remote host.")
4242
a.Describe(&c.Triggers, "Trigger replacements on changes to this input.")
43-
a.Describe(&c.LocalAsset, "An asset to upload. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set.")
44-
a.Describe(&c.LocalArchive, "An archive to upload. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set.")
43+
a.Describe(&c.Asset, "An asset to upload as the source of the copy. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set.")
44+
a.Describe(&c.Archive, "An archive to upload as the source of the copy. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set.")
4545
a.Describe(&c.RemotePath, "The destination path in the remote host.")
4646
}
4747

4848
func (c *CopyInputs) sourcePath() string {
49-
if c.LocalAsset != nil {
50-
return c.LocalAsset.Path
49+
if c.Asset != nil {
50+
return c.Asset.Path
5151
}
52-
return c.LocalArchive.Path
52+
return c.Archive.Path
5353
}
5454

5555
func (c *CopyInputs) hash() string {
56-
if c.LocalAsset != nil {
57-
return c.LocalAsset.Hash
56+
if c.Asset != nil {
57+
return c.Asset.Hash
5858
}
59-
return c.LocalArchive.Hash
59+
return c.Archive.Hash
6060
}
6161

6262
type CopyOutputs struct {

provider/pkg/provider/remote/copyController.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ var _ = (infer.CustomUpdate[CopyInputs, CopyOutputs])((*Copy)(nil))
3737
func (c *Copy) Check(ctx p.Context, urn string, oldInputs, newInputs resource.PropertyMap) (CopyInputs, []p.CheckFailure, error) {
3838
var failures []p.CheckFailure
3939

40-
hasAsset := newInputs.HasValue("localAsset")
41-
hasArchive := newInputs.HasValue("localArchive")
40+
hasAsset := newInputs.HasValue("asset")
41+
hasArchive := newInputs.HasValue("archive")
4242

4343
if hasAsset && hasArchive {
4444
failures = append(failures, p.CheckFailure{
45-
Property: "localAsset",
46-
Reason: "only one of localAsset or localArchive can be set",
45+
Property: "asset",
46+
Reason: "only one of asset or archive can be set",
4747
})
4848
}
4949
if !hasAsset && !hasArchive {
5050
failures = append(failures, p.CheckFailure{
51-
Property: "localAsset",
52-
Reason: "either localAsset or localArchive must be set",
51+
Property: "asset",
52+
Reason: "either asset or archive must be set",
5353
})
5454
}
5555

@@ -59,16 +59,16 @@ func (c *Copy) Check(ctx p.Context, urn string, oldInputs, newInputs resource.Pr
5959
}
6060
failures = append(failures, newFailures...)
6161

62-
if hasAsset && !inputs.LocalAsset.IsPath() {
62+
if hasAsset && !inputs.Asset.IsPath() {
6363
failures = append(failures, p.CheckFailure{
64-
Property: "localAsset",
65-
Reason: "localAsset must be a path-based file asset",
64+
Property: "asset",
65+
Reason: "asset must be a path-based file asset",
6666
})
6767
}
68-
if hasArchive && !inputs.LocalArchive.IsPath() {
68+
if hasArchive && !inputs.Archive.IsPath() {
6969
failures = append(failures, p.CheckFailure{
70-
Property: "localArchive",
71-
Reason: "localArchive must be a path to a file or directory",
70+
Property: "archive",
71+
Reason: "archive must be a path to a file or directory",
7272
})
7373
}
7474

provider/pkg/provider/remote/copyController_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ func TestCheck(t *testing.T) {
8282

8383
makeNewInput := func(asset *asset.Asset, archive *archive.Archive) CopyInputs {
8484
return CopyInputs{
85-
Connection: validConnection,
86-
LocalAsset: asset,
87-
LocalArchive: archive,
88-
RemotePath: "path/to/remote",
85+
Connection: validConnection,
86+
Asset: asset,
87+
Archive: archive,
88+
RemotePath: "path/to/remote",
8989
}
9090
}
9191

sdk/dotnet/Remote/Copy.cs

+21-21
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ namespace Pulumi.Command.Remote
1616
public partial class Copy : global::Pulumi.CustomResource
1717
{
1818
/// <summary>
19-
/// The parameters with which to connect to the remote host.
19+
/// An archive to upload as the source of the copy. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set.
2020
/// </summary>
21-
[Output("connection")]
22-
public Output<Outputs.Connection> Connection { get; private set; } = null!;
21+
[Output("archive")]
22+
public Output<Archive?> Archive { get; private set; } = null!;
2323

2424
/// <summary>
25-
/// An archive to upload. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set.
25+
/// An asset to upload as the source of the copy. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set.
2626
/// </summary>
27-
[Output("localArchive")]
28-
public Output<Archive?> LocalArchive { get; private set; } = null!;
27+
[Output("asset")]
28+
public Output<AssetOrArchive?> Asset { get; private set; } = null!;
2929

3030
/// <summary>
31-
/// An asset to upload. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set.
31+
/// The parameters with which to connect to the remote host.
3232
/// </summary>
33-
[Output("localAsset")]
34-
public Output<AssetOrArchive?> LocalAsset { get; private set; } = null!;
33+
[Output("connection")]
34+
public Output<Outputs.Connection> Connection { get; private set; } = null!;
3535

3636
/// <summary>
3737
/// The destination path in the remote host.
@@ -94,6 +94,18 @@ public static Copy Get(string name, Input<string> id, CustomResourceOptions? opt
9494

9595
public sealed class CopyArgs : global::Pulumi.ResourceArgs
9696
{
97+
/// <summary>
98+
/// An archive to upload as the source of the copy. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set.
99+
/// </summary>
100+
[Input("archive")]
101+
public Input<Archive>? Archive { get; set; }
102+
103+
/// <summary>
104+
/// An asset to upload as the source of the copy. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set.
105+
/// </summary>
106+
[Input("asset")]
107+
public Input<AssetOrArchive>? Asset { get; set; }
108+
97109
[Input("connection", required: true)]
98110
private Input<Inputs.ConnectionArgs>? _connection;
99111

@@ -110,18 +122,6 @@ public Input<Inputs.ConnectionArgs>? Connection
110122
}
111123
}
112124

113-
/// <summary>
114-
/// An archive to upload. It must be a path based archive. Only one of LocalAsset or LocalArchive can be set.
115-
/// </summary>
116-
[Input("localArchive")]
117-
public Input<Archive>? LocalArchive { get; set; }
118-
119-
/// <summary>
120-
/// An asset to upload. It must be a path based asset. Only one of LocalAsset or LocalArchive can be set.
121-
/// </summary>
122-
[Input("localAsset")]
123-
public Input<AssetOrArchive>? LocalAsset { get; set; }
124-
125125
/// <summary>
126126
/// The destination path in the remote host.
127127
/// </summary>

sdk/go/command/remote/copy.go

+21-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)