Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elb stickiness, not setting sticky policy on ELB #349

Closed
hashibot opened this issue Jun 13, 2017 · 5 comments
Closed

elb stickiness, not setting sticky policy on ELB #349

hashibot opened this issue Jun 13, 2017 · 5 comments
Labels
bug Addresses a defect in current functionality. service/elb Issues and PRs that pertain to the elb service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@hashibot
Copy link

This issue was originally opened by @toetag-yim as hashicorp/terraform#9867. It was migrated here as part of the provider split. The original body of the issue is below.


terraform 0.7.7

resource "aws_app_cookie_stickiness_policy" "ol-stickiness" {
    name = "${module.ol_elb.elb_name}-sticky-policy"
    load_balancer = "${module.ol_elb.elb_id}"
    lb_port = 443
    cookie_name = "Some_Cookie_Name"
}
----------------------------------------------------------------------
**Plan:**
+ aws_app_cookie_stickiness_policy.ol-stickiness
    cookie_name:   "Some_Cookie_Name"
    lb_port:       "443"
    load_balancer: "${module.ol_elb.elb_id}"
    name:          "test-ol-elb-sticky-policy"
----------------------------------------------------------------------
**Apply:**
aws_app_cookie_stickiness_policy.ol-stickiness: Creating...
  cookie_name:   "" => "Some_Cookie_Name"
  lb_port:       "" => "443"
  load_balancer: "" => "test-ol-elb"
  name:          "" => "test-ol-elb-sticky-policy"

aws_app_cookie_stickiness_policy.ol-stickiness: Creation complete
----------------------------------------------------------------------

Expected behavior: create a sticky policy and set it on the expected ELB. view from AWS Console

Port Configuration:
443 (HTTPS, IAM Certificate: certtest) forwarding to 8443 (HTTPS)
Backend Authentication: Disabled
Stickiness: AppCookieStickinessPolicy, cookieName='Some_Cookie_Name'

Actual behavior: creates a sticky policy, i have to manually attach the policy through AWS Cli after the build. view from AWS Console.

Port Configuration:
443 (HTTPS, IAM Certificate: certtest) forwarding to 8443 (HTTPS)
Backend Authentication: Disabled
Stickiness: Disabled

Work Around:
aws elb set-load-balancer-policies-of-listener --region us-east-1 --load-balancer-name test-ol-elb --load-balancer-port 443 --policy-names test-ol-elb-sticky-policy

Notes: I could be missing something with this resource's usage but i have been googling/researching for two days now and have yet to find a way to "set-load-balancer-policies-of-listener" with terraform thus far.

sticky mentioned here: hashicorp/terraform#656
@phinze

@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@radeksimko radeksimko added the service/elb Issues and PRs that pertain to the elb service. label Jan 25, 2018
@mgresko
Copy link

mgresko commented Feb 1, 2018

I am seeing issue where a sticky policy overwrites the defined aws_lb_ssl_negotiation_policy and a aws_lb_ssl_negotiation_policy will overwrite a aws_app_cookie_stickiness_policy. Which ever runs last wins. If I apply the aws_lb_ssl_negotiation_policy with TF and then apply the sticky settings to ELB through console it works fine.

@avengers009
Copy link

its working for me, must be an issue with calling module. As you are calling LB name from module, this reason for this issue is different.

example usage:

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

documentation: https://www.terraform.io/docs/providers/aws/r/app_cookie_stickiness_policy.html

@mildwonkey
Copy link
Contributor

Hi @toetag-yim,

Sorry for the late reply!
Is this still an issue you are experiencing? If so, could you share more of the configuration that you tried, such as the module?

@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Jun 11, 2020
@ghost
Copy link

ghost commented Aug 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/elb Issues and PRs that pertain to the elb service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

5 participants