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]: 2024_08 breaks snowflake_managed_account #3394

Closed
1 task
jrobison-sb opened this issue Feb 12, 2025 · 13 comments
Closed
1 task

[Bug]: 2024_08 breaks snowflake_managed_account #3394

jrobison-sb opened this issue Feb 12, 2025 · 13 comments
Labels
bug Used to mark issues with provider's incorrect behavior category:preview Topics connected with preview features resource:managed_account Issue connected to the snowflake_managed_account resource

Comments

@jrobison-sb
Copy link
Contributor

Terraform CLI Version

v1.10.0

Terraform Provider Version

v1.0.3

Company Name

Springbuk

Terraform Configuration

resource "snowflake_managed_account" "reader" {
  for_each       = length(var.snowflake_reader_accounts) > 0 ? toset(var.snowflake_reader_accounts) : []
  name           = upper("${var.env_name}_${each.key}")
  admin_name     = "admin"
  admin_password = "redacted"
  type           = "READER"
  comment        = "${var.env_name} reader account for ${each.key}"
}

Category

category:resource

Object type(s)

resource:managed_account

Expected Behavior

This resource was created a long time ago and was working fine for a long time. My expectation is that it should continue working fine without breaking terraform plan and/or terraform apply.

Actual Behavior

The actual behavior is that it does break terraform plan and it does break terraform apply, probably after BCR 2024_08 was released to general availability (at least for us).

$ terraform plan
...
│ Error: giving up after 5 attempts
│ 
│   with module.sandbox4_application.snowflake_managed_account.reader["foo"],
│   on ../../modules/aws/application/snowflake.tf line 1854, in resource "snowflake_managed_account" "reader":
│ 1854: resource "snowflake_managed_account" "reader" {

Steps to Reproduce

  1. Use a snowflake_managed_account resource similar to what is seen above, and use it without BCR 2024_08. This will work fine.
  2. Enable BCR 2024_08.
  3. Try a terraform plan and see that it is broken.
  4. Disable BCR 2024_08
  5. Try a terraform plan and see that it works again

How much impact is this issue causing?

High

Logs

No response

Additional Information

I'm hesitant to post thousands of lines of TF_LOG=DEBUG, because I don't want to risk exposing secrets, but I was able to pick out this part from a debug plan log:

2025-02-12T09:57:55.910-0500 [DEBUG] provider.terraform-provider-snowflake_v1.0.3: 2025/02/12 09:57:55 [DEBUG] sql-conn-query: [query SHOW MANAGED ACCOUNTS LIKE 'SANDBOX4_FOO' --terraform_provider_usage_tracking {"json_schema_version":"1","version":"v1.0.3","resource":"snowflake_managed_account","operation":"read"} err <nil> duration 164.556417ms args {}] (LOC1234)
2025-02-12T09:57:55.910-0500 [DEBUG] provider.terraform-provider-snowflake_v1.0.3: 2025/02/12 09:57:55 [DEBUG] retryable operation resulted in error: object does not exist
2025-02-12T09:57:55.911-0500 [DEBUG] provider.terraform-provider-snowflake_v1.0.3: 2025/02/12 09:57:55 [INFO] operation not finished yet, retrying in 3 seconds

Would you like to implement a fix?

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

Hi @jrobison-sb 👋

This is similar to #3161. The issue occurs because of a renamed column in SHOW MANAGED ACCOUNTS. For now, please disable the bundle or use the execute resource. We should be able to fix this and release it soon.

@sfc-gh-jmichalak sfc-gh-jmichalak added the resource:managed_account Issue connected to the snowflake_managed_account resource label Feb 13, 2025
@natashamathur
Copy link

Hi! Do you have a timeline for when the fixed release will come out? Trying to get an idea of in the next 1-2 weeks vs 1 month from now

@sfc-gh-jcieslak
Copy link
Collaborator

Hey @natashamathur 👋
The fix will be most likely released next week. Just a note, the fix will be only available in the latest version (that will be v1.0.4), so upgrade will be needed.

@natashamathur
Copy link

natashamathur commented Feb 13, 2025 via email

@spcvalente
Copy link

same here, looking forward to that release. cheers!

sfc-gh-jcieslak added a commit that referenced this issue Feb 19, 2025
## Changes
- Adjust expected SHOW MANAGED ACCOUNT output to support:
https://docs.snowflake.com/en/release-notes/bcr-bundles/2024_08/bcr-1738.
Fix for
#3394.
- Adjust account issues (relink to correct JIRA reference)
@alexandrewatercare
Copy link

Hi,

Do we know when it'll be fixed, it become a blocker for our delivery.

Thanks

@sfc-gh-asawicki
Copy link
Collaborator

We should have a release next week (Tue or Wed).

@ldonnellanIDBS
Copy link

Thank you for fixing this. It seems to be getting quite close to the scheduled time for 2024_08 getting Generally Enabled. We've currently got that bundle disabled as a workaround while this is being resolved. Do you have an idea of when in March that will be happening and how quickly we'll need to action moving to 1.0.4?

For reference: https://docs.snowflake.com/en/release-notes/bcr-bundles/2024_08_bundle
Image

@spcvalente
Copy link

1.0.4 fixed the issue

@sfc-gh-jcieslak
Copy link
Collaborator

sfc-gh-jcieslak commented Feb 27, 2025

Hi all 👋
The 1.0.4 was released yesterday. @spcvalente Thanks for confirming. @jrobison-sb as you are the author of this issue, could you also confirm and close the ticket (or leave it open if there's still some issues with managed account)?

@ldonnellanIDBS
Copy link

Thank you for fixing this. It seems to be getting quite close to the scheduled time for 2024_08 getting Generally Enabled. We've currently got that bundle disabled as a workaround while this is being resolved. Do you have an idea of when in March that will be happening and how quickly we'll need to action moving to 1.0.4?

For reference: https://docs.snowflake.com/en/release-notes/bcr-bundles/2024_08_bundle Image

For anybody wondering, I raised this with Snowflake support and got the following response:

The Bundle is expected to be made Generally Enabled in the third week of March 2025. However, this schedule is subject to change

@jrobison-sb
Copy link
Contributor Author

@jrobison-sb as you are the author of this issue, could you also confirm and close the ticket (or leave it open if there's still some issues with managed account)?

Yes, I'll upgrade and re-enable BCR 2024_08 probably today or tomorrow and will report back. Thanks.

@jrobison-sb
Copy link
Contributor Author

@sfc-gh-jcieslak

Hi all 👋 The 1.0.4 was released yesterday. @jrobison-sb as you are the author of this issue, could you also confirm and close the ticket (or leave it open if there's still some issues with managed account)?

I upgraded this morning and it works great. Thank you for your efforts on this one.

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 category:preview Topics connected with preview features resource:managed_account Issue connected to the snowflake_managed_account resource
Projects
None yet
Development

No branches or pull requests

8 participants