Skip to content

[ENHANCEMENT] Terraform harvester provider to differentiate ipv4 and ipv6 address fields in VM output ip_address #8900

@rrajendran17

Description

@rrajendran17

Is your enhancement request of an existing feature related to a problem? Please describe (👍 if you like this request)

Currently Harvester terraform provider displays the ip address as it is received from the network interface of the vmi status. Reference https://github.com/harvester/terraform-provider-harvester/blob/8fdfd0c498c4f285e7ad631c818d83f02e93b52f/pkg/importer/resource_virtualmachine_importer.go#L169.And does not differentiate between v4 and valid v6 address.

This could be problem in cases if on some guest OSs ipv4 address takes some time to get updated in the vmi but pod interface has a link local ipv6 address which gets updated as ip address of the VM which is incorrect.

Describe the solution you'd like

While updating the "FieldNetworkInterfaceIPAddress" by terraform harvester provider distinguish between ipv4 and ipv6 address and filter out ipv6 address if its just a link local address and not a valid ipv6 address.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Labels

area/terraform-providerHarvester Terraform provider for manage Harvester resourcesarea/vm-networkHarvester VM network including overlay and underlay/Vlankind/enhancementIssues that improve or augment existing functionality

Projects

Status

Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions