github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/aws/resource_aws_opsworks_haproxy_layer.go (about) 1 package aws 2 3 import ( 4 "github.com/hashicorp/terraform/helper/schema" 5 ) 6 7 func resourceAwsOpsworksHaproxyLayer() *schema.Resource { 8 layerType := &opsworksLayerType{ 9 TypeName: "lb", 10 DefaultLayerName: "HAProxy", 11 12 Attributes: map[string]*opsworksLayerTypeAttribute{ 13 "stats_enabled": { 14 AttrName: "EnableHaproxyStats", 15 Type: schema.TypeBool, 16 Default: true, 17 }, 18 "stats_url": { 19 AttrName: "HaproxyStatsUrl", 20 Type: schema.TypeString, 21 Default: "/haproxy?stats", 22 }, 23 "stats_user": { 24 AttrName: "HaproxyStatsUser", 25 Type: schema.TypeString, 26 Default: "opsworks", 27 }, 28 "stats_password": { 29 AttrName: "HaproxyStatsPassword", 30 Type: schema.TypeString, 31 WriteOnly: true, 32 Required: true, 33 }, 34 "healthcheck_url": { 35 AttrName: "HaproxyHealthCheckUrl", 36 Type: schema.TypeString, 37 Default: "/", 38 }, 39 "healthcheck_method": { 40 AttrName: "HaproxyHealthCheckMethod", 41 Type: schema.TypeString, 42 Default: "OPTIONS", 43 }, 44 }, 45 } 46 47 return layerType.SchemaResource() 48 }