Hey all, Pulumi Alias question, I am having an iss...
# golang
s
Hey all, Pulumi Alias question, I am having an issue migrating from an old version of https://github.com/pulumi/pulumi-snowflake to newer. A type of resource was removed (moved to another name) Type: snowflakeindexRole changed to snowflakeindexAccountRole Issue: I need to keep my Roles and was hoping I could use alias to shuffle these resources from Role into AccountRole Was hoping this would work but I see DELETE (Role) and CREATE (AccountRole) with same information.
Copy code
// Add pulumi Alias to move to the new Type -- <https://www.pulumi.com/docs/concepts/options/aliases/>
roleOpts := append(opts, pulumi.Aliases([]pulumi.Alias{
    // Combination of name and type is enough to be unique.
    {Name: pulumi.String(strings.ToLower(roleName)),
       // Previous to refactor - created the type snowflake:index:Role.
       Type: pulumi.String("snowflake:index:Role"),
    },
}))

role, err := snowflake.NewAccountRole(ctx, strings.ToLower(roleName), &snowflake.AccountRoleArgs{
    Name: pulumi.String(roleName),
}, roleOpts...)
if err != nil {
    return nil, nil, err
}
Is there something wrong with my Alias?