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]: ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES parameter setting does not work #3344

Open
1 task done
yuukiyamanaka opened this issue Jan 18, 2025 · 5 comments
Open
1 task done
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior resource:account_parameter Issue connected to the snowflake_account_parameter resource

Comments

@yuukiyamanaka
Copy link
Contributor

Terraform CLI Version

1.9.4

Terraform Provider Version

1.0.1

Company Name

No response

Terraform Configuration

resource "snowflake_account_parameter" "enforce_network_rules_for_internal_stages" {
  key   = "ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES"
  value = "true"

  lifecycle {
    prevent_destroy = true
  }
}

Category

category:resource

Object type(s)

resource:account_parameter

Expected Behavior

TF should run the below query

ALTER ACCOUNT SET ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES = true

Actual Behavior

Raise the below error at terraform apply.

│ Error: 001003 (42000): SQL compilation error:
│ syntax error line 1 at position 204 unexpected '<EOF>'.

TF currently run the below Query

ALTER ACCOUNT SET ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES

true parameter is missing.

Steps to Reproduce

  1. Add resource block
resource "snowflake_account_parameter" "enforce_network_rules_for_internal_stages" {
  key   = "ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES"
  value = "true"

  lifecycle {
    prevent_destroy = true
  }
}
  1. terraform apply

How much impact is this issue causing?

Low

Logs

No response

Additional Information

This error raises because ENABLE_UNHANDLED_EXCEPTIONS_REPORTING is treated as keyword type parameter in SDK.
I create PR as reference for fix

#3343

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@yuukiyamanaka yuukiyamanaka added the bug Used to mark issues with provider's incorrect behavior label Jan 18, 2025
@yuukiyamanaka yuukiyamanaka changed the title [Bug]: [Bug]: ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES parameter setting does not work Jan 18, 2025
@sfc-gh-jmichalak
Copy link
Collaborator

Hi @yuukiyamanaka 👋

Thanks for reporting this and raising the PR. I added a small comment in the review.

@sfc-gh-jmichalak sfc-gh-jmichalak self-assigned this Jan 20, 2025
@sfc-gh-jmichalak sfc-gh-jmichalak added the resource:account_parameter Issue connected to the snowflake_account_parameter resource label Jan 20, 2025
sfc-gh-jmichalak added a commit that referenced this issue Jan 23, 2025
)

<!-- Feel free to delete comments as you fill this in -->

<!-- summary of changes -->

`ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES` requires boolean parameter
so I change the setting from ddl:keyword to ddl:parameter.

## Test Plan
<!-- detail ways in which this PR has been tested or needs to be tested
-->
* [ ] acceptance tests
<!-- add more below if you think they are relevant -->
* [ ] …

## References
<!-- issues documentation links, etc  -->

#3344

Co-authored-by: Jakub Michalak <[email protected]>
@yuukiyamanaka
Copy link
Contributor Author

I'm sorry for my late response.
Thank you for merging!

@sfc-gh-jmichalak
Copy link
Collaborator

Thanks for the response. FYI, we close the issues after the fixes are released (this one has not been released yet), and the fix is confirmed by the customer :) I'll reopen this for now, and close again after the release.

@yuukiyamanaka
Copy link
Contributor Author

I'm sorry for the trouble and thank you very much.

@sfc-gh-jmichalak
Copy link
Collaborator

Hi @yuukiyamanaka 👋

We've released v1.0.3 with the fix (release, migration guide). Please upgrade to this version.

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 resource:account_parameter Issue connected to the snowflake_account_parameter resource
Projects
None yet
Development

No branches or pull requests

2 participants