azurerm_network_manager_network_group - support for member_type property#30672
azurerm_network_manager_network_group - support for member_type property#30672catriona-m merged 10 commits intohashicorp:mainfrom
azurerm_network_manager_network_group - support for member_type property#30672Conversation
gerrytan
left a comment
There was a problem hiding this comment.
Thanks for the PR. Some additional notes on my review:
- If you do an entire codebase search on
network_manager_network_groupover *test.go files, there are heaps more acctest that should be run. Please run them. Please use TeamCity and paste the link to be sure there are no diff with your local env. Also do consider using the acctest impact detection tool: https://github.com/WodansSon/terraform-terracorder. - I see you bundled a bunch of test with a nested map on network_manager_resource_test.go, wouldn't this make test selection harder? I'm not sure about this pattern.
- Do not close the issue once this PR merges, there is another resource that needs to be dealt with: azurerm_network_manager_static_member.
- The change log needs to be updated: set the GH-00000 placeholder to the correct issue.
| Type: pluginsdk.TypeString, | ||
| Optional: true, | ||
| Default: string(networkgroups.GroupMemberTypeVirtualNetwork), | ||
| ValidateFunc: validation.StringInSlice(networkgroups.PossibleValuesForGroupMemberType(), false), |
There was a problem hiding this comment.
So this does not need ForceNew: true? If that's the case can you please add acctest to cover the update scenario
Thank you for your review!
|
|
Thank you, PR looks good to me except for acctest results in TeamCity. |
| group.Properties.Description = &model.Description | ||
| } | ||
|
|
||
| if model.MemberType != "" { |
There was a problem hiding this comment.
since member_type has a default value, will it be an empty value?
| } | ||
|
|
||
| if metadata.ResourceData.HasChange("member_type") { | ||
| if model.MemberType != "" { |
There was a problem hiding this comment.
since member_type has a default value, will it be an empty value?
|
Hi @ms-zhenhua , Thank you for reviewing this. I've updated the code, could you please check it again? All tests pass except one, which is also failing on the main branch. |
catriona-m
left a comment
There was a problem hiding this comment.
Thanks for opening this @teowa, I left a couple of queries inline, but once those are addressed I can take another look. Thanks!
There was a problem hiding this comment.
I don't think this file should be in here 🤔 does this pr need rebasing?
| type ManagerNetworkGroupResource struct{} | ||
|
|
||
| func testAccNetworkManagerNetworkGroup_basic(t *testing.T) { | ||
| func TestAccNetworkManagerNetworkGroup_basic(t *testing.T) { |
There was a problem hiding this comment.
is there a reason why these test should not be sequential anymore?
There was a problem hiding this comment.
Previously, the at most 1 subscription only allowed a single network manager. Now, it supports multiple network managers with connection or routing types, but still limits to one securityAdmin network manager per subscription. This means we can now run tests with connection and routing network managers in parallel.
|
Hi @catriona-m , thanks for reviewing this! Please take another look. |
|
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. |


Community Note
Description
azurerm_network_manager_network_group- support formember_typepropertyazurerm_network_manager_static_member- now supports using a subnet as the target resourcePR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_network_manager_network_group- support formember_typeproperty [azurerm_network_manager_network_group- support formember_typeproperty #30672]azurerm_network_manager_static_member- now supports using a subnet as the target resource [azurerm_network_manager_network_group- support formember_typeproperty #30672]This is a (please select all that apply):
Related Issue(s)
Fixes #28811
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.