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

azurerm_network_watcher_flow_log: Property changes #26015

Merged
merged 18 commits into from
Nov 21, 2024

Conversation

favoretti
Copy link
Collaborator

@favoretti favoretti commented May 17, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave "+1" or "me too" comments, they generate extra noise for PR followers and do not help prioritize for review

Description

Allow for VNet ID to be passed as a resource to watch.
Rename network_security_group_id to target_resource_id.
Deprecate network_security_group_id behind a feature switch.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #25982

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@favoretti favoretti changed the title azurerm_network_watcher_flow_log: Property changes WIP: azurerm_network_watcher_flow_log: Property changes May 17, 2024
@favoretti favoretti changed the title WIP: azurerm_network_watcher_flow_log: Property changes azurerm_network_watcher_flow_log: Property changes May 25, 2024
@favoretti favoretti requested a review from manicminer May 25, 2024 18:46
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @favoretti. Overall this looks good. Would you mind fixing up the comments I left in-line? Once that's done I can run the tests.

@favoretti
Copy link
Collaborator Author

@stephybun Thanks, will try to fix it up asap. I can run tests myself as well, but since the run takes 6 hours, I'm fairly slow in fixing all this :) I'll poke again once I get TC to green up :)

@favoretti favoretti marked this pull request as draft June 17, 2024 12:27
@favoretti
Copy link
Collaborator Author

Drafting this, due to lack of time, will try to get to it again asap (this/next week's timeframe).

@michasacuer
Copy link

@favoretti any updates on that request?

@stephybun
Copy link
Member

@favoretti just as a heads up we're targeting the major release for mid to end August. Just something to keep in mind if you want these deprecations/renames to make it in.

@favoretti
Copy link
Collaborator Author

Oops, completely forgot about this one, so sorry.

I'll pick this up over the weekend

@VillageIke
Copy link

Bump?

@Marquis79
Copy link

@favoretti Will this request be delivered in August? Favoretti can you give us any news related to this request?

@favoretti
Copy link
Collaborator Author

Folks, I'm very sorry, but I'm swamped at work atm. If anyone has bandwidth - feel free to finish this one. I can't give any deadlines right now :( @aristosvo mind giving a hand here maybe? I know it might not be super relevant for you, but apparently a very wanted feature.

@favoretti favoretti marked this pull request as ready for review November 14, 2024 20:04
@favoretti favoretti requested review from katbyte and a team as code owners November 14, 2024 20:04
@favoretti
Copy link
Collaborator Author

image
made a single test public, passes

triggering TC next after fixing formatting

@favoretti
Copy link
Collaborator Author

@stephybun can we give a code review another pass please? I'll watch TC in the meantime. Thanks!

@favoretti
Copy link
Collaborator Author

image

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @favoretti. I had another look over and left some comments. Could you also update the 5.0 upgrade guide with those changes in this PR?

@favoretti
Copy link
Collaborator Author

image

@favoretti
Copy link
Collaborator Author

FiveOh passes too.

[16:00](⎈|eastus2-fxs-atlas-prod-fxc:ops)➜  hashicorp/terraform-provider-azurerm git:(favoretti/watcher_flow_log) ✗ $ ARM_FIVEPOINTZERO_BETA=1 TF_ACC=1 go test -v ./internal/services/network -timeout=1000m -run='TestAccNetworkWatcher'
=== RUN   TestAccNetworkWatcher
=== RUN   TestAccNetworkWatcher/FlowLog
=== RUN   TestAccNetworkWatcher/FlowLog/basicWithVirtualNetwork
=== RUN   TestAccNetworkWatcher/FlowLog/reenabled
=== RUN   TestAccNetworkWatcher/FlowLog/updateStorageAccount
=== RUN   TestAccNetworkWatcher/FlowLog/version
=== RUN   TestAccNetworkWatcher/FlowLog/tags
=== RUN   TestAccNetworkWatcher/FlowLog/basic
=== RUN   TestAccNetworkWatcher/FlowLog/requiresImport
=== RUN   TestAccNetworkWatcher/FlowLog/disabled
=== RUN   TestAccNetworkWatcher/FlowLog/retentionPolicy
=== RUN   TestAccNetworkWatcher/FlowLog/trafficAnalytics
=== RUN   TestAccNetworkWatcher/FlowLog/location
--- PASS: TestAccNetworkWatcher (2103.15s)
    --- PASS: TestAccNetworkWatcher/FlowLog (2103.15s)
        --- PASS: TestAccNetworkWatcher/FlowLog/basicWithVirtualNetwork (164.19s)
        --- PASS: TestAccNetworkWatcher/FlowLog/reenabled (187.64s)
        --- PASS: TestAccNetworkWatcher/FlowLog/updateStorageAccount (249.21s)
        --- PASS: TestAccNetworkWatcher/FlowLog/version (204.24s)
        --- PASS: TestAccNetworkWatcher/FlowLog/tags (186.48s)
        --- PASS: TestAccNetworkWatcher/FlowLog/basic (159.18s)
        --- PASS: TestAccNetworkWatcher/FlowLog/requiresImport (158.30s)
        --- PASS: TestAccNetworkWatcher/FlowLog/disabled (153.47s)
        --- PASS: TestAccNetworkWatcher/FlowLog/retentionPolicy (194.37s)
        --- PASS: TestAccNetworkWatcher/FlowLog/trafficAnalytics (294.19s)
        --- PASS: TestAccNetworkWatcher/FlowLog/location (151.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-azurerm/internal/services/network	2106.173s

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @favoretti LGTM 🚀

@stephybun stephybun merged commit 779f7f1 into hashicorp:main Nov 21, 2024
33 checks passed
@github-actions github-actions bot added this to the v4.11.0 milestone Nov 21, 2024
stephybun added a commit that referenced this pull request Nov 21, 2024
@gguibert
Copy link

Thanks a lot @favoretti , best timing with v4.11.0 , you rock ! 🔥🔥

@favoretti
Copy link
Collaborator Author

@gguibert you are most welcome. Apologies it took me a year to finish, but work takes precedence unfortunately :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for VNet in azurerm_network_watcher_flow_log