package pfw

import (
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/compute"
)

func flattenPFW(d *schema.ResourceData, pfw *compute.ItemPFW) {
	d.Set("compute_id", pfw.VMID)
	d.Set("public_port_start", pfw.PublicPortStart)
	d.Set("public_port_end", pfw.PublicPortEnd)
	d.Set("local_ip", pfw.LocalIP)
	d.Set("local_base_port", pfw.LocalPort)
	d.Set("proto", pfw.Protocol)
}
