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

getting Error: 260002: password is empty when using Private key to connect #2245

Closed
bob-zarkoob opened this issue Dec 8, 2023 · 4 comments
Closed
Labels
bug Used to mark issues with provider's incorrect behavior

Comments

@bob-zarkoob
Copy link

Terraform CLI and Provider Versions

0.78

Terraform Configuration

provider "snowflake" {
  account     = var.snowflake_account_locator
  username    = var.snowflake_svc
  #  private_key_path = var.private_key_path
  private_key = var.private_key
  role        = var.terraform_role
  warehouse   = var.terraform_warehouse
}

Expected Behavior

Like in version 0.73 is authenticate using private key

Actual Behavior

gives following error:

│ Error: 260002: password is empty

│ with provider["registry.terraform.io/snowflake-labs/snowflake"],
│ on main.tf line 21, in provider "snowflake":
│ 21: provider "snowflake" {


Operation failed: failed running terraform plan (exit 1)

and cannot authenticate.

Steps to Reproduce

  1. terraform plan

How much impact is this issue causing?

High

Logs

No response

Additional Information

No response

@bob-zarkoob bob-zarkoob added the bug Used to mark issues with provider's incorrect behavior label Dec 8, 2023
@sfc-gh-asawicki
Copy link
Collaborator

Hey @baabaakz. Thanks for reaching out.

Versions in between introduced some changes to the configuration. You can read about them here: https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#migration-guide and here: #2169 (comment).

It seems that in your case, you have to:

  • rename the username to user;
  • add the authenticator parameter set to JWT.

@sdiazben
Copy link

Can these kind of changes be added here https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs
It's not very clear, I was only able to fix it once I found your answer (thanks for that btw!)

@sfc-gh-asawicki
Copy link
Collaborator

@sdiazben, it's great to hear that it solved your problem.

We are working on clarity in the docs. As you suggested, we will update the migration guide and probably link it to the Terraform docs.

Could you please close the issue?

@bob-zarkoob
Copy link
Author

@sfc-gh-asawicki thanks for the solution. Yeah it worked. Thank you.
let’s close this issue

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
Projects
None yet
Development

No branches or pull requests

3 participants