https://pulumi.com logo
Title
f

full-receptionist-92539

03/24/2022, 10:44 AM
Hello everyone, I have a weird question. I am using Pulumi for Snowflake management and I have created a series of resources that I want to apply to my Snowflake account. I want to create a Database and then a Schema that exist inside that database. Database code
db_prod = snowflake.Database(
    "MY_DB",
    name="MY_DB"
)
Schema code
schema = snowflake.Schema(
    f"{db_prod.name}|MY_SCHEMA",
    name="MY_SCHEMA",
    database=db_prod,
    is_managed=True
)
My problem is that I cannot get the name of my database based on the
db_prod
object. I know that the object has not been evaluated yet, but is there any way to extract the name of my database and use it in my schema? My naive solution is to assign the name of the database in a variable and then use the variable in both places.