package schemas

import (
	"github.com/hashicorp/terraform-plugin-framework/resource/schema"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
)

func MakeSchemaResourceLBFrontendBind() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		"lb_id": schema.Int64Attribute{
			Required: true,
		},
		"frontend_name": schema.StringAttribute{
			Required: true,
		},
		"address": schema.StringAttribute{
			Required: true,
		},
		"guid": schema.StringAttribute{
			Computed: true,
		},
		"name": schema.StringAttribute{
			Required: true,
		},
		"port": schema.Int64Attribute{
			Required: true,
		},
		"id": schema.StringAttribute{
			Computed: true,
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.UseStateForUnknown(),
			},
		},
	}
}
