Thread
#general
    r

    rough-oyster-77458

    6 months ago
    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 user:user1@example.com"
    And I get this error message:
    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
    user1
    has a Storage Admin role for bucket
    disk1--bucket--name
    . I have just checked this in GCP console. Any ideas what I'm doing wrong? Tnx guys in advance
    a

    astonishing-energy-53370

    6 months ago
    About BucketIAMMember you can just do a create without importing, in this case it won't throw an error that the resource already exists
    r

    rough-oyster-77458

    6 months ago
    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