terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

`azurerm_network_watcher_flow_log`: Property changes

Open favoretti opened this issue 1 year ago • 10 comments

Community Note

  • Please vote on this PR by adding a :thumbsup: 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

  • [x] I have followed the guidelines in our Contributing Documentation.
  • [x] I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • [x] I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • [x] 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.
  • [x] 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

  • [x] 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).
  • [x] I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • [x] I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.

Testing

  • [x] 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.

  • azurerm_resource - network_security_group_id is superseded by target_resource_id, allowing for VNet ID to be passed along with NSG ID [GH-26015]

This is a (please select all that apply):

  • [ ] Bug Fix
  • [ ] New Feature (ie adding a service, resource, or data source)
  • [x] 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 avatar May 17 '24 21:05 favoretti

@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 avatar May 28 '24 09:05 favoretti

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

favoretti avatar Jun 17 '24 12:06 favoretti

@favoretti any updates on that request?

michasacuer avatar Jul 15 '24 07:07 michasacuer

@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.

stephybun avatar Jul 31 '24 07:07 stephybun

Oops, completely forgot about this one, so sorry.

I'll pick this up over the weekend

favoretti avatar Aug 01 '24 05:08 favoretti

Bump?

VillageIke avatar Aug 19 '24 13:08 VillageIke

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

Marquis79 avatar Aug 26 '24 13:08 Marquis79

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 avatar Aug 26 '24 13:08 favoretti

@favoretti Can you give me write access to the branch? I can give it a go. Else I'd create a new PR, seems also fine.

Unfortunately to late for 4.0 😭

aristosvo avatar Aug 26 '24 14:08 aristosvo

@favoretti Can you give me write access to the branch? I can give it a go. Else I'd create a new PR, seems also fine.

Unfortunately to late for 4.0 😭

Yeah, I hoped to finish before 4.0... You should have a collab invite to my repo now. Thanks you so much man, really appreciate help here.

favoretti avatar Aug 26 '24 15:08 favoretti

@aristosvo Any news about this request? When will it be available?

Marquis79 avatar Sep 11 '24 14:09 Marquis79

@aristosvo @favoretti Guys, no pressure but now plenty of people wants this, would you have any time to work on it again ?

floryut avatar Nov 06 '24 08:11 floryut

Last time I worked on this there was an error showing up which I didn't know how to correctly fix.

I'll try to find it and post it for clarity

aristosvo avatar Nov 06 '24 08:11 aristosvo

Yes, I confirm the message from @floryut. Thank you @aristosvo @favoretti

gguibert avatar Nov 06 '24 09:11 gguibert

waiting for you to complete my task ^^

cigdemkadakoglu avatar Nov 06 '24 20:11 cigdemkadakoglu

Hola. I got a bit of spare time on my hands, will try to finish this tomorrow.

favoretti avatar Nov 14 '24 00:11 favoretti

image made a single test public, passes

triggering TC next after fixing formatting

favoretti avatar Nov 14 '24 20:11 favoretti

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

favoretti avatar Nov 14 '24 20:11 favoretti

image

favoretti avatar Nov 16 '24 14:11 favoretti

image

favoretti avatar Nov 20 '24 21:11 favoretti

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

favoretti avatar Nov 21 '24 16:11 favoretti

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

gguibert avatar Nov 22 '24 16:11 gguibert

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

favoretti avatar Nov 22 '24 16:11 favoretti

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Jan 03 '25 02:01 github-actions[bot]