Skip to content
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

Support for trafficAnalyticsInterval in azurerm_network_watcher_flow_log #5830

Closed
joedoss opened this issue Feb 20, 2020 · 3 comments
Closed

Comments

@joedoss
Copy link

joedoss commented Feb 20, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

traffic_analytics inside azurerm_network_watcher_flow_log currently defaults to a "traffic analytics processing interval" of 1 hour. The Azure portal allows setting this value to either 1 hour or 10 minutes.

The ARM template includes a parameter (trafficAnalyticsInterval) to set "The interval in minutes which would decide how frequently TA service should do flow analytics"
https://docs.microsoft.com/en-us/azure/templates/microsoft.network/2019-11-01/networkwatchers/flowlogs#TrafficAnalyticsConfigurationProperties

It would be useful to add this setting to the terraform provider.

New or Affected Resource(s)

affected resource: azurerm_network_watcher_flow_log

Potential Terraform Configuration

resource "azurerm_network_watcher_flow_log" "ExampleFlowlog" {
  network_watcher_name = data.azurerm_network_watcher.networkwatcher.name
  resource_group_name  = data.azurerm_resource_group.networkwatcherrg.name

  network_security_group_id = azurerm_network_security_group.ExampleNSG.id
  storage_account_id        = azurerm_storage_account.nsgflowlogstorage.id
  enabled                   = true
  version                   = 2

  retention_policy {
    enabled = true
    days    = 14
  }

  traffic_analytics {
    enabled               = true
   trafficAnalyticsInterval = "10"
    workspace_id          = azurerm_log_analytics_workspace.hub-loganalyticsworkspace.workspace_id
    workspace_region      = azurerm_log_analytics_workspace.hub-loganalyticsworkspace.location
    workspace_resource_id = azurerm_log_analytics_workspace.hub-loganalyticsworkspace.id
  }
}

References

https://docs.microsoft.com/en-us/azure/templates/microsoft.network/2019-11-01/networkwatchers/flowlogs#TrafficAnalyticsConfigurationProperties

@katbyte katbyte added this to the v2.1.0 milestone Mar 9, 2020
katbyte pushed a commit that referenced this issue Mar 9, 2020
This PR fix issue #5830

Additionally, fix one bug of example in document, which lacks of specifying account_kind to StorageV2 (which defaults to v1) for storage account, which is required by azurerm_log_analytics_workspace.
@katbyte
Copy link
Collaborator

katbyte commented Mar 9, 2020

closed by #5851

@katbyte katbyte closed this as completed Mar 9, 2020
r0bnet pushed a commit to r0bnet/terraform-provider-azurerm that referenced this issue Mar 9, 2020
…icorp#5851)

This PR fix issue hashicorp#5830

Additionally, fix one bug of example in document, which lacks of specifying account_kind to StorageV2 (which defaults to v1) for storage account, which is required by azurerm_log_analytics_workspace.
@ghost
Copy link

ghost commented Mar 11, 2020

This has been released in version 2.1.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.1.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 9, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants