Is there a way to convert Cloudformation templates...
# aws
p
Is there a way to convert Cloudformation templates into pulumi? I have had some success with the pulumi AI but some templates e.g. http://s3.amazonaws.com/ecs-refarch-volume-plugins/rexray-demo.json are larger than the textbox on the AI's web interface. Is there a tool somewhere?
m
There's https://www.pulumi.com/cf2pulumi/ but it fails for the JSON you linked. It uses a CLI tool in the background.
A while ago, I had a good experience with GitHub Copilot: I copied the original CloudFormation YAML into a file and started writing the Pulumi variant. Copilot then produced something that was about 90% correct, which was sufficient for my purposes.
p
Hmm I've used up my free trial with Copilot, but it seems I can use sections of the json and the pulumi AI and it's spitting out code which is around 90% correct, and I think I can make it work from here. Thanks for your help 😄
a
I have used https://github.com/Zaid-Ajaj/pulumi-tool-importer/ in the past because it generates code for the @pulumi/aws provider rather than @pulumi/aws-native - though I was also making contributions to it as I went when it didn't work for a particular template.