pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
95 stars 17 forks source link

Feature to have cf2pulumi write partials. #582

Open rshade opened 2 years ago

rshade commented 2 years ago

Hello!

Issue details

I am trying to convert the CUDOS dashboard CloudFormation Templates here: https://github.com/aws-samples/aws-cudos-framework-deployment/tree/main/cfn-templates to Pulumi. I have run into several issues with for example the kpi.cfn.yml. First, Condition is not supported, then I ran into other errors when commenting that out.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "sharedAccountMapViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "sharedSummaryViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "sharedRiSpMappingViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "kpiInstanceMappingViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "kpiInstanceAllViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "kpiEbsSnapViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "kpiEbsStorageAllViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "kpiS3StorageAllViewCustom" is for reference only.

Warning: Resource not supported

Resource "Custom::AthenaView" is not yet supported by AWS CloudControl API. Code generated for "kpiTrackerViewCustom" is for reference only.

Warning: Resource not supported

Resource "aws-native:events:Rule" is not yet supported by AWS CloudControl API. Code generated for "kpiSpiceRefreshRule" is for reference only.

Warning: Resource not supported

Resource "aws-native:lambda:Permission" is not yet supported by AWS CloudControl API. Code generated for "kpiInvokeLambdaPermission" is for reference only.

Warning: Resource not supported

Resource "Custom::kpiLoggerLambdaExecutor" is not yet supported by AWS CloudControl API. Code generated for "kpiLoggerLambdaExecutor" is for reference only.

2022/07/25 15:53:14 failed to bind program: package Custom not found in the in-memory map

It would be nice if it would write the partial file and a log and then exit. This would at least give me a starting point. If the log had resource line numbers it couldn't import that would be great. I could use that and AWS Classic to finish the implementation.

Affected area/feature

cf2pulumi

lukehoban commented 2 years ago

Looks like this is the error that is causing the command to fail. That should be a diagnostic instead of an error.

failed to bind program: package Custom not found in the in-memory map
lukehoban commented 2 years ago

@rshade if you try commenting out all the Custom:: resources in the template that might unblock getting a partial output displayed.

viveklak commented 2 years ago

@rshade can you confirm if excluding the Custom:: resources gets you a decent starting point?

rshade commented 2 years ago

I got about half the file commented out, then there were dependency issues. I sort of stopped at that point, because yaml got malformed. I can take another crack at it.