1

How can I disable the default identity_source when deploying an API Gateway Lambda authorizer using Terraform?

resource "aws_api_gateway_authorizer" "authorizer" {
  name                             = "authorizer"
  type                             = "REQUEST"
  rest_api_id                      = "${aws_api_gateway_rest_api.api.id}"
  authorizer_uri                   = "${local.authorizer_invoke_arn}"
  authorizer_result_ttl_in_seconds = 0
}

It seems Terraform uses method.request.header.Authorization as the default for identity_source.

I can go in an remove this manually from the API Gateway console, but I'm not sure how to remove identity source altogether using Terraform.

Rot-man
  • 327
  • 2
  • 9
djfdev
  • 111
  • 2

1 Answers1

1

Considering identity_source is optional it should be possible to pass in an empty string.

The Terraform Provider does not validate the field as hinted by the code

marenkay
  • 321
  • 1
  • 4