diff --git a/fargate-v2.cfhighlander.rb b/fargate-v2.cfhighlander.rb index d9d5328..c270e0d 100644 --- a/fargate-v2.cfhighlander.rb +++ b/fargate-v2.cfhighlander.rb @@ -12,9 +12,9 @@ ComponentParam 'SubnetIds', type: 'CommaDelimitedList' ComponentParam 'EcsCluster' - ComponentParam 'UserPoolId', '' - ComponentParam 'UserPoolClientId', '' - ComponentParam 'UserPoolDomainName', '' + ComponentParam 'FargateUserPoolId', '' + ComponentParam 'FargateUserPoolClientId', '' + ComponentParam 'FargateUserPoolDomainName', '' if defined? targetgroup ComponentParam 'DnsDomain', isGlobal: true diff --git a/fargate-v2.cfndsl.rb b/fargate-v2.cfndsl.rb index 4629775..9710df5 100644 --- a/fargate-v2.cfndsl.rb +++ b/fargate-v2.cfndsl.rb @@ -39,7 +39,7 @@ end end - Condition(:EnableCognito, FnNot(FnEquals(Ref(:UserPoolClientId), ''))) + Condition(:EnableCognito, FnNot(FnEquals(Ref(:FargateUserPoolClientId), ''))) service_loadbalancer = [] targetgroups = external_parameters.fetch(:targetgroup, {}) @@ -134,7 +134,7 @@ end actions = [{ Type: "forward", Order: 5000, TargetGroupArn: Ref(targetgroup['resource_name'])}] - actions_with_cognito = actions + [cognito(Ref(:UserPoolId), Ref(:UserPoolClientId), Ref(:UserPoolDomainName))] + actions_with_cognito = actions + [cognito(Ref(:FargateUserPoolId), Ref(:FargateUserPoolClientId), Ref(:FargateUserPoolDomainName))] ElasticLoadBalancingV2_ListenerRule(rule_name) do Actions FnIf(:EnableCognito, actions_with_cognito, actions)