pulumi / pulumi-cloud-import

Import infrastructure managed outside of Pulumi IaC into Pulumi Insights
Apache License 2.0
8 stars 2 forks source link

Add the ability to configure which resource types to import or skip #8

Open EvanBoyle opened 1 year ago

EvanBoyle commented 1 year ago

Due to bugs in the underlying cloud provider, we maintain a map of resources to exclude that we check before importing any given resource:

https://github.com/pulumi/pulumi-cloud-import/blob/1b91d7b5fec3dcca3b9dca0549566f5a12631b7e/pulumi-cloud-import-aws/main.go#L113-L126

It would be nice to make this configurable in two dimensions:

  1. Allow specifying an explicit list of pulumi provider type tokens to include (I just want all of my Kinesis queues)
  2. Allow specifying a list of pulumi provider type tokens to exclude (no IAM roles or policies please)

We should support this in all of the import programs for all clouds, and we should be able to support both pulumi configuration to be used on the typical ReadResource path, as well as an environment variable or some sort of command line flag to support the go run main.go --import use case where we are not running a pulumi program and are just generating the import file.