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

The terraform-provider-snowflake_v0.75.0 plugin crashed! #2164

Closed
ehayes9 opened this issue Oct 31, 2023 · 6 comments
Closed

The terraform-provider-snowflake_v0.75.0 plugin crashed! #2164

ehayes9 opened this issue Oct 31, 2023 · 6 comments
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior category:identifiers

Comments

@ehayes9
Copy link

ehayes9 commented Oct 31, 2023

Provider Version

version = "0.75.0"

Terraform Version

tried both 1.5.2 and 1.6.2

Describe the bug

While applying the planned changes in the Terraform cloud UI, the plan errors with the following error message:

Error: Plugin did not respond
The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.

Expected behavior

I expected the plan to apply with no issues

Code samples and commands

Terraform plan and apply via the cloud UI

Additional context

Logs:

2023-10-31T14:25:52.961Z [WARN]  provider.terraform-provider-snowflake_v0.75.0: Response contains warning diagnostic: @module=sdk.proto tf_req_id=f1b47568-048b-28f3-fabc-da877cc093c1 @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:60 diagnostic_attribute="AttributeName(\"region\")" diagnostic_detail="Specify the region as part of the account parameter" diagnostic_summary="Argument is deprecated" tf_provider_addr=registry.terraform.io/Snowflake-Labs/snowflake diagnostic_severity=WARNING tf_proto_version=5.4 tf_rpc=PrepareProviderConfig timestamp=2023-10-31T14:25:52.961Z
2023-10-31T14:25:52.961Z [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/snowflake-labs/snowflake\"].security_admin" changed the config value, but that value is unused
2023-10-31T14:25:53.043Z [WARN]  provider.terraform-provider-snowflake_v0.75.0: Response contains warning diagnostic: diagnostic_attribute="AttributeName(\"region\")" diagnostic_detail="Specify the region as part of the account parameter" tf_req_id=eff42af1-aee1-cfab-c5cb-788f754f8e91 @module=sdk.proto diagnostic_severity=WARNING tf_provider_addr=registry.terraform.io/Snowflake-Labs/snowflake @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:60 diagnostic_summary="Argument is deprecated" tf_proto_version=5.4 tf_rpc=PrepareProviderConfig timestamp=2023-10-31T14:25:53.043Z
2023-10-31T14:25:53.043Z [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/snowflake-labs/snowflake\"].sys_admin" changed the config value, but that value is unused
2023-10-31T14:25:55.441Z [WARN]  Provider "registry.terraform.io/snowflake-labs/snowflake" produced an invalid plan for snowflake_grant_privileges_to_role.grant_usage_on_dev_merge_stage, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .with_grant_option: planned value cty.False for a non-computed attribute
- .all_privileges: planned value cty.False for a non-computed attribute
- .on_account: planned value cty.False for a non-computed attribute
2023-10-31T14:25:55.446Z [WARN]  Provider "registry.terraform.io/snowflake-labs/snowflake" produced an invalid plan for snowflake_grant_privileges_to_role.grant_usage_on_merge_stage, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .with_grant_option: planned value cty.False for a non-computed attribute
- .all_privileges: planned value cty.False for a non-computed attribute
- .on_account: planned value cty.False for a non-computed attribute
2023-10-31T14:25:55.448Z [WARN]  Provider "registry.terraform.io/snowflake-labs/snowflake" produced an invalid plan for snowflake_grant_privileges_to_role.grant_future_schema_loader["RAW"], but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .on_account: planned value cty.False for a non-computed attribute
- .with_grant_option: planned value cty.False for a non-computed attribute
- .all_privileges: planned value cty.False for a non-computed attribute
2023-10-31T14:25:55.448Z [WARN]  Provider "registry.terraform.io/snowflake-labs/snowflake" produced an invalid plan for snowflake_grant_privileges_to_role.grant_future_view_developer["DEV_KPI"], but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .with_grant_option: planned value cty.False for a non-computed attribute
- .all_privileges: planned value cty.False for a non-computed attribute
- .on_account: planned value cty.False for a non-computed attribute
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ApplyResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).PlanResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ApplyResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ApplyResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).PlanResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).PlanResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.458Z [ERROR] plugin.(*GRPCProvider).ApplyResourceChange: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-31T14:25:55.459Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_managed_account_creator[\"kpi_secure_views\"]" error: Plugin did not respond
2023-10-31T14:25:55.460Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_developer[\"DEV_KPI\"]" error: Plugin did not respond
2023-10-31T14:25:55.460Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_developer[\"KPI\"]" error: Plugin did not respond
2023-10-31T14:25:55.461Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_loader[\"KPI\"]" error: Plugin did not respond
2023-10-31T14:25:55.461Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_developer[\"RAW\"]" error: Plugin did not respond
2023-10-31T14:25:55.461Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_reporter[\"KPI\"]" error: Plugin did not respond
2023-10-31T14:25:55.461Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_developer[\"DEV_KPI\"]" error: Plugin did not respond
2023-10-31T14:25:55.462Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.462Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.462Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_reporter[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.462Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.462Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.462Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_reporter[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.462Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_loader[\"RAW\"]" error: Plugin did not respond
2023-10-31T14:25:55.462Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_developer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.463Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.463Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_reporter[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.463Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.463Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.463Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_reporter[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.463Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.463Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"kpi_external\"]" error: Request cancelled
2023-10-31T14:25:55.463Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_loader[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.463Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_usage_on_merge_stage" error: Plugin did not respond
2023-10-31T14:25:55.464Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.464Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_warehouse_privileges_reporter[\"REPORTING\"]" error: Request cancelled
2023-10-31T14:25:55.464Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.464Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"dev_kpi_usage_tracking\"]" error: Request cancelled
2023-10-31T14:25:55.464Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_developer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.464Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.464Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_transformer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.464Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.464Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_reporter[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.464Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.464Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"dev_kpi_external\"]" error: Request cancelled
2023-10-31T14:25:55.465Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_usage_on_dev_merge_stage" error: Plugin did not respond
2023-10-31T14:25:55.467Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.467Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"dev_kpi_secure_views\"]" error: Request cancelled
2023-10-31T14:25:55.467Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.467Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_warehouse_privileges_developer[\"DEVELOPING\"]" error: Request cancelled
2023-10-31T14:25:55.468Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.468Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_warehouse_privileges_transformer[\"TRANSFORMING\"]" error: Request cancelled
2023-10-31T14:25:55.468Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.468Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"kpi_dbt_artifacts\"]" error: Request cancelled
2023-10-31T14:25:55.469Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.469Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.469Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.469Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_transformer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.469Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_loader[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.470Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_transformer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.470Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.470Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"kpi_usage_tracking\"]" error: Request cancelled
2023-10-31T14:25:55.470Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.470Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_reporter[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.471Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.471Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_transformer[\"kpi_secure_views\"]" error: Request cancelled
2023-10-31T14:25:55.471Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.471Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_developer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.471Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.471Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_transformer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.471Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.471Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_transformer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.471Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_developer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.471Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_transformer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_sysadmin[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_loader[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.472Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_sysadmin[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.473Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.473Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_developer[\"dev_kpi_usage_tracking\"]" error: Request cancelled
2023-10-31T14:25:55.473Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.473Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_transformer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.473Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.473Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_transformer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.473Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.473Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_db_privileges_sysadmin[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_developer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_reporter[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_views_in_db_transformer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.473Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_transformer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_developer[\"dev_kpi_external\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_developer[\"dev_kpi_secure_views\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_transformer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.474Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.474Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_developer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_transformer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_sysadmin[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_managed_account_creator[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_developer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_warehouse_privileges_managed_account_creator[\"TRANSFORMING\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_db_privileges_sysadmin[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.475Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_privileges_all_tables_in_db_developer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.476Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_loader[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.475Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.476Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_reporter[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.476Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.476Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_schema_managed_account_creator[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.476Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.476Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_db_privileges_sysadmin[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.476Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.476Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"dev_kpi_usage_tracking\"]" error: Request cancelled
2023-10-31T14:25:55.476Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.476Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"dev_kpi_secure_views\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.478Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_warehouse_privileges_loader[\"LOADING\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.478Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"dev_kpi_external\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.478Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"kpi_secure_views\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.478Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_loader[\"raw_karbon\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.478Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_loader[\"raw_merge\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.479Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_view_reporter[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.478Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.479Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"kpi_external\"]" error: Request cancelled
2023-10-31T14:25:55.479Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.479Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"kpi_usage_tracking\"]" error: Request cancelled
2023-10-31T14:25:55.479Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.479Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_developer[\"dev_kpi_usage_tracking\"]" error: Request cancelled
2023-10-31T14:25:55.479Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.480Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_developer[\"dev_kpi_external\"]" error: Request cancelled
2023-10-31T14:25:55.480Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.480Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_developer[\"dev_kpi_secure_views\"]" error: Request cancelled
2023-10-31T14:25:55.480Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.480Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_table_privileges_for_schema_loader[\"raw_dev_karbon\"]" error: Request cancelled
2023-10-31T14:25:55.480Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.480Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_transformer[\"kpi_dbt_artifacts\"]" error: Request cancelled
2023-10-31T14:25:55.480Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.480Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_transformer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.480Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.480Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_transformer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.480Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.481Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_transformer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.481Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.481Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_developer[\"RAW\"]" error: Request cancelled
2023-10-31T14:25:55.482Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.483Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_developer[\"DEV_KPI\"]" error: Request cancelled
2023-10-31T14:25:55.483Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.483Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_future_table_developer[\"KPI\"]" error: Request cancelled
2023-10-31T14:25:55.483Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.483Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_loader[\"raw_merge\"]" error: Request cancelled
2023-10-31T14:25:55.483Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.483Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_loader[\"raw_karbon\"]" error: Request cancelled
2023-10-31T14:25:55.483Z [ERROR] plugin.(*GRPCProvider).ValidateResourceConfig: error="rpc error: code = Canceled desc = context canceled"
2023-10-31T14:25:55.483Z [ERROR] vertex "snowflake_grant_privileges_to_role.grant_view_privileges_for_schema_loader[\"raw_dev_karbon\"]" error: Request cancelled

Stack trace from the terraform-provider-snowflake_v0.75.0 plugin:

panic: runtime error: index out of range [1] with length 1

goroutine 146 [running]:
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk.NewSchemaObjectIdentifierFromFullyQualifiedName({0xc00024e5a0?, 0xc0009fac60?})
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk/identifier_helpers.go:206 +0x46a
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources.configureAccountRoleGrantPrivilegeOptions(0xc0009c3ae0?, {0xc0009ffd20, 0x1, 0x1}, 0x1?, 0xc001020e08)
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources/grant_privileges_to_role.go:746 +0xd85
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources.CreateGrantPrivilegesToRole(0x0?, {0x1c84a80?, 0xc000bc6c30?})
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources/grant_privileges_to_role.go:456 +0x1ad
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1fdb560?, {0x1fdb560?, 0xc001000f30?}, 0xd?, {0x1c84a80?, 0xc000bc6c30?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:766 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000597a40, {0x1fdb560, 0xc001000f30}, 0xc001024000, 0xc0006f7080, {0x1c84a80, 0xc000bc6c30})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0xa7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000ab5ef0, {0x1fdb560?, 0xc001000e10?}, 0xc000a00960)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1060 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0005bbae0, {0x1fdb560?, 0xc000cfcc00?}, 0xc000d0ff80)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:859 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1c340e0?, 0xc0005bbae0}, {0x1fdb560, 0xc000cfcc00}, 0xc000d0ff10, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001574a0, {0x1feb1e0, 0xc000601d40}, 0xc001098120, 0xc0007a8180, 0x2ce9578, 0x0)
google.golang.org/[email protected]/server.go:1376 +0xdd2
google.golang.org/grpc.(*Server).handleStream(0xc0001574a0, {0x1feb1e0, 0xc000601d40}, 0xc001098120, 0x0)
google.golang.org/[email protected]/server.go:1753 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:998 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:996 +0x18c

Error: The terraform-provider-snowflake_v0.75.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
@ehayes9 ehayes9 added the bug Used to mark issues with provider's incorrect behavior label Oct 31, 2023
@sfc-gh-jcieslak
Copy link
Collaborator

Hey @ehayes9
Seems like the error is pointing to some grant_privileges_to_role resource that has an invalid on_schema_object.object_name field. The field should be a fully qualified name that looks like this
object_name = "\"database_name\".\"schema_name\".\"object_name\"" (\" matters if the names are case sensitive)
and in your case, it seems like it may look like this
object_name = "object_name"

@sfc-gh-jcieslak sfc-gh-jcieslak self-assigned this Nov 23, 2023
@ehayes9
Copy link
Author

ehayes9 commented Nov 24, 2023

Hey @sfc-gh-jcieslak - thanks for following up here. For our resources referencing object_names, we are looping through databases defined in our local mappings, so there is no schema or object name to qualify other than the DB (see example below)

resource "snowflake_grant_privileges_to_role" "grant_db_privileges_loader" {
  provider    = snowflake.security_admin
  for_each    = { for db, attrs in local.databases : db => attrs if length(attrs.loader_db_grants) > 0 }
  privileges  = each.value.loader_db_grants
  role_name   = "LOADER"
  on_account_object {
    object_type     = "DATABASE"
    object_name     = each.key
  }
  depends_on = [snowflake_role.role, snowflake_database.db]
}

Our locals look like this:

locals {
  databases = {
    "RAW" = {
      comment                           = "contains raw data; no transforms"
      
      loader_db_grants                  = ["USAGE","CREATE SCHEMA",]
      developer_db_grants               = ["USAGE",]

Any resources for grants related to tables are fully qualified:

resource "snowflake_grant_privileges_to_role" "grant_privileges_prod_mdac_tables" {
  provider          = snowflake.security_admin
  privileges        = ["SELECT", "UPDATE", "INSERT", "DELETE",]
  role_name         = "MANAGED_ACCOUNT_CREATOR"
  on_schema_object {
    object_type     = "TABLE"
    object_name     = "PRODUCTION.SECURE_VIEWS.MAPPED_DATA_ACCESS"
  }
}

The only other resources referencing an object_name are for a warehouse, which can't be fully qualified.

Let me know if you need any additional info!

@sfc-gh-jcieslak
Copy link
Collaborator

@ehayes9
Hey, Thanks for the additional info.
I haven't seen such stack trace yet, but I've seen many times panic: runtime error: index out of range [1] with length 1 which indicates you're passing one part identifier where more than one part identifier is expected (by part I mean more qualified name e.g. for schema object db.schema.object would be 3 parts). Also what I can see under that common error is a reference to the implementation of snowflake_grant_privileges_to_role on line 746 which is pointing to the branch where we're dealing with case "on_schema_object"."object_name". Maybe the problem is not associated with the databases you showed (because they're using on_account_object option), but rather with some snowflake_grant_privileges_to_role resource that is trying to grant privileges to some schema object with one part object_name identifier.

@sfc-gh-jcieslak
Copy link
Collaborator

Hey @ehayes9
Can we close the issue?

@sfc-gh-jcieslak
Copy link
Collaborator

@ehayes9 any updates on the issue?

@ehayes9
Copy link
Author

ehayes9 commented Feb 8, 2024

@sfc-gh-jcieslak we are taking another approach and haven't run into issues yet - I will close this issue. Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior category:identifiers
Projects
None yet
Development

No branches or pull requests

2 participants