Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot update EventBridge Pipe in place when source is DynamoDB Stream #32423

Closed
sweetcoco opened this issue Jul 7, 2023 · 11 comments · Fixed by #32622 or #34487
Closed

[Bug]: Cannot update EventBridge Pipe in place when source is DynamoDB Stream #32423

sweetcoco opened this issue Jul 7, 2023 · 11 comments · Fixed by #32622 or #34487
Assignees
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/pipes Issues and PRs that pertain to the pipes service.
Milestone

Comments

@sweetcoco
Copy link

sweetcoco commented Jul 7, 2023

Terraform Core Version

v1.5.2

AWS Provider Version

5.6.2

Affected Resource(s)

aws_pipes_pipe

Expected Behavior

You should be able to update a Pipe in place

Actual Behavior

Any change to a pipe, including tags, that requires an "update in-place" action results in an error.

Relevant Error/Panic Output Snippet

aws_pipes_pipe.dynamodb_stream_pipe: Modifying... [id=my-ddbstream-pipe]
╷
│ Error: updating Amazon EventBridge Pipes Pipe (my-ddbstream-pipe): operation error Pipes: UpdatePipe, https response error StatusCode: 400, RequestID: 8342d00c-730e-434a-8b33-f0e6b23535fb, ValidationException: [numeric instance is lower than the required minimum (minimum: 1, found: 0)]

Terraform Configuration Files

resource "aws_pipes_pipe" "dynamo_stream_pipe" {
  depends_on    = [aws_iam_role_policy.dynamodb_pipe_source, aws_iam_role_policy.sqs_pipe_target]
  name          = "${aws_dynamodb_table.table.name}-pipe"
  role_arn      = aws_iam_role.pipe_role.arn
  source        = aws_dynamodb_table.table.stream_arn
  target        = aws_sqs_queue.ddbstream_queue.arn
  desired_state = "RUNNING"
  tags = {
    "Name"        = "${aws_dynamodb_table.table.name}-pipe"
    "Description" = "this is a description"
  }

  source_parameters {
    dynamodb_stream_parameters {
      batch_size        = 1
      starting_position = "LATEST"
    }
    filter_criteria {
      filter {
        pattern = jsonencode({
          eventName : ["INSERT"]
        })
      }
    }
  }
  target_parameters {}
}

Steps to Reproduce

  1. create an aws_dynamodb_table
  2. create an aws_pipes_pipe attached the table's stream
  3. terraform apply
  4. update anything about the pipe, even a tag
  5. terraform apply
  6. see error

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@sweetcoco sweetcoco added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jul 7, 2023
@github-actions github-actions bot added the service/pipes Issues and PRs that pertain to the pipes service. label Jul 7, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@justinretzolk
Copy link
Member

Hey @sweetcoco 👋 Thank you for taking the time to raise this! So that we have the necessary information in order to look into this, can you supply debug logs (redacted as needed) as well?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 10, 2023
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 10, 2023
@gurudatta-carbon
Copy link

gurudatta-carbon commented Jul 13, 2023

getting same error, with kinesis as source, http api destination as target
Note: to replicate issue, change anything in target_parameters.

AWS Provider Version: 5.7.0

error:
│ Error: updating Amazon EventBridge Pipes Pipe (name): operation error Pipes: UpdatePipe, https response error StatusCode: 400, RequestID: eda9e7a8-014a-44c0-95f3-ef523c070a3c, ValidationException: [numeric instance is lower than the required minimum (minimum: 1, found: 0)]

resource "aws_pipes_pipe" "patient-events-stream-pipe" {
  name     = "name"
  role_arn = var.role_arn
  source = var.source_kinesis_stream_arn
  target = var.api_destination_arn
  source_parameters {
    kinesis_stream_parameters {
      batch_size        = 1
      starting_position = "TRIM_HORIZON"
    }
  }

  target_parameters {
    input_template = <<EOF
       $.data
      EOF
  }
}

@ewbankkit
Copy link
Contributor

Relates #31607.

@gurudatta-carbon
Copy link

hello, it seems there is still issue if there is filter parameters addition to top of the given resource i shared.

resource "aws_pipes_pipe" "patient-events-stream-pipe" {
  name     = "name"
  role_arn = var.role_arn
  source = var.source_kinesis_stream_arn
  target = var.api_destination_arn
  source_parameters {
    kinesis_stream_parameters {
      batch_size        = 1
      starting_position = "TRIM_HORIZON"
    }
    filter_criteria {
      filter {
        pattern = jsonencode({
          domain : ["domainName"]
        })
      }
    }
  }

  target_parameters {
    input_template = <<EOF
       $.data
      EOF
  }
}

@sweetcoco
Copy link
Author

This issue is not resolved, the same exact error and output in my original opening of the issue is still happening.

Terraform v1.5.2
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v5.9.0

@gurudatta-carbon
Copy link

can we reopen this issue ?
or should i create a new one ?

cc @justinretzolk

@gurudatta-carbon
Copy link

also when I tried this combination as well, didn't work, same error,
may be just relax the validation rule , if it's in terraform ?

resource "aws_pipes_pipe" "patient-events-stream-pipe" {
  name     = "name"
  role_arn = var.role_arn
  source = var.source_kinesis_stream_arn
  target = var.api_destination_arn
  source_parameters {
    kinesis_stream_parameters {
      batch_size        = 1
      starting_position = "TRIM_HORIZON"
      maximum_record_age_in_seconds = 60
      maximum_retry_attempts        = 3
      dead_letter_config {
        arn = var.sqs_dlq_arn
      }
    }
  }

  target_parameters {
    input_template = <<EOF
       $.data
      EOF
  }
}

@danielMensah
Copy link

danielMensah commented Aug 3, 2023

Can this issue be re-open as I am facing the same error?

Edit:
destroying and re-deploying the pipe seems to fix it somehow.

@justinretzolk justinretzolk reopened this Aug 3, 2023
@justinretzolk justinretzolk added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 3, 2023
@johnsonaj johnsonaj self-assigned this Nov 20, 2023
@github-actions github-actions bot added this to the v5.27.0 milestone Nov 22, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Nov 27, 2023
Copy link

This functionality has been released in v5.27.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2023
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/pipes Issues and PRs that pertain to the pipes service.
Projects
None yet
6 participants