03/27/2022, 11:52 PM
Hi, I'm trying to import some existing GCP resources to Pulumi. Some of them I have imported successfully, but still struggling with others. For instance, I'm trying to import BucketIAMMember using the command:
pulumi import gcp:storage/bucketIAMMember:BucketIAMMember disk1_iam_member "disk1--bucket--name roles/storage.Admin"
And I get this error message:
error: Preview failed: importing disk1--bucket--name roles/storage.Admin Cannot find binding for "storage bucket \"b/disk1--data--sandbox--playa-tech\"" with role "roles/storage.Admin", member "", and condition title ""
So, it says that no such binding for this user. For me, this message looks odd because I'm pretty sure
has a Storage Admin role for bucket
. I have just checked this in GCP console. Any ideas what I'm doing wrong? Tnx guys in advance


03/28/2022, 10:56 AM
About BucketIAMMember you can just do a create without importing, in this case it won't throw an error that the resource already exists


03/28/2022, 1:52 PM
Thanks for the tip, @astonishing-energy-53370. I have tried some imports so far and have a feeling that only about 30% of imports work. I do the same way as described in "import" section in each API method documentation. Maybe, this technique may work for some resources fine, but for others this is not convenient