https://pulumi.com logo
#typescript
Title
# typescript
e

enough-activity-88417

06/12/2023, 7:48 AM
I have used pulumi to create an S3 bucket and I attached a role to it without pulumi, now when I try to do
pulumi up
I am getting the following error:
Copy code
Error putting S3 Grants: AccessControlListNotSupported: The bucket does not allow ACLs
Copy code
const POC = new aws.s3.Bucket(
  POCS3BucketName,
  {
    bucket: POCS3BucketName,
    forceDestroy: false,
    grants: [
      {
        id: currentAwsUser.then((currentUser) => currentUser.id),
        type: "CanonicalUser",
        permissions: ["FULL_CONTROL"]
      }
    ],
    versioning: {
      enabled: true
    },
  
    lifecycleRules: archiveLogsLifecycleRules,
    serverSideEncryptionConfiguration: archiveBucketServerSideEncryption
  },
  {
    protect: true
  }
);
s

salmon-account-74572

06/12/2023, 12:12 PM
This is due to a relatively recent change in the AWS API. See this thread for an example of how to make this work: https://pulumi-community.slack.com/archives/C84L4E3N1/p1686357651078149 Let us know if you continue to have problems!
e

enough-activity-88417

06/12/2023, 12:25 PM
I have actually added this
Copy code
const publicMetricsBlock = new aws.s3.BucketPublicAccessBlock(
  CHPOCS3BucketBlock,
  {
    bucket: ClickHousePOC.id,
    blockPublicAcls: false,
    blockPublicPolicy: true,
    ignorePublicAcls: true,
    restrictPublicBuckets: true
  },
  { parent: ClickHousePOC }
);
to reference my bucket, still doesn't work
2 Views