0
votes

I'm trying to create an Application Load Balancer ALB with authentication rule in AWS with terraform but Terraform doesn't recognizable the type "authenticate-oidc".

https://www.terraform.io/docs/providers/aws/r/lb.html https://www.terraform.io/docs/providers/aws/r/lb_listener.html#default_action

I tried different code combinations and even with Terraform v0.11.15-oci but same issue.

Current Terraform version 0.11.14

  resource "aws_alb_listener" "control_center" {
  load_balancer_arn = "${aws_alb.control_center.id}"
  port              = 443
  protocol          = "HTTPS"
  ssl_policy        = "ELBSecurityPolicy-2016-08"
  certificate_arn   = "${aws_acm_certificate.mymessagng.arn}"

  default_action {
    type = "authenticate-oidc"
    authenticate_oidc {
      authorization_endpoint = ""
      client_id = ""
      client_secret = ""
      issuer = ""
      token_endpoint = ""
      user_info_endpoint = ""
    }
  }
Error: module.control-center.aws_alb_listener.control_center: "default_action.0.target_group_arn": required field is not set



Error: module.control-center.aws_alb_listener.control_center: default_action.0: invalid or unknown key: authenticate_oidc



Error: module.control-center.aws_alb_listener.control_center: expected default_action.0.type to be one of [forward], got authenticate-oidc

1

1 Answers

0
votes

I just realized that my terraform providers are

  • terraform-provider-aws_v1.27.0_x4
  • terraform-provider-template_v1.0.0_x4

but looks the support of Cognito and OIDC authentication is being introduce on 1.40.0v

https://github.com/terraform-providers/terraform-provider-aws/blob/master/CHANGELOG.md#1400-october-10-2018