I'm trying to do an import on an s3 bucket, and it...
# general
a
I'm trying to do an import on an s3 bucket, and it wants to change the name of the resource, which causes a warning.
Copy code
aws:s3:Bucket (bucketName):
  warning: inputs to import do not match the existing resource; importing this resource will fail

This is the change: 
~ bucket: "bucketName" => "bucketName-8c54a03"
code
Copy code
const config = new pulumi.Config();
const sb: string = config.require("sourceBucket")

const sourceBucket = new aws.s3.Bucket(sb,
                                      {},
                                      { import: sb });
b
You need to overrive the bucket name
Copy code
const sourceBucket = new aws.s3.Bucket(sb,
                                      {
bucket: "bucketName-8c54a03"},
                                      { import: sb });
By default, pulumi appends a random string to resources
a
That was incredibly fast. Thank you!
b
👍
a
I'm basically swiping this: https://github.com/pulumi/examples/tree/master/aws-ts-s3-lambda-copyzip which was super helpful.
so thanks to maria where ever she is for the easy to follow code.
b
I will pass it on 🙂