Hi - New poster here - was wondering if Pulumi has...
# python
e
Hi - New poster here - was wondering if Pulumi has anything to reverse engineer existing resources to pulumi IaC. These are created with cloudformation and some console modification so perhaps a stack converter too?
e
Superb! I tried the CF cf2pulumi converter (browser) and ran in to this error. Resource "aws-nativeiotRoleAlias" is not yet supported by AWS CloudControl API. Code generated for "ggTokenExchangeRoleAliasResource" is for reference only. Strange because I believe AWS:IoT:RoleAlias is supported in aws.iot.RoleAlias https://www.pulumi.com/registry/packages/aws/api-docs/iot/rolealias/ However the converter wanted to use aws-native.
m
There might be some blind-spots and things you have to work around. It's very difficult to do this sort of thing wholesale, there is use cases and implementation details that make that task very challenging. Your goal should be to automated the migration of most of it, whatever that looks like to you. You may have an easier time re-expressing certain things, especially if the approach is different.
r
You can also use
pulumi import
e
Stepping back a bit, my goal is a fairly common use case - a stack for greengrass fleet provisioning and component deployment of a recipe using s3 and docker container (ECR) artifacts. Is there a sample or reference stack for this available. Would possibly be more efficient than converting or importing.
r
You could try using Pulumi AI. It's not perfect but can help you get most of the way there usually. https://www.pulumi.com/ai/conversations/be89aff2-79ce-4b97-bfa2-f878be716f60
e
I resorted to bulk import with a script to convert aws cli query output to a bulk import json file with AWS to Pulumi resource type mapping. So far the stack has been migrated but not yet tested.