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]: Missing account parameters in provider #3044

Open
1 task
dlouseiro opened this issue Sep 4, 2024 · 3 comments
Open
1 task

[Bug]: Missing account parameters in provider #3044

dlouseiro opened this issue Sep 4, 2024 · 3 comments
Assignees
Labels
bug Used to mark issues with provider's incorrect behavior resource:account_parameter Issue connected to the snowflake_account_parameter resource

Comments

@dlouseiro
Copy link

dlouseiro commented Sep 4, 2024

Terraform CLI Version

1.5.7

Terraform Provider Version

0.92.0

Terraform Configuration

resource "snowflake_account_parameter" "cortex_enabled_cross_region" {
  key   = "CORTEX_ENABLED_CROSS_REGION"
  value = "AWS_EU"
}

resource "snowflake_account_parameter" "saml_identity_provider" {
  key   = "SAML_IDENTITY_PROVIDER"
  value = "<some-super-long-string>"
}

resource "snowflake_account_parameter" "sso_login_page" {
  key   = "SSO_LOGIN_PAGE"
  value = "true"
}

Category

category:resource

Object type(s)

No response

Expected Behavior

The terraform apply would not raise any errors.

Actual Behavior

Provider fails with:

│ Error: Invalid object parameter: CORTEX_ENABLED_CROSS_REGION
│
│   with snowflake_account_parameter.cortex_enabled_cross_region,
│   on account.tf line 25, in resource "snowflake_account_parameter" "cortex_enabled_cross_region":
│   25: resource "snowflake_account_parameter" "cortex_enabled_cross_region" {
│
╵
╷
│ Error: Invalid object parameter: SAML_IDENTITY_PROVIDER
│
│   with snowflake_account_parameter.saml_identity_provider,
│   on account.tf line 50, in resource "snowflake_account_parameter" "saml_identity_provider":
│   50: resource "snowflake_account_parameter" "saml_identity_provider" {
│
╵
╷
│ Error: Invalid object parameter: UI_NOTIFICATIONS
│
│   with snowflake_account_parameter.ui_notifications,
│   on account.tf line 70, in resource "snowflake_account_parameter" "ui_notifications":
│   70: resource "snowflake_account_parameter" "ui_notifications" {
│

Steps to Reproduce

Running terraform apply

How much impact is this issue causing?

Medium

Logs

No response

Additional Information

No response

Would you like to implement a fix?

  • Yeah, I'll take it 😎
@dlouseiro dlouseiro added the bug Used to mark issues with provider's incorrect behavior label Sep 4, 2024
@sfc-gh-jcieslak
Copy link
Collaborator

Hey 👋
If there's a missing parameter, please use the unsafe_execute resource. We'll most likely add missing parameters when reworking the account resource as part of the GA objects preparation for V1.

@dlouseiro
Copy link
Author

unsafe_execute

Thank you @sfc-gh-jcieslak ! Will do

@sfc-gh-jcieslak
Copy link
Collaborator

Hi again 👋
We recently updated the account parameters and now it's clearer what parameters are supported atm: https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/account_parameter#required. Moreover, we are planning to work on account resource where you will be able to specify all account parameters without a need to specify every parameter in a separate resource.

@sfc-gh-jmichalak sfc-gh-jmichalak added the resource:account_parameter Issue connected to the snowflake_account_parameter resource label Dec 16, 2024
@sfc-gh-jmichalak sfc-gh-jmichalak self-assigned this Dec 19, 2024
sfc-gh-jmichalak added a commit that referenced this issue Dec 20, 2024
<!-- Feel free to delete comments as you fill this in -->
- Add missing parameters based on the docs and output of SHOW PARAMETERS
IN ACCOUNT
- Add missing unit tests and implementations
- Add missing validations
- Relax validations for ints - just validate if they are non-negative
- Update docs
<!-- summary of changes -->

## 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  -->
#3044 
#3116
#3245

## TODO
- Do not add missing user parameters - this will be done in
SNOW-1844996. Here, they are added only to account and session level
- More acceptance and integration tests should be done on a separate
account. This should be done during account resource follow-up
(SNOW-1866453)
sfc-gh-asawicki pushed a commit that referenced this issue Dec 20, 2024
<!-- Feel free to delete comments as you fill this in -->
- Add missing parameters based on the docs and output of SHOW PARAMETERS
IN ACCOUNT
- Add missing unit tests and implementations
- Add missing validations
- Relax validations for ints - just validate if they are non-negative
- Update docs
<!-- summary of changes -->

## 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  -->
#3044 
#3116
#3245

## TODO
- Do not add missing user parameters - this will be done in
SNOW-1844996. Here, they are added only to account and session level
- More acceptance and integration tests should be done on a separate
account. This should be done during account resource follow-up
(SNOW-1866453)
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

3 participants