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

Added network_interfaces property to virtual machine data source #1274

Merged
merged 4 commits into from
May 11, 2021

Conversation

brian57860
Copy link
Contributor

Description

Added 'network_interfaces' to the virtual machine data source.

Returns information about each of the network interfaces on a virtual machine or template and is useful when performing a linked clone, specifically when the source has more than one network interface.

This feature supports the use of dynamic blocks to iterate over the available network interfaces identified in the data source:

dynamic "network_interface" {
    for_each = data.vsphere_virtual_machine.source.network_interfaces
    content {
        network_id = network_interface.value.network_id
        adapter_type = network_interface.value.adapter_type
        use_static_mac = true
        mac_address = network_interface.value.mac_address
        bandwidth_limit = network_interface.value.bandwidth_limit
        bandwidth_reservation = network_interface.value.bandwidth_reservation
        bandwidth_share_count = network_interface.value.bandwidth_share_count
        bandwidth_share_level = network_interface.value.bandwidth_share_level            
    }
}

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

@ghost ghost added size/l Relative Sizing: Large documentation Type: Documentation labels Dec 9, 2020
@hashicorp-cla
Copy link

hashicorp-cla commented Dec 9, 2020

CLA assistant check
All committers have signed the CLA.

@brian57860 brian57860 changed the title Feature/data source vm Added network_interfaces property to virtual machine data source Dec 9, 2020
Copy link
Contributor

@koikonom koikonom left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for updating the tests too.

@koikonom koikonom merged commit f755db8 into hashicorp:master May 11, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Type: Documentation size/l Relative Sizing: Large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants