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

[Bug]: Adding rsa_public_key to snowflake_legacy_service_user results in "Provider produced inconsistent final plan" #3367

Open
1 task
frosforever opened this issue Jan 29, 2025 · 1 comment
Labels
general-usage General help/usage questions

Comments

@frosforever
Copy link

Terraform CLI Version

1.8.3

Terraform Provider Version

1.0.2

Company Name

No response

Terraform Configuration

resource "snowflake_legacy_service_user" "this" {
  name              = ...
  password          = ...
  default_role      = ...
  default_warehouse = ...
  comment           = ...

  rsa_public_key = ...
}

Category

category:resource

Object type(s)

No response

Expected Behavior

Apply without error

Actual Behavior

The update is applied by terraform and errors with:

Error: Provider produced inconsistent final plan
When expanding the plan for snowflake_legacy_service_user.this to include new values learned so far during apply, provider "registry.terraform.io/snowflake-labs/snowflake" produced an invalid new value for .show_output: was known, but now unknown.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Steps to Reproduce

  1. An existing snowflake_legacy_service_user without rsa key set
  2. Update the resource to contain rsa_public_key

How much impact is this issue causing?

Low

Logs

No response

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@frosforever frosforever added the bug Used to mark issues with provider's incorrect behavior label Jan 29, 2025
@sfc-gh-jmichalak
Copy link
Collaborator

Hi @frosforever 👋

How do you provide the key, exactly? I just checked with

resource "snowflake_legacy_service_user" "this" {
  ...

  rsa_public_key = file("~/.ssh/snowflake_tf_snow_key.pub")
  # OR
  rsa_public_key = <<EOT
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm9lT5FqYxVxojxjM6iaS
...
NgxUUts2n9iBtQcupUGg3cqZnmDAsHbu14R+IYmdCtw6Zhc1j3WFyp6Z0jTPrM10
MwIDAQAB
-----END PUBLIC KEY-----
EOT
}

and it works fine. Please provide logs with TF_LOG=DEBUG. Check, if you new lines are used formatted correctly.

@sfc-gh-jmichalak sfc-gh-jmichalak added general-usage General help/usage questions and removed bug Used to mark issues with provider's incorrect behavior labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general-usage General help/usage questions
Projects
None yet
Development

No branches or pull requests

2 participants