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

Support "days_to_expiry" for a given user #1155

Closed
thisiscab opened this issue Jul 26, 2022 · 2 comments
Closed

Support "days_to_expiry" for a given user #1155

thisiscab opened this issue Jul 26, 2022 · 2 comments
Labels
category:resource feature-request Used to mark issues with provider's missing functionalities resource:user Issue connected to the snowflake_user resource

Comments

@thisiscab
Copy link

thisiscab commented Jul 26, 2022

Is your feature request related to a problem? Please describe.

We're trying to set an expiration date for some of the users we're creating. You can achieve this in the Admin of Snowflake but this provider doesn't support that option.

Describe the solution you'd like

To add the property "days_to_expiry" at the user level.

Describe alternatives you've considered

None

Additional context

It seems like you're accounting for that property in the "user_ownership_grant" but it's not being surfaced at the user level.

@thisiscab thisiscab added the feature-request Used to mark issues with provider's missing functionalities label Jul 26, 2022
@sfc-gh-jcieslak sfc-gh-jcieslak added category:resource resource:user Issue connected to the snowflake_user resource labels May 20, 2024
sfc-gh-asawicki added a commit that referenced this issue Aug 23, 2024
sfc-gh-asawicki added a commit that referenced this issue Aug 28, 2024
Fix known user resource-connected issues:
- Change the sensitiveness of name and login_name (References: #2662
#2668)
- Handle "null" properly for the nullable bool text attributes in user
(References: #2817)
- Fix diff suppression for default_x in user resource (References:
#2836)
- Update the migration guide (References #2938 #2942)
- Fix incorrect state after failed to alter (References #2970)
- Confirm the problem with the computed disabled attribute (References
#1572)
- Confirm that the problem with the null-out password was already solved
(References #1535)
- Add TODO to handle days to expiry in user (References #1155)

The next 2 PRs will contain:
- adjusting user resource to our rework conventions (also adding
additional fields and handling #1155 and #1572)
- adjusting user datasource (will handle #2902)

User rework will not include handling new types of users (service,
legacy service); this will be done a bit later.
sfc-gh-asawicki added a commit that referenced this issue Sep 1, 2024
Rework user resource:
- schema adjusted
- handle show output properly
- updated user acceptance tests with new builders and assertions
- introduce new helpers in `resource_helpers_create.go`,
`resource_helpers_update.go`, and `resource_helpers_read.go`
- cleaned parameters handling a bit
- reused `parameterDef` between user and schema
- removed old way of handling keys in tests
- added float property to the SDK
- added integration tests documenting specific attributes behavior

Next PRs:
- handle policies for user (SNOW-1645875)
- deal with improper custom diffs with diff suppression (SNOW-1629468)
- move collection util (SNOW-1473414)
- remove `checkBool` helper
- datasource
- rename methods in `resource_helpers_read.go`
- update all changes in README (+ note that external changes for a few
attributes)
- change description of user public keys resource (should be used only
if user is not managed by terraform)
- add one more test for login and display name
- check the exact behavior of default_namespace and default_role because
it looks like it is handled in a case-insensitive manner on Snowflake
side
- check if any user parameter needs diffsuppression or validation
- test if hasMfa is always non-nullable, check if this has mfa helps
with disable mfa, add to the describe output too
- test what is visible if everything is set if there is no ownership on
the active role (+ update docs)
- handle `snowflake_user_password_policy_attachment` and
`snowflake_user_public_keys`
- add `IgnoreChangeToCurrentSnowflakeValueInShow` and other suppressors

References:
- #1155 
- #1572
@sfc-gh-asawicki
Copy link
Collaborator

Hey @thisiscab. We released v0.95 of the provider yesterday. It adds the days_to_expiry attribute: https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/user#days_to_expiry.

@sfc-gh-asawicki
Copy link
Collaborator

Closing the issue due to inactivity. Please create a new one if the issue persists in the newest version of the provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:resource feature-request Used to mark issues with provider's missing functionalities resource:user Issue connected to the snowflake_user resource
Projects
None yet
Development

No branches or pull requests

3 participants