package aws
import (
"github.com/hashicorp/terraform/helper/schema"
)
func resourceAwsOpsworksHaproxyLayer() *schema.Resource {
layerType := &opsworksLayerType{
TypeName: "lb",
DefaultLayerName: "HAProxy",
Attributes: map[string]*opsworksLayerTypeAttribute{
"stats_enabled": {
AttrName: "EnableHaproxyStats",
Type: schema.TypeBool,
Default: true,
},
"stats_url": {
AttrName: "HaproxyStatsUrl",
Type: schema.TypeString,
Default: "/haproxy?stats",
"stats_user": {
AttrName: "HaproxyStatsUser",
Default: "opsworks",
"stats_password": {
AttrName: "HaproxyStatsPassword",
WriteOnly: true,
Required: true,
"healthcheck_url": {
AttrName: "HaproxyHealthCheckUrl",
Default: "/",
"healthcheck_method": {
AttrName: "HaproxyHealthCheckMethod",
Default: "OPTIONS",
}
return layerType.SchemaResource()