https://pulumi.com logo
Title
n

nice-rain-32013

01/27/2023, 3:28 PM
Hello everyone, I am close to importing a whole Snowflake stack but I seem to have some trouble importing the RoleGrants. I have several users and roles granted the ACCOUNTADMIN role like this:
show grants of role ACCOUNTADMIN;
<output redacted>
role          granted_to  grantee_name
------------  ----------  ---------------------
ACCOUNTADMIN  USER        ******
ACCOUNTADMIN  ROLE        PULUMI_ROLE
ACCOUNTADMIN  USER        *****************.com
ACCOUNTADMIN  USER        ***********.com
ACCOUNTADMIN  USER        *************.com
ACCOUNTADMIN  USER        ************.com
ACCOUNTADMIN  USER        ***************.com
when importing, I expect the following command to pull in the roles mentioned above:
pulumi import --diff snowflake:index/roleGrants:RoleGrants ACCOUNTADMIN ACCOUNTADMIN
but the result is disappointing:
accountadmin = snowflake.RoleGrants(
    "ACCOUNTADMIN", 
    role_name="ACCOUNTADMIN",
    opts=pulumi.ResourceOptions(protect=True))
No mention of grantee roles or users here, what am I missing? thanks!
s

stocky-restaurant-98004

01/27/2023, 3:36 PM
I think this is probably a bug. At the very least, if it's a limitation and there's a workaround, it should be in the docs. File an issue here: https://github.com/pulumi/pulumi-snowflake
n

nice-rain-32013

01/27/2023, 3:44 PM
thanks @stocky-restaurant-98004
s

stocky-restaurant-98004

01/27/2023, 3:59 PM
There's a triage process the responsible team uses - the issue should get looked at in the next few days.