hey all, I’m trying to adopt an existing AWS Cloud...
# general
g
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
I believe you can just use the
name
of the cloud formation stack.
t
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
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
Interesting... Create another temporary resource like this and check its id?
g
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
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.