Skip to content

Commit

Permalink
feat(component-alicloud-oss): add output bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
bingtsingw committed Jan 7, 2025
1 parent 8cc35ee commit 66b4762
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-taxis-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@pulumi-helpers/component-alicloud-oss': patch
---

add output bucket
3 changes: 3 additions & 0 deletions components/alicloud-oss/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface AlicloudOssProps {
export class AlicloudOssComponent extends pulumi.ComponentResource {
public ak?: pulumi.Output<string>;
public sk?: pulumi.Output<string>;
public bucket?: pulumi.Output<string>;

public constructor(
private name: string,
Expand Down Expand Up @@ -88,6 +89,8 @@ export class AlicloudOssComponent extends pulumi.ComponentResource {

new alicloud.oss.BucketAcl(this.name, { bucket: oss.id, acl }, { parent: this, deleteBeforeReplace: true });

this.bucket = oss.id;

return oss;
}

Expand Down
1 change: 1 addition & 0 deletions examples/src/alicloud-oss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ const oss = new AlicloudOssComponent(
export const alicloudOss = {
ak: oss.ak,
sk: oss.sk,
bucket: oss.bucket,
};

0 comments on commit 66b4762

Please sign in to comment.