hashicorp / hashicorp/packer-plugin-azure
Add support for specifying optional network_security_group_name in Packer Azure ARM configuration
- Dominant language
- Go
- Stars
- 63
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
#### Community Note
Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
#### Description
Add support for specifying optional `network_security_group_name` in the Packer Azure ARM configuration. This enhancement will allow users to specify these components if they have a pre-existing Network Security Group in their Azure environment.
#### Use Case(s)
- Allow an already created Azure Network Security Group (`network_security_group_name`) in the user’s Azure Cloud to be used by the temporary Network Interface Packer will create.
#### Potential configuration
Add the following fields to the `Config` struct in `config.go`:
```
type Config struct {
// Existing fields...
// Name of the network security group to use.
NetworkSecurityGroupName string `mapstructure:"network_security_group_name" required:"false"`
}
```
#### Potential References
- Update [template-factory.go](https://github.com/hashicorp/packer-plugin-azure/blob/main/builder/azure/arm/template_factory.go#L132) and relevant functions to incorporate the new field `network_security_group_name`. This may involve modifying how the ARM template is generated and ensuring that these values are correctly referenced and used during the deployment process.
- Update [resource_resolver.go](https://github.com/hashicorp/packer-plugin-azure/blob/main/builder/azure/arm/resource_resolver.go#L36) and relevant functions to validate that the provided `network_security_group_name` exists in the provided Azure Cloud.
Contributor guide
Research direction
Start with the Config struct in config.go, then read the referenced paths in template-factory.go and resource_resolver.go to trace how ARM templates and Azure resources are handled. Done means an optional network_security_group_name can be configured, used for the temporary network interface, and validated against the provided Azure environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100