hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

Intermittent acceptance tests failures with `aws_medialive_channel` #29373

Open jar-b opened 1 year ago

jar-b commented 1 year ago

Description

Observing intermittent acceptance test failures on the aws_medialive_channel test suite. Specifically, the _update test fails with:

=== CONT  TestAccMediaLiveChannel_update
    channel_test.go:296: Step 2/2 error: Error running apply: exit status 1

        Error: updating AWS Elemental MediaLive Input (8365259): operation error MediaLive: UpdateInput, https response error StatusCode: 400, RequestID: dd21cbd6-db6f-4000-ac1e-37b2460cf00b, BadRequestException: The first input attached to a channel cannot be a dynamic input. Please remove input: arn:aws:medialive:us-west-2:727561393803:input:8365259 from the channel to make it dynamic.

          with aws_medialive_input.test,
          on terraform_plugin_test.tf line 74, in resource "aws_medialive_input" "test":
          74: resource "aws_medialive_input" "test" {

--- PASS: TestAccMediaLiveChannel_status (287.68s)
--- FAIL: TestAccMediaLiveChannel_update (298.75s)

I suspect this may be because the input_attachment attribute is a set type, and thus does not guarantee order of the values sent in the update API call.

https://github.com/hashicorp/terraform-provider-aws/blob/a978261921256f81ff4da425f05d81fcf5ae8c27/internal/service/medialive/channel.go#L142-L144

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue