github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  ```hcl
    16  resource "aws_elb" "lb" {
    17    name               = "test-lb"
    18    availability_zones = ["us-east-1a"]
    19  
    20    listener {
    21      instance_port     = 8000
    22      instance_protocol = "http"
    23      lb_port           = 80
    24      lb_protocol       = "http"
    25    }
    26  }
    27  
    28  resource "aws_lb_cookie_stickiness_policy" "foo" {
    29    name                     = "foo-policy"
    30    load_balancer            = "${aws_elb.lb.id}"
    31    lb_port                  = 80
    32    cookie_expiration_period = 600
    33  }
    34  ```
    35  
    36  ## Argument Reference
    37  
    38  The following arguments are supported:
    39  
    40  * `name` - (Required) The name of the stickiness policy.
    41  * `load_balancer` - (Required) The load balancer to which the policy
    42    should be attached.
    43  * `lb_port` - (Required) The load balancer port to which the policy
    44    should be applied. This must be an active listener on the load
    45  balancer.
    46  * `cookie_expiration_period` - (Optional) The time period after which
    47    the session cookie should be considered stale, expressed in seconds.
    48  
    49  ## Attributes Reference
    50  
    51  The following attributes are exported:
    52  
    53  * `id` - The ID of the policy.
    54  * `name` - The name of the stickiness policy.
    55  * `load_balancer` - The load balancer to which the policy is attached.
    56  * `lb_port` - The load balancer port to which the policy is applied.
    57  * `cookie_expiration_period` - The time period after which the session cookie is considered stale, expressed in seconds.