-
Notifications
You must be signed in to change notification settings - Fork 471
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
Implement Data Collection Rule for Container Insights #623
base: main
Are you sure you want to change the base?
Conversation
6d4a17e
to
74b27bc
Compare
@lonegunmanb this PR was implemented looking at the documentation example available here: Cc: @ganga1980 and @wanlonghenry in case they have review comments. Thanks |
74b27bc
to
9c5f699
Compare
9c5f699
to
95da31f
Compare
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.
@zioproto We've got the following error:
TestExamplesForV4/application_gateway_ingress_v4 2024-12-20T16:01:45Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1; ╷
│ Error: Attempt to get attribute from null value
│
│ on ../../v4/log_analytics.tf line 86, in locals:
│ 86: dcr_location = coalesce(local.log_analytics_workspace.location, try(data.azurerm_log_analytics_workspace.main[0].location, null))
│ ├────────────────
│ │ local.log_analytics_workspace is null
│
│ This value is null, so it does not have any attributes.
╵}
apply.go:34:
Error Trace: /src/test/vendor/github.com/gruntwork-io/terratest/modules/terraform/apply.go:34
/src/test/vendor/github.com/Azure/terraform-module-test-helper/e2etest.go:107
/src/test/vendor/github.com/Azure/terraform-module-test-helper/e2etest.go:87
/src/test/vendor/github.com/Azure/terraform-module-test-helper/e2etest.go:55
/src/test/e2e/terraform_aks_test.go:211
Error: Received unexpected error:
FatalError{Underlying: error while running command: exit status 1; ╷
│ Error: Attempt to get attribute from null value
│
│ on ../../v4/log_analytics.tf line 86, in locals:
│ 86: dcr_location = coalesce(local.log_analytics_workspace.location, try(data.azurerm_log_analytics_workspace.main[0].location, null))
│ ├────────────────
│ │ local.log_analytics_workspace is null
│
│ This value is null, so it does not have any attributes.
╵}
Test: TestExamplesForV4/application_gateway_ingress_v4
Need further investigation.
log_analytics.tf
Outdated
@@ -81,3 +81,65 @@ resource "azurerm_log_analytics_solution" "main" { | |||
publisher = "Microsoft" | |||
} | |||
} | |||
|
|||
locals { | |||
dcr_location = coalesce(local.log_analytics_workspace.location, try(data.azurerm_log_analytics_workspace.main[0].location, 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.
Could we try coalesce(try(local.log_analytics_workspace.location, null), try(data.azurerm_log_analytics_workspace.main[0].location, null))
here?
95da31f
to
6e4c7a6
Compare
6e4c7a6
to
d7fcda5
Compare
d7fcda5
to
b70b241
Compare
b70b241
to
5af1c80
Compare
5af1c80
to
e40655b
Compare
e40655b
to
6b92981
Compare
@lonegunmanb I managed to find the correct expression, the E2E tests are now passing. Please have a look. Thanks |
Describe your changes
Implement Data Collection Rule for Container Insights. This completes the work started in PR #446
Issue number
#607
Checklist before requesting a review
CHANGELOG.md
file