-
Notifications
You must be signed in to change notification settings - Fork 454
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
feat: vmware_distributed_virtual_switch_pvlan_mapping resource #2291
feat: vmware_distributed_virtual_switch_pvlan_mapping resource #2291
Conversation
d36096e
to
98b5324
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r/distributed_virtual_switch already contains an optional property pvlan_mapping
.
Can you explain why you need a separate resource that achieves the same result?
And more importantly - how does the new resource interact and/or conflict with the existing property?
Hi @spacegospod, thank you for the review. The reasoning and logic behind the utility of the extra resource is as follows. In some (most?) vSphere environments, there will be a limited number of Distributed Virtual Switch objects, usually just one. Regardless the number of DVSwitches is limited by the number of physical uplink ports on each host. Therefore DVSwitches are often shared between projects. However, when each project is its own Terraform root, this poses a challenge of how to define and create the PVLAN mappings each project requires. Take, for example, a Terraform root that deploys a number of web servers all on a community, and a load balancer on promiscuous. With the current state of the module, that code would look something like this (pseudocode of course):
Notice how the 'networking' project which 'owns' the DVSwitch has to know about all of the mappings, if I were to add another webserver I would have to go back to the networking project and add the mappings there. With this new resource the code would look more like:
With this design, when an additional webserver project is created, it's not necessary to make any updates to the 'networking' project. Regarding interoperability, a flag already exists on the DVSwitch object called I hope that makes sense but let me know if I can clarify any further |
This actually makes sense, thank you |
06e2261
to
332d8be
Compare
332d8be
to
555d09b
Compare
Thanks all! My first ever proper open source contribution is complete 😎 |
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 issues. 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. |
Description
Implements #2262 to add a standalone resource for a single PVLAN mapping on a distributed virtual switch, similar in concept to the 'aws_security_group_rule' resource in the AWS provider
Acceptance tests
Output from acceptance testing:
Release Note
Release note for CHANGELOG:
References
Closes #2262