github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/aws/r/lb_cookie_stickiness_policy.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_lb_cookie_stickiness_policy"
     4  sidebar_current: "docs-aws-resource-lb-cookie-stickiness-policy"
     5  description: |-
     6    Provides a load balancer cookie stickiness policy, which allows an ELB to control the sticky session lifetime of the browser.
     7  ---
     8  
     9  # aws\_lb\_cookie\_stickiness\_policy
    10  
    11  Provides a load balancer cookie stickiness policy, which allows an ELB to control the sticky session lifetime of the browser.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_elb" "lb" {
    17      name = "test-lb"
    18  	  availability_zones = ["us-east-1a"]
    19  	  listener {
    20  	      instance_port = 8000
    21  		    instance_protocol = "http"
    22  		    lb_port = 80
    23  		    lb_protocol = "http"
    24  	  }
    25  }
    26  
    27  resource "aws_lb_cookie_stickiness_policy" "foo" {
    28  	  name = "foo_policy"
    29  	  load_balancer = "${aws_elb.lb.id}"
    30  	  lb_port = 80
    31  	  cookie_expiration_period = 600
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `name` - (Required) The name of the stickiness policy.
    40  * `load_balancer` - (Required) The load balancer to which the policy
    41    should be attached.
    42  * `lb_port` - (Required) The load balancer port to which the policy
    43    should be applied. This must be an active listener on the load
    44  balancer.
    45  * `cookie_expiration_period` - (Optional) The time period after which
    46    the session cookie should be considered stale, expressed in seconds.
    47  
    48  ## Attributes Reference
    49  
    50  The following attributes are exported:
    51  
    52  * `id` - The ID of the policy.
    53  * `name` - The name of the stickiness policy.
    54  * `load_balancer` - The load balancer to which the policy is attached.
    55  * `lb_port` - The load balancer port to which the policy is applied.
    56  * `cookie_expiration_period` - The time period after which the session cookie is considered stale, expressed in seconds.