@mstuercke/pulumi-modules 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { s3 } from '@pulumi/aws';
2
- import { interpolate } from '@pulumi/pulumi';
2
+ import {} from '@pulumi/pulumi';
3
3
  export class PublicS3Bucket extends s3.Bucket {
4
4
  constructor(id, args, opts) {
5
5
  const { name, allowPresignedPost = false, tags } = args;
@@ -19,9 +19,9 @@ export class PublicS3Bucket extends s3.Bucket {
19
19
  bucket: this.id,
20
20
  acl: 'public-read',
21
21
  }, { parent: this, dependsOn: [accessBlock, ownershipControls] });
22
- new s3.BucketPolicy('policy', {
22
+ new s3.BucketPolicy('policy-new', {
23
23
  bucket: this.id,
24
- policy: JSON.stringify({
24
+ policy: this.arn.apply((arn) => JSON.stringify({
25
25
  Version: '2012-10-17',
26
26
  Statement: [
27
27
  {
@@ -29,10 +29,10 @@ export class PublicS3Bucket extends s3.Bucket {
29
29
  Effect: 'Allow',
30
30
  Principal: '*',
31
31
  Action: 's3:GetObject',
32
- Resource: interpolate `${this.arn}/*`,
32
+ Resource: `${arn}/*`,
33
33
  },
34
34
  ],
35
- }),
35
+ })),
36
36
  }, { parent: this, dependsOn: [acl] });
37
37
  new s3.BucketCorsConfiguration('allowAll', {
38
38
  bucket: this.bucket,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstuercke/pulumi-modules",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "files": [
5
5
  "dist/**/!(*.test|*.fixture){.d.ts,.js}",
6
6
  "README.md"