Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snowflake roles are detected as missing by preview refresh #571

Closed
sicarul opened this issue Apr 17, 2024 · 2 comments
Closed

Snowflake roles are detected as missing by preview refresh #571

sicarul opened this issue Apr 17, 2024 · 2 comments
Labels
kind/bug Some behavior is incorrect or out of spec resolution/by-design This issue won't be fixed because the functionality is working as designed

Comments

@sicarul
Copy link

sicarul commented Apr 17, 2024

What happened?

When running preview refresh, roles which exist are detected as having been deleted on Snowflake.

Example

When trying to detect changes between resources and state, these roles appear as missing:
image
However they all exist in Snowflake and are heavily used:
image

Output of pulumi about

CLI
Version 3.111.1
Go Version go1.22.1
Go Compiler gc

Plugins
NAME VERSION
aws 5.34.0
awsx 1.0.2
docker 3.6.1
nodejs unknown
random 4.12.1
snowflake 0.50.2
tls 4.10.0

Host
OS darwin
Version 14.4.1
Arch arm64

This project is written in nodejs: executable='/Users/pabloseibelt/.nvm/versions/node/v18.6.0/bin/node' version='v18.6.0'

Current Stack: pulumi/dwh-snowflake/production

TYPE URN
pulumi:pulumi:Stack urn:pulumi:production::dwh-snowflake::pulumi:pulumi:Stack::dwh-snowflake-production
pulumi:providers:snowflake urn:pulumi:production::dwh-snowflake::pulumi:providers:snowflake::default_0_50_2
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::Rosetta
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::OKTA_PROVISIONER
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::EXPORT_MARTS
pulumi:providers:pulumi urn:pulumi:production::dwh-snowflake::pulumi:providers:pulumi::default
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::ENDUSER
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::DBT
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::DATA
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::MELTANO
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::SCORING
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::AIDATA
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::SEGMENT
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::ROSETTA
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::SANDBOX
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::METADATA
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::CENSUS
pulumi:providers:random urn:pulumi:production::dwh-snowflake::pulumi:providers:random::default_4_12_1
pulumi:pulumi:StackReference urn:pulumi:production::dwh-snowflake::pulumi:pulumi:StackReference::pulumi/dwh-workflows-orchestrate-airflow/production
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::metabase_rosetta-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::metabase-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::dbt-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::airflow-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::meltano-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::census-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::segment-snowflake-password
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::scoring-snowflake-password
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::landing-zone-meltano
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::landing-zone-snowpipe
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::landing-zone-cdc
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::landing-zone-scoring
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::landing-zone-ai-data
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::landing-zone-segment
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::seed-data
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::DATA_VAULT
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::RAW_MARTS
snowflake:index/database:Database urn:pulumi:production::dwh-snowflake::snowflake:index/database:Database::INFORMATION_MARTS
random:index/randomPassword:RandomPassword urn:pulumi:production::dwh-snowflake::random:index/randomPassword:RandomPassword::aidata-snowflake-password
snowflake:index/role:Role urn:pulumi:production::dwh-snowflake::snowflake:index/role:Role::CENSUS
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::Census
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::EXPLORE_ROSETTA
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::MELTANO
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::DEVELOPER
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::DBT
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::Segment
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::EXPLORE
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::DBT_EXTRA
snowflake:index/samlIntegration:SamlIntegration urn:pulumi:production::dwh-snowflake::snowflake:index/samlIntegration:SamlIntegration::oktaSamlIntegration
snowflake:index/accountGrant:AccountGrant urn:pulumi:production::dwh-snowflake::snowflake:index/accountGrant:AccountGrant::oktaCreateRole
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::oktaProvisionerGrants
snowflake:index/accountGrant:AccountGrant urn:pulumi:production::dwh-snowflake::snowflake:index/accountGrant:AccountGrant::oktaCreateUser
snowflake:index/scimIntegration:ScimIntegration urn:pulumi:production::dwh-snowflake::snowflake:index/scimIntegration:ScimIntegration::oktaScimIntegration
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::rosetta-USAGE
snowflake:index/grantDatabaseRole:GrantDatabaseRole urn:pulumi:production::dwh-snowflake::snowflake:index/grantDatabaseRole:GrantDatabaseRole::cortexGrantToDBT
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateExportMartsGrant
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::rosetta-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::rosetta-MONITOR
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTExportMartTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTExportMartTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbExportMartsGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTExportMartTables
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::DBT_CI
snowflake:index/schema:Schema urn:pulumi:production::dwh-snowflake::snowflake:index/schema:Schema::schemaCensus
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTRosettaTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTRosettaTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateRosettaGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbRosettaGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTRosettaTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateSandboxGrant
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTSandboxTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbSandboxGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTSandboxTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTSandboxTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTMetadataTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTMetadataTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateMetadataGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbMetadataGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTMetadataTables
snowflake:index/warehouse:Warehouse urn:pulumi:production::dwh-snowflake::snowflake:index/warehouse:Warehouse::DBT_TEST
pulumi:providers:aws urn:pulumi:production::dwh-snowflake::pulumi:providers:aws::default_5_34_0
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::metabase_rosettaSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::segmentSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::metabaseSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::dbtSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::airflowSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::meltanoSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::censusSnowflakeUserPassword
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::scoringSnowflakeUserPassword
snowflake:index/networkPolicy:NetworkPolicy urn:pulumi:production::dwh-snowflake::snowflake:index/networkPolicy:NetworkPolicy::snowflake-network-whitelist
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnMeltanoDatabase
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbMeltanoGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateMeltanoGrant
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnMeltanoDatabase
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnMeltanoDatabase
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnSnowpipeDatabase
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbSnowpipeGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnSnowpipeDatabase
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnSnowpipeDatabase
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTCDCTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCDCGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTCDCTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTCDCTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnScoringDatabase
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbScoringGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateScoringGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnScoringDatabase
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnScoringDatabase
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnAIDatabase
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbAIGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateAIDataGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnAIDatabase
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnAIDatabase
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTSegmentTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbSegmentUsageGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbSegmentGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTSegmentTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTSegmentTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnSeedDatabase
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnSeedDatabase
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateSeedData
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbSeedData
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnSeedDatabase
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTDataVaultTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTDataVaultTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateDataVaultGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbDataVaultGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTDataVaultTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTRawMartTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTRawMartTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateRawMartsGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbRawMartsGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTRawMartTables
snowflake:index/tableGrant:TableGrant urn:pulumi:production::dwh-snowflake::snowflake:index/tableGrant:TableGrant::selectOnDBTInformationMartTables
snowflake:index/viewGrant:ViewGrant urn:pulumi:production::dwh-snowflake::snowflake:index/viewGrant:ViewGrant::selectOnDBTInformationMartTables
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCreateInformationMartsGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbInformationMartsGrant
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::selectOnDBTInformationMartTables
aws:ssm/parameter:Parameter urn:pulumi:production::dwh-snowflake::aws:ssm/parameter:Parameter::aidataSnowflakeUserPassword
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::data-has-enduser
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCensusUsageGrant
snowflake:index/databaseGrant:DatabaseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/databaseGrant:DatabaseGrant::dbCensusGrant
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::census-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::census-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::census-MONITOR
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::metabase_rosetta
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::explorerosetta-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::explorerosetta-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::explorerosetta-OPERATE
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::meltano
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::meltano-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::meltano-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::meltano-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::developer-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::developer-MODIFY
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::developer-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::developer-USAGE
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::airflow
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::dbt
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbt-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbt-OPERATE
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::scoring
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbt-MONITOR
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::census
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::aidata
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::segment-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::segment-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::segment-OPERATE
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::segment
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::exploretodbt-MODIFY
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::explore-USAGE
snowflake:index/user:User urn:pulumi:production::dwh-snowflake::snowflake:index/user:User::metabase
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::explore-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::exploretodbt-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::explore-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::exploretodbt-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::exploretodbt-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbtextra-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbtextra-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbtextra-MONITOR
snowflake:index/schemaGrant:SchemaGrant urn:pulumi:production::dwh-snowflake::snowflake:index/schemaGrant:SchemaGrant::schemaCensusGrant
snowflake:index/networkPolicyAttachment:NetworkPolicyAttachment urn:pulumi:production::dwh-snowflake::snowflake:index/networkPolicyAttachment:NetworkPolicyAttachment::snowflake-network-whitelist-attach
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::metabaseRosettaGrant
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbtci-USAGE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbtci-OPERATE
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbtci-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbttest-MONITOR
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbttest-USAGE
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::meltanoGrant
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::airflowGrant
snowflake:index/warehouseGrant:WarehouseGrant urn:pulumi:production::dwh-snowflake::snowflake:index/warehouseGrant:WarehouseGrant::dbttest-OPERATE
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::dbtGrant
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::scoringGrant
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::censusGrant
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::segmentGrant
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::aiGrant
snowflake:index/roleGrants:RoleGrants urn:pulumi:production::dwh-snowflake::snowflake:index/roleGrants:RoleGrants::metabaseGrant

Found no pending operations associated with pulumi/production

Backend
Name pulumi.com
URL https://app.pulumi.com/v-pablo-pulumi-corp
User v-pablo-pulumi-corp
Organizations v-pablo-pulumi-corp, pulumi
Token type personal

Dependencies:
NAME VERSION
@pulumi/pulumi 3.60.1
@pulumi/random 4.12.1
@pulumi/snowflake 0.50.2
@pulumi/tls 4.10.0
@types/node 16.18.23
@pulumi/aws 5.34.0
@pulumi/awsx 1.0.2

Pulumi locates its logs in /var/folders/0g/n3hrlpn56jb72cnjwggcy3kh0000gn/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@sicarul sicarul added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Apr 17, 2024
@lukehoban
Copy link

This issue here is that these resources have IDs like DBT-999f6b2 in the Pulumi state, but the actual resource in Snowlake has ID DBT as shown via running this program:

export const role = snowflake.getRoleOutput({
    name: "DBT"
});

Which gives:

Outputs:
  + role : {
      + comment: "DBT user"
      + id     : "DBT"
      + name   : "DBT"
    }

The result is that the Snowflake provider correctly believes the resource in the state no longer exists.

I suspect there are a few things contributing to this:

  1. feat: use roles from the SDK Snowflake-Labs/terraform-provider-snowflake#2405 changed the way IDs are determined for Roles in a way which doesn't look backward compatible.
  2. Pulumi autonames by default - so the physical name for this resource was initially derived from the logical name DBT as DBT-999f6b2. However, somehow, the physical name got changed to just "DBT". It's possible this was done manually out of band by you @sicarul?
  3. Because the thing that was changed was not just a property of the resource, but actually the thing that determines the identity of the resource, Pulumi doesn't know that something was changed, it actually thinks the thing it was tracking is gone!
  4. Ultimately, this seems to be an issue that Snowflake has no immutable identity on Roles, they are simply identified by whatever their current name is?

Given all that:

  • The workaround is to patch the state file to change the IDs to match what is in Snowflake.
  • Beyond that, it's not immediately clear there is anything else Pulumi can do here. We could consider not autonaming Role resources given the likelihood that users will want to rename them, likely via making name a required property. But that won't striclty prevent this from happening, just make it a bit less likely (the same amount of unlikely it is in Terraform).

@sicarul
Copy link
Author

sicarul commented Apr 18, 2024

I do not remember changing the role names in Snowflake, but i did use an older version of this provider, maybe this bug was present in an older version of the provider and was fixed since? These 3 roles are the oldest ones

Edit: Looking closely at logs, it seems your assessment is 100% correct Luke, i did modify these users back then, i had forgotten about it 🤦 I edited them both in Snowflake and in Pulumi, hoping they'd magically match up, they somewhat did because i was able to still keep adding permissions to them, but something in the state was broken because of it. Thanks for looking into it.

@sicarul sicarul closed this as completed Apr 18, 2024
@sicarul sicarul added resolution/by-design This issue won't be fixed because the functionality is working as designed and removed needs-triage Needs attention from the triage team labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/by-design This issue won't be fixed because the functionality is working as designed
Projects
None yet
Development

No branches or pull requests

2 participants