-
Notifications
You must be signed in to change notification settings - Fork 72
feat(ske): support audit log configuration #1578
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
Open
tobias-pfaffelmoser-ske
wants to merge
6
commits into
stackitcloud:main
Choose a base branch
from
tobias-pfaffelmoser-ske:feat/ske-audit-logs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4e4410b
feat(ske): support audit log configuration
tobias-pfaffelmoser-ske 9dbda2f
docs(ske): clarify mapAudit state handling when API omits audit block
tobias-pfaffelmoser-ske 3d628dc
docs(ske): add audit block to ske_cluster example
tobias-pfaffelmoser-ske 6644cbd
docs(ske): regenerate ske_cluster docs with audit example
tobias-pfaffelmoser-ske 85c36d8
docs(ske): simplify audit attribute description
tobias-pfaffelmoser-ske 52f7b99
refactor(ske): simplify mapAudit for missing API audit block
tobias-pfaffelmoser-ske File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 don't fully get this, can't the API just include
falsein the response in that case?{ ... "audit": { "enabled": false } }Else you might have users which will run into state drifts: When Terraform users set
audit.enabledtofalsein their Terraform configuration, Terraform will also sendfalseto the API. From my current understanding the API then just won't return theauditobject at all in the response. This will lead to Terraform settingaudit.enabledtonullhere which will then result in a state drift error.Uh oh!
There was an error while loading. Please reload this page.
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.
Good point.
Just checked with the team: when the feature is available in the respective region, the API always echoes the audit object back, including
{ "enabled": false }. So settingaudit.enabled = falsereturnsenabled: falseand maps cleanly back into state - so no drift expected in this scenario.When the feature is not available in the respective region, the API omits the
auditobject entirely. That is the situation wherecl.Audit == nil, and in that case, audit shouldn't be configured on the cluster in the first place. Mapping it to null might make sense: if a user tries to configureauditin a region without the feature, the resulting diff could be the desired signal that the configuration has no effect at all. WDYT?