-
Notifications
You must be signed in to change notification settings - Fork 447
feat: Implement rotating pats #3843
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
Conversation
f8c1cf1
to
964de07
Compare
Integration tests cancelled for f8c1cf1aa4ffeef159c35465f43670fc7e193777 |
Account-level tests failure for f8c1cf1aa4ffeef159c35465f43670fc7e193777 |
Account-level tests failure for 964de07c9c205385fc46a9e61689fb3a1e8335b7 |
Integration tests failure for 964de07c9c205385fc46a9e61689fb3a1e8335b7 |
Account-level tests success for 8a6e3fd2bc306e3794f4075de6644ede6f0d95bc |
Integration tests success for 8a6e3fd2bc306e3794f4075de6644ede6f0d95bc |
pkg/testacc/resource_user_programmatic_access_token_acceptance_test.go
Outdated
Show resolved
Hide resolved
pkg/testacc/resource_user_programmatic_access_token_acceptance_test.go
Outdated
Show resolved
Hide resolved
}, | ||
}, | ||
}) | ||
} | ||
|
||
// TODO(next PR): add tests for rotating the token | ||
func TestAcc_UserProgrammaticAccessToken_rotating(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also thinking that we should have an acceptance test checking the path from the example (using time_rotation resource). It would validate and document what we are proposing.
You would need to:
- add this to the test definition:
ExternalProviders: map[string]resource.ExternalProvider{
"time": {
VersionConstraint: "0.13.1",
Source: "hashicorp/time",
},
},
- trigger change on the time_rotation resource (e.g. by providing and changing the triggers https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/rotating#triggers-1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oke
...ceptance/bettertestspoc/assert/resourceassert/user_programmatic_access_token_resource_gen.go
Outdated
Show resolved
Hide resolved
Integration tests cancelled for e772b93a09397dd2a94020d9f4f6857697e6bddd |
Integration tests cancelled for a34a12a6edb17832bf74b4c5d7c0dde7204efcda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I altered the resource as discussed, mainly:
- the token is not rotated when the
keeper
field is added or removed - the
keeper
field is now a string - all docs are updated
- follow-up tests (with the time_rotating resource and computed values) can be done in the next PR.
...ceptance/bettertestspoc/assert/resourceassert/user_programmatic_access_token_resource_gen.go
Outdated
Show resolved
Hide resolved
}, | ||
}, | ||
}) | ||
} | ||
|
||
// TODO(next PR): add tests for rotating the token | ||
func TestAcc_UserProgrammaticAccessToken_rotating(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next PRs.
pkg/testacc/resource_user_programmatic_access_token_acceptance_test.go
Outdated
Show resolved
Hide resolved
pkg/testacc/resource_user_programmatic_access_token_acceptance_test.go
Outdated
Show resolved
Hide resolved
Account-level tests failure for e772b93a09397dd2a94020d9f4f6857697e6bddd |
Account-level tests failure for a13e3c8f034da237d199b9a5022be9a960525ef3 |
Integration tests failure for a13e3c8f034da237d199b9a5022be9a960525ef3 |
Add the remaining features of the user PAT resource:
snowflake_user_programmatic_access_token
resource