Add virtual network flow logs quickstart - #489
Open
halkazwini wants to merge 4 commits into
Open
Conversation
stemaMSFT
suggested changes
Aug 4, 2026
stemaMSFT
left a comment
Contributor
There was a problem hiding this comment.
The overall shape looks good: reusing the regional Network Watcher and creating a dedicated storage account keeps the quickstart focused and avoids lifecycle-rule conflicts with a shared account.
There is one issue I think needs to be addressed before merge:
retention_daysdefaults to0and is documented as retaining data indefinitely, but the resource always emitsretention_policy { enabled = true, days = 0 }. Please encode the intended semantics explicitly, for example withenabled = var.retention_days > 0, or remove the zero/indefinite contract. As written, the default path relies on undocumented provider/API handling and may fail at apply.
Two documentation improvements would also make the lifecycle behavior clearer:
- Explain that the storage account is intentionally dedicated because the flow-log resource manages and may overwrite its lifecycle rules.
- Note that
retention_days = 0allows logs to accumulate until deletion, and thatterraform destroydeletes the dedicated account and its stored logs.
The East US defaults and lack of cross-region prevalidation seem like usability concerns rather than blockers.
Author
|
Thanks @stemaMSFT! I addressed the retention behavior and documentation feedback:
The pre-PR check and CLA check pass. The latest E2E check is waiting on the repository environment. Would you please take another look when you have a chance? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Validation
terraform fmt -checkterraform init -backend=falseterraform validatewith AzureRM 5.0.1