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

azure_rm_virtualmachine: add option to choose whether or not to create a network security group #1056

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

akira6592
Copy link
Contributor

SUMMARY

Currently, if network_interface_names is not specified, a network security group is created and attached to a default network interface .

This PR will add option that allow you to choose whether or not to create a network security group. The default value is True, so the network security group is created as before. If False is specified, the network security group will not be created.

This is intended for use cases where network security groups are connected to subnets.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • azure_rm_virtualmachine
ADDITIONAL INFORMATION
n/a

if self.created_nsg:
self.results['actions'].append('Created default security group {0}'.format(self.name + '01'))
group = self.create_default_securitygroup(self.resource_group, self.location, self.name + '01', self.os_type,
self.open_ports)
Copy link
Collaborator

Choose a reason for hiding this comment

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

continuation line under-indented for visual indent

Copy link
Contributor Author

@akira6592 akira6592 Dec 26, 2022

Choose a reason for hiding this comment

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

@Fred-sun thank you for review. I fixed it.

group = self.create_default_securitygroup(self.resource_group, self.location, self.name + '01', self.os_type,
self.open_ports)
parameters.network_security_group = self.network_models.NetworkSecurityGroup(id=group.id,
location=group.location,
Copy link
Collaborator

Choose a reason for hiding this comment

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

2392 and 2393 line continuation line under-indented for visual indent

Copy link
Contributor Author

@akira6592 akira6592 Dec 26, 2022

Choose a reason for hiding this comment

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

@Fred-sun I fixed it, too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

greate

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Dec 26, 2022
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Dec 27, 2022
@akira6592
Copy link
Contributor Author

Is there anything I should do to merge?

@Fred-sun
Copy link
Collaborator

@akira6592 We have recently considered a new release and will consider incorporating this change! Thanks!

@xuzhang3 xuzhang3 merged commit 583fae1 into ansible-collections:dev Mar 30, 2023
@akira6592 akira6592 deleted the nsg-option branch March 30, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants