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

running the latest 1.20.1 provider and it doesn't support cookie type session affinity for ibm_lbaas #2218

Closed
texkelly opened this issue Feb 1, 2021 · 2 comments

Comments

@texkelly
Copy link

texkelly commented Feb 1, 2021

Hi - running the latest 1.20.1 provider and it still doesn't support cookie type session affinity in ibm_lbaas resource, which we require.

[07:49:05 UTC] -> terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Error: "protocols.0.session_stickiness" must contain a value from []string{"SOURCE_IP"}, got "cookie"

on clb.tf line 1, in resource "ibm_lbaas" "clb":
1: resource "ibm_lbaas" "clb" {

[08:01:26 UTC] -> cat clb.tf
resource "ibm_lbaas" "clb" {
name = "${var.customer_url}-clb"
description = "Terraform generated CLB for ${var.customer_url}"
subnets = [ibm_compute_vm_instance.app[0].private_subnet_id]
protocols {
frontend_protocol = "HTTPS"
frontend_port = 443
backend_protocol = "HTTPS"
backend_port = 443
load_balancing_method = "weighted_round_robin"
tls_certificate_id = var.ssl_certificate_id
session_stickiness = "cookie"
}
depends_on = [ibm_compute_vm_instance.app[0]]
}

resource "ibm_lbaas_server_instance_attachment" "clb_member1" {
private_ip_address = ibm_compute_vm_instance.app[0].ipv4_address_private
weight = 100
lbaas_id = ibm_lbaas.clb.id
depends_on = [ibm_lbaas.clb]
}

resource "ibm_lbaas_server_instance_attachment" "clb_member2" {
private_ip_address = ibm_compute_vm_instance.app[1].ipv4_address_private
weight = 1
lbaas_id = ibm_lbaas.clb.id
depends_on = [ibm_lbaas.clb]
}

resource "ibm_lbaas_health_monitor" "clb_hm" {
protocol = ibm_lbaas.clb.health_monitors[0].protocol
port = ibm_lbaas.clb.health_monitors[0].port
timeout = 2
interval = 5
max_retries = 2
url_path = "/ibm_security_logout"
lbaas_id = ibm_lbaas.clb.id
monitor_id = ibm_lbaas.clb.health_monitors[0].monitor_id
depends_on = [ibm_lbaas.clb,ibm_lbaas_server_instance_attachment.clb_member1,ibm_lbaas_server_instance_attachment.clb_member2]
}

@texkelly
Copy link
Author

texkelly commented Feb 4, 2021

Should be "HTTP_COOKIE" - still doesn't work tho:
[00:40:17 UTC] -> cat ../../../logs/tririga_small_prod-110_plan.log
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.ibm_compute_ssh_key.automation: Refreshing state...


Error: "protocols.0.session_stickiness" must contain a value from []string{"SOURCE_IP"}, got "HTTP_COOKIE"

on clb.tf line 1, in resource "ibm_lbaas" "clb":
1: resource "ibm_lbaas" "clb" {

root@x00921 [tri-automate-wdc04-5.cds.tririga.com]:/automation/awx-data/deployments/tridemo/tririga_small_prod-110
[00:40:34 UTC] -> cat clb.tf
resource "ibm_lbaas" "clb" {
name = "${var.customer_url}-clb"
description = "Terraform generated CLB for ${var.customer_url}"
subnets = [ibm_compute_vm_instance.app[0].private_subnet_id]
protocols {
frontend_protocol = "HTTPS"
frontend_port = 443
backend_protocol = "HTTPS"
backend_port = 443
load_balancing_method = "weighted_round_robin"
tls_certificate_id = var.ssl_certificate_id
#session_stickiness = "SOURCE_IP"
session_stickiness = "HTTP_COOKIE"
}
ssl_ciphers = [
"AES128-GCM-SHA256",
"AES256-GCM-SHA384",
"AES256-SHA256",
"ECDHE-RSA-AES128-GCM-SHA256",
"ECDHE-RSA-AES256-GCM-SHA384",
"ECDHE-RSA-AES256-SHA384",
]
depends_on = [ibm_compute_vm_instance.app[0]]
}

resource "ibm_lbaas_server_instance_attachment" "clb_member1" {
private_ip_address = ibm_compute_vm_instance.app[0].ipv4_address_private
weight = 100
lbaas_id = ibm_lbaas.clb.id
depends_on = [ibm_lbaas.clb]
}

resource "ibm_lbaas_server_instance_attachment" "clb_member2" {
private_ip_address = ibm_compute_vm_instance.app[1].ipv4_address_private
weight = 1
lbaas_id = ibm_lbaas.clb.id
depends_on = [ibm_lbaas.clb]
}

resource "ibm_lbaas_health_monitor" "clb_hm" {
protocol = ibm_lbaas.clb.health_monitors[0].protocol
port = ibm_lbaas.clb.health_monitors[0].port
timeout = 2
interval = 5
max_retries = 2
url_path = "/ibm_security_logout"
lbaas_id = ibm_lbaas.clb.id
monitor_id = ibm_lbaas.clb.health_monitors[0].monitor_id
depends_on = [ibm_lbaas.clb,ibm_lbaas_server_instance_attachment.clb_member1,ibm_lbaas_server_instance_attachment.clb_member2]
}

hkantare added a commit to hkantare/terraform-provider-ibm that referenced this issue Feb 5, 2021
hkantare added a commit that referenced this issue Feb 5, 2021
@kavya498
Copy link
Collaborator

Available in 1.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants