github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/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": &opsworksLayerTypeAttribute{
    14  				AttrName: "EnableHaproxyStats",
    15  				Type:     schema.TypeBool,
    16  				Default:  true,
    17  			},
    18  			"stats_url": &opsworksLayerTypeAttribute{
    19  				AttrName: "HaproxyStatsUrl",
    20  				Type:     schema.TypeString,
    21  				Default:  "/haproxy?stats",
    22  			},
    23  			"stats_user": &opsworksLayerTypeAttribute{
    24  				AttrName: "HaproxyStatsUser",
    25  				Type:     schema.TypeString,
    26  				Default:  "opsworks",
    27  			},
    28  			"stats_password": &opsworksLayerTypeAttribute{
    29  				AttrName:  "HaproxyStatsPassword",
    30  				Type:      schema.TypeString,
    31  				WriteOnly: true,
    32  				Required:  true,
    33  			},
    34  			"healthcheck_url": &opsworksLayerTypeAttribute{
    35  				AttrName: "HaproxyHealthCheckUrl",
    36  				Type:     schema.TypeString,
    37  				Default:  "/",
    38  			},
    39  			"healthcheck_method": &opsworksLayerTypeAttribute{
    40  				AttrName: "HaproxyHealthCheckMethod",
    41  				Type:     schema.TypeString,
    42  				Default:  "OPTIONS",
    43  			},
    44  		},
    45  	}
    46  
    47  	return layerType.SchemaResource()
    48  }