Resource: aws_app_cookie_stickiness_policy

Provides an application cookie stickiness policy, which allows an ELB to wed its sticky cookie's expiration to a cookie generated by your application.

Example Usage

resource "aws_elb" "lb" {
  name               = "test-lb"
  availability_zones = ["us-east-1a"]

  listener {
    instance_port     = 8000
    instance_protocol = "http"
    lb_port           = 80
    lb_protocol       = "http"
  }
}

resource "aws_app_cookie_stickiness_policy" "foo" {
  name          = "foo_policy"
  load_balancer = aws_elb.lb.name
  lb_port       = 80
  cookie_name   = "MyAppCookie"
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import application cookie stickiness policies using the ELB name, port, and policy name separated by colons (:). For example:

import {
  to = aws_app_cookie_stickiness_policy.example
  id = "my-elb:80:my-policy"
}

Using terraform import, import application cookie stickiness policies using the ELB name, port, and policy name separated by colons (:). For example:

% terraform import aws_app_cookie_stickiness_policy.example my-elb:80:my-policy