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

Missing Data Source for opennebula_virtual_network_address_range #545

Open
shurkys opened this issue May 1, 2024 · 0 comments · May be fixed by #550
Open

Missing Data Source for opennebula_virtual_network_address_range #545

shurkys opened this issue May 1, 2024 · 0 comments · May be fixed by #550

Comments

@shurkys
Copy link

shurkys commented May 1, 2024

Description

Currently, there is no Data Source available to retrieve information about IP address ranges dynamically allocated for networks created through the opennebula_service resource in Terraform. This creates difficulties when there is a need to obtain a list of IP addresses allocated from a specific range.

New or affected resources and data sources

New Data Source: opennebula_virtual_network_address_range

Potential terraform configuration

resource "opennebula_service" "example" {
  # Your configuration code for creating the service
}

data "opennebula_virtual_network" "example" {
  id = opennebula_service.example.networks.example_network
}

# Example usage of the proposed data source
data "opennebula_virtual_network_address_range" "example_range" {
  virtual_network_id = opennebula_virtual_network.example.id
}

# Output example
output "network_address_range_held_ips" {
  value = data.opennebula_virtual_network_address_range.example_range.held_ips
}
output "network_address_range_ip4" {
  value = data.opennebula_virtual_network_address_range.example_range.ip4
}
output "network_address_range_size" {
  value = data.opennebula_virtual_network_address_range.example_range.size
}

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants