This message was deleted.
# general
s
This message was deleted.
b
I'm not totally sure, but that bucketname doens't look correct, the
bucket
parameter should be your bucket name
c
the docs say it can be an arn
b
it can, but you've stringified it, rather than referencing the output directly
try this
Copy code
bucket: arn:aws:s3:::arn-code,
oh wait, sorry, I'm being silly.
c
I just realized that it says access point arn.
b
are you creating the bucket with pulumi too, or referencing an existing bucket?
c
What i'm trying to do is create the bucket in a different pulumi plan so that I can have one that generates globally accessible resources and another that shares some of those resources. Is that possible?
Existing bucket.
is that possible?
I tried using getBucket, but that doesn't accept an arn.
if I use Bucket constructor with arn option will that reference the existing bucket?
I'll try it
b
yeah try that, to answer your other question, you can reference the bucket from another pulumi project using a stack reference: https://www.pulumi.com/docs/intro/concepts/organizing-stacks-projects/#inter-stack-dependencies
c
that's pretty cool
so I have to export the bucket then in the one project then reference it in the other?
l
Yes. Be aware that (afaik) StackReferences don't work with some backends. They might work only with the default (Pulumi) backend?
c
seems to do the trick. Thanks!
I spoke too soon.
Looks like I still get the same issue using the referenced object from the other stack.
This seems to produce the right bucket name on the first line, but fails with the same message afterwards.
nvm, I see the problem.
b
@little-cartoon-10569 stack references work with all backends, there are issues reference stacks if you have different state buckets between projects but there's no reason you can't use stack references for other backends
l
Ah. We store all our state in different paths in the same S3 bucket and haven't been able to get them to work...
b
the different paths is the problem I think