CirclesUBI / infrastructure-provisioning

Infrastructure and Services for Circles
GNU Affero General Public License v3.0
5 stars 2 forks source link

Authenticate Cognito at the ALB level? #45

Open edzillion opened 5 years ago

edzillion commented 5 years ago

From here: https://www.terraform.io/docs/providers/aws/r/lb_listener_rule.html

resource "aws_lb_listener_rule" "admin" {
  listener_arn = "${aws_lb_listener.front_end.arn}"

  action {
    type = "authenticate-cognito"

    authenticate_cognito {
      user_pool_arn       = "${aws_cognito_user_pool.pool.arn}"
      user_pool_client_id = "${aws_cognito_user_pool_client.client.id}"
      user_pool_domain    = "${aws_cognito_user_pool_domain.domain.domain}"
    }
  }

  action {
    type             = "forward"
    target_group_arn = "${aws_lb_target_group.static.arn}"
  }