-
Notifications
You must be signed in to change notification settings - Fork 478
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
bugfix: Make the Azure Defender clause robust against a non-existent … #258
Merged
lonegunmanb
merged 20 commits into
Azure:master
from
skyvafnir:fix-disabled-log_analytics_workspace
Sep 30, 2022
Merged
Changes from 9 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
32472bc
bugfix: Make the Azure Defender clause robust against a non-existent …
gzur 8ac6c72
Merge branch 'master' of github.com:Azure/terraform-azurerm-aks into …
gzur 58caf97
Leverage the terraform `locals` clause to unify analytics workspace l…
gzur 9d06fa5
Ensure the existence of an analytics workspace enabling Microsoft Def…
gzur 5fe6e64
terraform fmt
gzur 7fbe2ed
Update docs to state that Microsoft Defender requires an Analytics Wo…
gzur eaab22d
Add link to analytics workspace var to defender var docs
gzur 45e04d3
Close parentheses
gzur cd498f6
Merge branch 'Azure:master' into fix-disabled-log_analytics_workspace
gzur fb7f810
Respond to comments
gzur 05ff54e
Apply changes made by automation suite
gzur f10a149
Remove unused variable. I
gzur 38ac6d3
Revert "Remove unused variable."
gzur f393026
Instruct tflint to ignore unused variable
gzur 63ffe5b
cleanup
gzur ae9e5d1
Refactor the Defender precondition expression
gzur 4fde09a
Re-introduce `log_analytics_solution_id`
gzur 19e15ed
Merge branch 'master' of github.com:Azure/terraform-azurerm-aks into …
gzur e2c9204
Re-introduce autogenerated documentation after merge
gzur e3016f2
Add control local variable for whether to create an analytics solutio…
gzur 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 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 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 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
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.
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.
Would an object with
null
field be better (the caller don't need to check whether this object isnull
)?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.
But won't the caller just have to check whether
local.log_analytics_workspace.id/name
isnull
instead?I feel that this breaks the Principle of Least Astonishment, since the module will have already decided that there is no
log_analytics_workspace
- based on the inputs.In this scenario, I would not expect there to be an object of that type but with attributes as
null
.I would expect the object itself to be
null
.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.
In Terraform assign
null
to an argument is equal to omit this argument, in some cases the caller doesn't need to check whether the log analytics workspace id isnull
or not, if the caller just assigns it to an optional argument, in that case we can save anull
check. I personally prefer this "null
safe" style, but I think your point also make sense. Please allow me to have more discuss with other people, thanks for your understanding.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.
did we reach a consensus on:
vs.
?