-
Notifications
You must be signed in to change notification settings - Fork 399
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
Fix import format for snowflake_database_grant #429
Fix import format for snowflake_database_grant #429
Conversation
Ah, I found same cases which should be fixed and will fix its later. |
Fixed in 8cdb7ca |
@kanata2 what version was this on? We had a regression in, I think v0.20, related to this which was later reverted. |
@ryanking I used v0.18.1, but main branch seems to have the same problem. |
I tried
|
/ok-to-test sha=b29b2b1 |
Integration tests success for b29b2b1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for all the other files
* snowflake_database_grant * snowflake_schema_grant * snowflake_table_grant * snowflake_stage_grant * snowflake_warehouse_grant
d8ea229
to
c8f9e2e
Compare
/ok-to-test sha=c8f9e2e |
Integration tests success for c8f9e2e |
@kanata2 can you update your branch with main? |
## Description According to the following code, we must pass 4 or 5 pipe-delimited values in order to use `terraform import`, but the documentation says that you should pass 3 values. Indeed, `terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' works correctly, so I fixed the documentation. https://github.com/chanzuckerberg/terraform-provider-snowflake/blob/a4240bb6bd399141f3614b3a5e1ff54476de70b4/pkg/resources/grant_helpers.go#L114-L116 ### Current Behaviour ``` $ terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' ... snowflake_database_grant.xxx: Refreshing state... [id=xxx|USAGE|false] Error: 4 or 5 fields allowed ```
Same problem as Snowflake-Labs#429. The argument of `grantIDFromString` named `stringID` expects 4 or 5 fields delimitered by "|".
## Description According to the following code, we must pass 4 or 5 pipe-delimited values in order to use `terraform import`, but the documentation says that you should pass 3 values. Indeed, `terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' works correctly, so I fixed the documentation. https://github.com/chanzuckerberg/terraform-provider-snowflake/blob/a4240bb6bd399141f3614b3a5e1ff54476de70b4/pkg/resources/grant_helpers.go#L114-L116 ### Current Behaviour ``` $ terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' ... snowflake_database_grant.xxx: Refreshing state... [id=xxx|USAGE|false] Error: 4 or 5 fields allowed ```
## Description According to the following code, we must pass 4 or 5 pipe-delimited values in order to use `terraform import`, but the documentation says that you should pass 3 values. Indeed, `terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' works correctly, so I fixed the documentation. https://github.com/chanzuckerberg/terraform-provider-snowflake/blob/a4240bb6bd399141f3614b3a5e1ff54476de70b4/pkg/resources/grant_helpers.go#L114-L116 ### Current Behaviour ``` $ terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' ... snowflake_database_grant.xxx: Refreshing state... [id=xxx|USAGE|false] Error: 4 or 5 fields allowed ```
Description
According to the following code, we must pass 4 or 5 pipe-delimited values in order to use
terraform import
, but the documentation says that you should pass 3 values.Indeed, `terraform import snowflake_database_grant.xxx 'xxx|||USAGE|false' works correctly, so I fixed the documentation.
https://github.com/chanzuckerberg/terraform-provider-snowflake/blob/a4240bb6bd399141f3614b3a5e1ff54476de70b4/pkg/resources/grant_helpers.go#L114-L116
Current Behaviour