mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
|
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": &opsworksLayerTypeAttribute{
|
||
|
AttrName: "EnableHaproxyStats",
|
||
|
Type: schema.TypeBool,
|
||
|
Default: true,
|
||
|
},
|
||
|
"stats_url": &opsworksLayerTypeAttribute{
|
||
|
AttrName: "HaproxyStatsUrl",
|
||
|
Type: schema.TypeString,
|
||
|
Default: "/haproxy?stats",
|
||
|
},
|
||
|
"stats_user": &opsworksLayerTypeAttribute{
|
||
|
AttrName: "HaproxyStatsUser",
|
||
|
Type: schema.TypeString,
|
||
|
Default: "opsworks",
|
||
|
},
|
||
|
"stats_password": &opsworksLayerTypeAttribute{
|
||
|
AttrName: "HaproxyStatsPassword",
|
||
|
Type: schema.TypeString,
|
||
|
WriteOnly: true,
|
||
|
Required: true,
|
||
|
},
|
||
|
"healthcheck_url": &opsworksLayerTypeAttribute{
|
||
|
AttrName: "HaproxyHealthCheckUrl",
|
||
|
Type: schema.TypeString,
|
||
|
Default: "/",
|
||
|
},
|
||
|
"healthcheck_method": &opsworksLayerTypeAttribute{
|
||
|
AttrName: "HaproxyHealthCheckMethod",
|
||
|
Type: schema.TypeString,
|
||
|
Default: "OPTIONS",
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
return layerType.SchemaResource()
|
||
|
}
|