salmon-motherboard-78006
09/02/2022, 9:41 PMpulumi-snowflake
seems to be great for this.
My problem currently is that I'm not able to use different roles during execution.
For example,
I use SYSADMIN to create a database and I want to use SECURITYADMIN to create a new role.
In the config file, I set up snowflake:role
to SYSADMIN and I try to change to
os.environ["SNOWFLAKE_ROLE"] = "SECURITYADMIN"
but it doesn't seem to be picked up.polite-mechanic-60124
09/02/2022, 9:51 PMsalmon-motherboard-78006
09/02/2022, 9:53 PMpolite-mechanic-60124
09/02/2022, 9:55 PMsysadmin_provider = snowflake.Provider("sysadmin",role="SYSADMIN")
securityadmin_provider = snowflake.Provider("securityadmin", role="SECURITYADMIN")
foo_resource = snowflake.foo(arg=bar, pulumi.ResourceOptions(provider=securityadmin_provider)
salmon-motherboard-78006
09/02/2022, 10:01 PMFile "/Users/roni/.conda/envs/venv/lib/python3.10/site-packages/pulumi_snowflake/schema.py", line 358, in _internal_init
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
TypeError: __props__ is only valid when passed in combination with a valid opts.id to get an existing resource
I provide the provider as follows to the Schema object:
opts=ResourceOptions(id="blah", provider=sysadmin_provider)
I will try to debug later if it's not obviouspolite-mechanic-60124
09/03/2022, 12:36 AMsalmon-motherboard-78006
09/03/2022, 12:37 AMid
after I got the error... so the id
didn't helpsnowflake.Schema(name.upper(),
comment=comment,
name=name.upper(),
data_retention_days=30,
database=db_name,
is_managed=False,
is_transient=False,
opts=ResourceOptions(provider=provider))
polite-mechanic-60124
09/03/2022, 12:39 AMsalmon-motherboard-78006
09/03/2022, 12:40 AMpolite-mechanic-60124
09/03/2022, 12:42 AMsalmon-motherboard-78006
09/03/2022, 1:08 AM