AWS API Gateway: Is it possible to have a single stage with CloudWatch metrics and Access logging?

Terraform version:

Terraform v0.12.13
+ provider.aws v2.34.0

I want to be able to enable settings for CloudWatch access logging and metrics for a single stage (called “dev”) using the two circled sections below:

In Terraform this would look like this (irrelevant resources omitted):

# This is to enable access log settings
resource "aws_api_gateway_stage" "myapi" {
  depends_on = [aws_cloudwatch_log_group.myapi]

  stage_name    = "dev"
  rest_api_id   = "${aws_api_gateway_rest_api.myapi.id}"
  deployment_id = "${aws_api_gateway_deployment.myapi.id}"

  access_log_settings {
    destination_arn = "${aws_cloudwatch_log_group.myapi.arn}"
    format          = "*long formatting string in json or whatever*"
  }
}

resource "aws_api_gateway_deployment" "myapi" {
  depends_on = [
    aws_api_gateway_method.mymethod,
    aws_api_gateway_integration.mymethod,
  ]
  rest_api_id = aws_api_gateway_rest_api.myapi.id
  stage_name  = "dev"
}

# This is for metric settings
resource "aws_api_gateway_method_settings" "myapi" {
  rest_api_id = "${aws_api_gateway_rest_api.myapi.id}"
  stage_name  = "dev"
  method_path = "*/*"

  settings {
    # Enable CloudWatch logging and metrics
    logging_level          = "INFO"
    data_trace_enabled     = true
    metrics_enabled        = true
  }
}

However this causes a conflict as the aws_api_gateway_deployment conflicts with the aws_api_gateway_stage which are both referring to the same stage name “dev”. Previous threads have worked around this problem by leaving the stage name blank on the aws_api_gateway_deployment block, however this is no longer possible.

The only way to get around this at the moment is to remove the aws_api_gateway_stage and resort to enabling the access logging manually.