terraform-provider-aws: aws_apigatewayv2_stage failing to update when no changes

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave “+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.24
+ provider.archive v1.3.0
+ provider.aws v2.58.0
+ provider.random v2.2.1
+ provider.template v2.1.2

Affected Resource(s)

aws_apigatewayv2_stage

Terraform Configuration Files

resource "aws_apigatewayv2_stage" "default_stage" {
  api_id      = aws_apigatewayv2_api.api.id
  name        = "$default"
  auto_deploy = true

  tags = {
    Project     = var.project_name
    Environment = var.env
  }
}

Expected Behavior

As no changes have been made to the configuration, terraform shouldn’t be trying to update the stage with new values

Actual Behavior

Apply fails with:

Error: error updating API Gateway v2 stage ($default): BadRequestException: Execution logs are not supported on protocolType HTTP

The plan says:

default_route_settings {
        data_trace_enabled       = false
        detailed_metrics_enabled = false
      + logging_level            = "OFF"
        throttling_burst_limit   = 0
        throttling_rate_limit    = 0
}

(This is running terraform apply immediately after the resources is created without changing the config in between)

If make an aws cli call to get info on the current state of this stage, it shows DefaultRouteSettings as:

"DefaultRouteSettings": {
    "DetailedMetricsEnabled": false
},

with no other settings.

Steps to Reproduce

  1. Add stage to terraform config
  2. terraform apply (resource created fine)
  3. terraform apply (error shows up)

References

  • #9232 (resource introduced)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 67
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Any chance this could get merged?

The fix for this has been merged and will release with version 2.65.0 of the Terraform AWS Provider, expected in this week’s release.

BTW we were testing for WebSocket APIs, not HTTP APIs.