From b44847f060c2be6d7c8bc020fcee307adcc91abf Mon Sep 17 00:00:00 2001 From: Drew Mudgett Date: Fri, 16 Aug 2024 11:52:24 -0400 Subject: [PATCH] Fixed typos in stickiness config Signed-off-by: Drew Mudgett Signed-off-by: Drew Mudgett --- aws/cf.go | 4 ++-- aws/cf_template.go | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/aws/cf.go b/aws/cf.go index 327cb05..7a2ce52 100644 --- a/aws/cf.go +++ b/aws/cf.go @@ -232,7 +232,7 @@ func createStack(svc cloudformationiface.CloudFormationAPI, spec *stackSpec) (st cfParam(parameterIpAddressTypeParameter, spec.ipAddressType), cfParam(parameterLoadBalancerTypeParameter, spec.loadbalancerType), cfParam(parameterHTTP2Parameter, fmt.Sprintf("%t", spec.http2)), - cfParam(parameterStickinessParameter, spec.stickiness), + cfParam(parameterStickinessParameter, fmt.Sprintf("%t", spec.stickiness)), }, Tags: tagMapToCloudformationTags(tags), TemplateBody: aws.String(template), @@ -308,7 +308,7 @@ func updateStack(svc cloudformationiface.CloudFormationAPI, spec *stackSpec) (st cfParam(parameterIpAddressTypeParameter, spec.ipAddressType), cfParam(parameterLoadBalancerTypeParameter, spec.loadbalancerType), cfParam(parameterHTTP2Parameter, fmt.Sprintf("%t", spec.http2)), - cfParam(parameterStickinessParameter, spec.stickiness), + cfParam(parameterStickinessParameter, fmt.Sprintf("%t", spec.stickiness)), }, Tags: tagMapToCloudformationTags(tags), TemplateBody: aws.String(template), diff --git a/aws/cf_template.go b/aws/cf_template.go index 7114000..a0eacec 100644 --- a/aws/cf_template.go +++ b/aws/cf_template.go @@ -175,9 +175,11 @@ func generateTemplate(spec *stackSpec) (string, error) { { Type: cloudformation.String("forward"), TargetGroupArn: cloudformation.Ref(httpTargetGroupName).String(), - TargetGroupStickinessConfig: &cloudformation.ElasticLoadBalancingV2ListenerTargetGroupStickinessConfig{ - Enabled: cloudformation.Ref(parameterStickinessParameter).String(), - DurationSeconds: cloudformation.Integer(3600) + ForwardConfig: &cloudformation.ElasticLoadBalancingV2ListenerForwardConfig{ + TargetGroupStickinessConfig: &cloudformation.ElasticLoadBalancingV2ListenerTargetGroupStickinessConfig{ + Enabled: cloudformation.Ref(parameterStickinessParameter).Bool(), + DurationSeconds: cloudformation.Integer(3600), + }, }, }, },