amazon-web-servicesamazon-s3pulumi

To provision AWS S3 Buckets, why Pulumi have Bucket and BucketV2 resources?


I trying to find the story behind having Bucket and BucketV2, and the real difference between the two . Moreover, it looks like for a lot of S3 resources, there is a V2 variant. Why does the V2 variant exists? Why do we have Bucket and BucketV2? Did AWS changed their S3 API, which caused Pulumi to change the provider, and that creates a V2 variant? Is this change rooted in Terraform, and somehow reflected on Pulumi? Bucket and BucketV2 creates the same S3 bucket, but through different APIs, to the Pulumi user? BucketV2 supersedes Bucket? Will Bucket be deprecated?


Solution

  • Why does the V2 variant exists? Why do we have Bucket and BucketV2? Did AWS changed their S3 API, which caused Pulumi to change the provider, and that creates a V2 variant? Is this change rooted in Terraform, and somehow reflected on Pulumi?

    It looks like you're correct from this commit (https://github.com/pulumi/pulumi-aws/commit/f73d82bf022793a85cdd5bf7ac55638b64740cb9) which says

    Please Note: In the upstream provider, the AWS S3 Bucket resource has changed. While we appreciate the work that has has been done there, we want to ensure that our Pulumi users continue to be able to work with the existing S3 bucket resource without any problems. We will publish a guide on how to migrate from aws.s3.Bucket to aws.s3.BucketV2 to help with this effort.

    A number of other breaking changes have been made outside of the S3 Bucket resource. You can find more about these changes in the upstream provider.

    The upstream provider link is to the Terraform AWS provider.

    Bucket and BucketV2 creates the same S3 bucket, but through different APIs, to the Pulumi user?

    Yes. The Bucket resource remains there for backwards compatibility to "ensure our Pulumi users continue to be able to work with the existing S3 bucket resource without any problems" (from the commit description copied above).

    BucketV2 supersedes Bucket? Will Bucket be deprecated?

    BucketV2 appears to supersede Bucket, as it matches the upstream AWS API better, but it's unclear if it will be deprecated. There's an issue in their repository to "resolve distinction between BucketV2 and Bucket": https://github.com/pulumi/pulumi-aws/issues/3803