https://pulumi.com logo
#general
Title
# general
g

glamorous-printer-14057

09/08/2019, 2:09 AM
hey all, I’m trying to adopt an existing AWS CloudFormation Stack resource into Pulumi, along the lines of https://www.pulumi.com/blog/adopting-existing-cloud-resources-into-pulumi/ - I wasn’t sure what ID I should use. I started with the
arn:aws:cloudformation:...
ID from the AWS console but that gives me a “resource does not exist” error. is there a different ID I should be using? how can I find this?
w

white-balloon-205

09/08/2019, 2:19 AM
I believe you can just use the
name
of the cloud formation stack.
t

tall-librarian-49374

09/08/2019, 2:29 AM
If you have any existing pulumi-defined resoures, you can run
pulumi stack export >> dump.txt
and study the
id
properties in there. AWS IDs are simple names as far as I can tell.
g

glamorous-printer-14057

09/08/2019, 2:56 AM
yeah this particular resource (our Buildkite CloudFormation stack) was created manually, and I’m trying to get it under Pulumi management—however both the name of the existing stack and the
arn:
don’t seem to work
t

tall-librarian-49374

09/08/2019, 2:59 AM
Interesting... Create another temporary resource like this and check its id?
g

glamorous-printer-14057

09/08/2019, 3:02 AM
oh good idea i’ll try that out
for future reference, the issue here was that I wasn’t explicitly specifying a provider, and my existing CF stacks were in another AWS region 🤦‍♂️ that said, it’s kind of tricky to get the CF template YAML to perfectly match the existing, manually-created CF stacks, so I’m just going the route of recreating them in Pulumi and deprecating our previous CF stacks
w

white-balloon-205

09/08/2019, 2:31 PM
t’s kind of tricky to get the CF template YAML to perfectly match the existing, manually-created CF stacks
Note that
ignoreChanges
might help here = depending on what your goal was in trying to import these into Pulumi in the first place.