github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/website/source/docs/providers/aws/r/app_cookie_stickiness_policy.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_app_cookie_stickiness_policy" 4 sidebar_current: "docs-aws-app-cookie-stickiness-policy" 5 description: |- 6 Provides an application cookie stickiness policy, which allows an ELB to wed its stickiness cookie to a cookie generated by your application. 7 --- 8 9 # aws\_app\_cookie\_stickiness\_policy 10 11 Provides an application cookie stickiness policy, which allows an ELB to wed its sticky cookie's expiration to a cookie generated by your application. 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_app_cookie_stickiness_policy" "foo" { 28 name = "foo_policy" 29 load_balancer = "${aws_elb.lb}" 30 lb_port = 80 31 cookie_name = "MyAppCookie" 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_name` - (Required) The application cookie whose lifetime the ELB's cookie should follow. 46 47 ## Attributes Reference 48 49 The following attributes are exported: 50 51 * `id` - The ID of the policy. 52 * `name` - The name of the stickiness policy. 53 * `load_balancer` - The load balancer to which the policy is attached. 54 * `lb_port` - The load balancer port to which the policy is applied. 55 * `cookie_name` - The application cookie whose lifetime the ELB's cookie should follow.