-
Notifications
You must be signed in to change notification settings - Fork 477
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
feat(aks): add microsoft defender support #232
feat(aks): add microsoft defender support #232
Conversation
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
@lonegunmanb can't run the test anymore. Always getting same errors:
The |
I now created my own I was able to run the rake build, but not the tests:
|
Thanks @eyenx for opening this Pr! The dockerfile and docker imaged described in readme file is outdated and no longer been maintained, we're working on a new CI pipeline and we're close to a release (We'll release v6.0.0 with this new CI pipeline). I'm not going to update this |
main.tf
Outdated
@@ -166,6 +166,14 @@ resource "azurerm_kubernetes_cluster" "main" { | |||
} | |||
} | |||
|
|||
dynamic "microsoft_defender" { |
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.
Could we move this block to line 144 please? We're sorting arguments(assignments with equal symbol) and blocks in resource block are sorted in the following order:
count
andfor_each
- Required arguments in lexicographical order
- Optional arguments in lexicographical order
- Required blocks in lexicographical order
- Optional blocks in lexicographical order
depends_on
, thenlifecycle
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.
gonna do this ra
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.
done
variables.tf
Outdated
} | ||
|
||
variable "microsoft_defender_enabled" { |
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.
Could we move this block to line 262 please? We are sorting variables in the following order:
- Required variables in lexicographical order(variables without default value)
- Optional variables in lexicographical order
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.
gonna do this ra
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.
done
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
main.tf
Outdated
for_each = var.microsoft_defender_enabled ? ["microsoft_defender"] : [] | ||
|
||
content { | ||
log_analytics_workspace_id = var.log_analytics_workspace_id == null ? azurerm_log_analytics_workspace.main[0].id : var.log_analytics_workspace.id |
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.
Hi @eyenx , there might be a typo here since we have not var.log_analytics_workspace_id
. Could we change this line to the following line?:
log_analytics_workspace_id = coalesce(try(var.log_analytics_workspace.id, null), azurerm_log_analytics_workspace.main[0].id)
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.
Done. Sry for late reply
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
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.
Thanks @eyenx, LGTM
Changes proposed in the pull request:
Adds support for a
microsoft_defender
block introduced with hashicorp/terraform-provider-azurerm#16218Signed-off-by: Toni Tauro toni.tauro@adfinis.com