@@ -286,9 +286,9 @@ export interface BucketArgs {
286286 principals : Input <
287287 | "*"
288288 | Input < {
289- type : Input < "aws" | "service" | "federated" | "canonical" > ;
290- identifiers : Input < Input < string > [ ] > ;
291- } > [ ]
289+ type : Input < "aws" | "service" | "federated" | "canonical" > ;
290+ identifiers : Input < Input < string > [ ] > ;
291+ } > [ ]
292292 > ;
293293 /**
294294 * Configure specific conditions for when the policy is in effect.
@@ -760,7 +760,7 @@ export class Bucket extends Component implements Link.Linkable {
760760 // (ie. bucket.name). Also, a bucket can only have one policy. We want to ensure
761761 // the policy created here is created first. And SST will throw an error if
762762 // another policy is created after this one.
763- this . bucket = policy . apply ( ( ) => bucket ) ;
763+ this . bucket = policy . urn . apply ( ( ) => bucket ) ;
764764
765765 function normalizeAccess ( ) {
766766 return all ( [ args . public , args . access ] ) . apply ( ( [ pub , access ] ) =>
@@ -778,14 +778,14 @@ export class Bucket extends Component implements Link.Linkable {
778778 p . principals === "*"
779779 ? [ { type : "*" , identifiers : [ "*" ] } ]
780780 : p . principals . map ( ( i ) => ( {
781- ...i ,
782- type : {
783- aws : "AWS" ,
784- service : "Service" ,
785- federated : "Federated" ,
786- canonical : "Canonical" ,
787- } [ i . type ] ,
788- } ) ) ,
781+ ...i ,
782+ type : {
783+ aws : "AWS" ,
784+ service : "Service" ,
785+ federated : "Federated" ,
786+ canonical : "Canonical" ,
787+ } [ i . type ] ,
788+ } ) ) ,
789789 } ) ) ,
790790 ) ;
791791 }
@@ -852,9 +852,9 @@ export class Bucket extends Component implements Link.Linkable {
852852 access === "public"
853853 ? { type : "*" , identifiers : [ "*" ] }
854854 : {
855- type : "Service" ,
856- identifiers : [ "cloudfront.amazonaws.com" ] ,
857- } ,
855+ type : "Service" ,
856+ identifiers : [ "cloudfront.amazonaws.com" ] ,
857+ } ,
858858 ] ,
859859 actions : [ "s3:GetObject" ] ,
860860 resources : [ interpolate `${ bucket . arn } /*` ] ,
0 commit comments