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

Deprecation warning for snowflake.StageGrant uses TF name #288

Open
jkodroff opened this issue Jul 8, 2023 · 8 comments
Open

Deprecation warning for snowflake.StageGrant uses TF name #288

jkodroff opened this issue Jul 8, 2023 · 8 comments
Labels
impact/accessibility Something that is difficult or impossible for some people to use kind/bug Some behavior is incorrect or out of spec

Comments

@jkodroff
Copy link
Member

jkodroff commented Jul 8, 2023

What happened?

Creating a resource of type snowflake.StageGrant gives the user a deprecation warning that references the TF name:

Diagnostics:
  snowflake:index:StageGrant (snowpipe-stage-grant):
    warning: urn:pulumi:dev::snowflake-pulumi-search-export-py::snowflake:index/stageGrant:StageGrant::snowpipe-stage-grant verification warning: This resource is deprecated and will be removed in a future major version release. Please use snowflake_grant_privileges_to_role instead.

Expected Behavior

n/a

Steps to reproduce

n/a

Output of pulumi about

CLI          
Version      3.74.0
Go Version   go1.20.5
Go Compiler  gc

Plugins
NAME       VERSION
aws        5.41.0
command    0.7.2
python     unknown
snowflake  0.29.0

Host     
OS       darwin
Version  13.3.1
Arch     arm64

This project is written in python: executable='/Users/jkodroff/src/pulumi/examples/snowflake-py-pulumi-search-export/venv/bin/python3' version='3.11.4
'

Current Stack: jkodrofftest/snowflake-pulumi-search-export-py/dev

TYPE                                                   URN
pulumi:pulumi:Stack                                    urn:pulumi:dev::snowflake-pulumi-search-export-py::pulumi:pulumi:Stack::snowflake-pulumi-search-export-py-dev
pulumi:providers:aws                                   urn:pulumi:dev::snowflake-pulumi-search-export-py::pulumi:providers:aws::default
pulumi:providers:aws                                   urn:pulumi:dev::snowflake-pulumi-search-export-py::pulumi:providers:aws::default_5_41_0
aws:iam/role:Role                                      urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:iam/role:Role::lambda-role
aws:s3/bucket:Bucket                                   urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:s3/bucket:Bucket::pulumi-search-export
aws:ssm/parameter:Parameter                            urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:ssm/parameter:Parameter::pulumi-token
pulumi:providers:command                               urn:pulumi:dev::snowflake-pulumi-search-export-py::pulumi:providers:command::default_0_7_2
pulumi:providers:snowflake                             urn:pulumi:dev::snowflake-pulumi-search-export-py::pulumi:providers:snowflake::default_0_29_0
snowflake:index/storageIntegration:StorageIntegration  urn:pulumi:dev::snowflake-pulumi-search-export-py::snowflake:index/storageIntegration:StorageIntegration::snowflake-storage-integration
aws:iam/rolePolicyAttachment:RolePolicyAttachment      urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:iam/rolePolicyAttachment:RolePolicyAttachment::lambda-execute-policy
aws:iam/policy:Policy                                  urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:iam/policy:Policy::snowflake-storage-integation-policy
aws:iam/policy:Policy                                  urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:iam/policy:Policy::pulumi-search-export-to-s3-policy
aws:iam/role:Role                                      urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:iam/role:Role::snowflake-integration-role
aws:iam/rolePolicyAttachment:RolePolicyAttachment      urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:iam/rolePolicyAttachment:RolePolicyAttachment::ssm-params-attachment
snowflake:index/database:Database                      urn:pulumi:dev::snowflake-pulumi-search-export-py::snowflake:index/database:Database::pulumi-snowflake-integration
snowflake:index/schema:Schema                          urn:pulumi:dev::snowflake-pulumi-search-export-py::snowflake:index/schema:Schema::pulumi-snowflake-integration
snowflake:index/table:Table                            urn:pulumi:dev::snowflake-pulumi-search-export-py::snowflake:index/table:Table::pulumi-search-exports
command:local:Command                                  urn:pulumi:dev::snowflake-pulumi-search-export-py::command:local:Command::vendor-deps
aws:lambda/function:Function                           urn:pulumi:dev::snowflake-pulumi-search-export-py::aws:lambda/function:Function::pulumi-search-export-to-s3


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/jkodroff
User           jkodroff
Organizations  jkodroff, oracle-workshop, jkodrofftest, zephyr, demo, pulumi

Dependencies:
NAME              VERSION
pip               23.1.2
pulumi-aws        5.41.0
pulumi-command    0.7.2
pulumi-snowflake  0.29.0
setuptools        67.6.1

Pulumi locates its logs in /var/folders/5m/4n1x3f8151s35wc80w06z5k80000gn/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).

@jkodroff jkodroff added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jul 8, 2023
@iwahbe iwahbe added impact/accessibility Something that is difficult or impossible for some people to use and removed needs-triage Needs attention from the triage team labels Jul 21, 2023
@iwahbe
Copy link
Member

iwahbe commented Jul 21, 2023

Thanks for reporting this @jkodroff. The fix will be in the bridge, so I opened pulumi/pulumi-terraform-bridge#1297 to track.

@rvasconcelossilva
Copy link

Hi there,

I also got this message. In this case, what is the recommended action from our end?

@iwahbe
Copy link
Member

iwahbe commented Jul 26, 2023

You will need to switch to a non-deprecated resource. The Pulumi token is "snowflake:index/grantPrivilegesToRole:GrantPrivilegesToRole". This corresponds to:

CSharp:

public partial class GrantPrivilegesToRole : global::Pulumi.CustomResource

Python:

class GrantPrivilegesToRole(pulumi.CustomResource):

Typescript:

export class GrantPrivilegesToRole extends pulumi.CustomResource {

Go:

type GrantPrivilegesToRole struct {

Java:

public class GrantPrivilegesToRole extends com.pulumi.resources.CustomResource {

@rvasconcelossilva
Copy link

Is there any example?

@rvasconcelossilva
Copy link

That is a big change for the grant schema is there any documentation on it?

@rvasconcelossilva
Copy link

Sorry, one more question, does it make the grant stop working?

@jkodroff
Copy link
Member Author

jkodroff commented Aug 2, 2023

@rvasconcelossilva

Does it make the grant stop working?

Not entirely sure if this is what you're asking, but the StageGrant resource still works, it's just that you get a deprecation warning. I was not able to figure out the syntax for granting to a Stage using GrantPrivilegesToRole when I filed this issue and just continued using StageGrant. The code I was working on will eventually be publicly available (maybe even this week). I'll post the example I was working on if you let me know you want to see it.

However, I think that the docs might've gotten updated since I originally filed the issue, because it looks like GrantPrivilegesToRole.onSchemaObject is the right way to specify a grant to a STAGE: https://www.pulumi.com/registry/packages/snowflake/api-docs/grantprivilegestorole/#grantprivilegestoroleonschemaobject

Good luck, and please post your code if you get something working! I'll do the same if I can get GrantPrivilegesToRole working with a STAGE.

@rvasconcelossilva
Copy link

Is there some where I can see the change? I believe there are changes in the arguments and many other things right? I believe any deprecated resource should have a how to migrate to the new one. Is there a way to help with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/accessibility Something that is difficult or impossible for some people to use kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants