Skip to content

Commit

Permalink
cognito
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunmenon95 committed Jul 25, 2024
1 parent 8b6155f commit 30c95b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fargate-v2.cfhighlander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fargate-v2.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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, {})
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 30c95b6

Please sign in to comment.