Hi, I'm trying to import some existing GCP resourc...
# general
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:
Copy code
pulumi import gcp:storage/bucketIAMMember:BucketIAMMember disk1_iam_member "disk1--bucket--name roles/storage.Admin user:user1@example.com"
And I get this error message:
Copy code
error: Preview failed: importing disk1--bucket--name roles/storage.Admin user:ab@playa.tech: Cannot find binding for "storage bucket \"b/disk1--data--sandbox--playa-tech\"" with role "roles/storage.Admin", member "user:user1@example.com", 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
About BucketIAMMember you can just do a create without importing, in this case it won't throw an error that the resource already exists
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