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.75k stars 9.1k forks source link

[Bug]: Acceptance tests for `aws_dms_replication_task` failing due to IAM role issue #39217

Open acwwat opened 1 week ago

acwwat commented 1 week ago

Terraform Core Version

1.6.6

AWS Provider Version

5.66.0

Affected Resource(s)

Expected Behavior

Acceptance tests should pass.

Actual Behavior

Acceptance tests are failing due to a AccessDeniedFault referring to the IAM role.

Relevant Error/Panic Output Snippet

$ make testacc TESTS=TestAccDMSReplicationTask_basic PKG=dms
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/dms/... -v -count 1 -parallel 20 -run='TestAccDMSReplicationTask_basic'  -timeout 360m
=== RUN   TestAccDMSReplicationTask_basic
=== PAUSE TestAccDMSReplicationTask_basic
=== CONT  TestAccDMSReplicationTask_basic
=== RUN   TestAccDMSReplicationTask_basic/full-load
=== PAUSE TestAccDMSReplicationTask_basic/full-load
=== RUN   TestAccDMSReplicationTask_basic/cdc
=== PAUSE TestAccDMSReplicationTask_basic/cdc
=== RUN   TestAccDMSReplicationTask_basic/full-load-and-cdc
=== PAUSE TestAccDMSReplicationTask_basic/full-load-and-cdc
=== CONT  TestAccDMSReplicationTask_basic/full-load
=== CONT  TestAccDMSReplicationTask_basic/full-load-and-cdc
=== CONT  TestAccDMSReplicationTask_basic/cdc
=== NAME  TestAccDMSReplicationTask_basic/full-load
    replication_task_test.go:41: Step 1/2 error: Error running apply: exit status 1

        Error: creating DMS Replication Subnet Group (tf-acc-test-316676734732487828): operation error Database Migration Service: CreateReplicationSubnetGroup, https response error StatusCode: 400, RequestID: 0eb619d2-211c-4139-beaa-ad03dc647a15, AccessDeniedFault: The IAM Role arn:aws:iam::100180206982:role/dms-vpc-role is not configured properly.

          with aws_dms_replication_subnet_group.test,
          on terraform_plugin_test.tf line 67, in resource "aws_dms_replication_subnet_group" "test":
          67: resource "aws_dms_replication_subnet_group" "test" {

=== NAME  TestAccDMSReplicationTask_basic/full-load-and-cdc
    replication_task_test.go:41: Step 1/2 error: Error running apply: exit status 1

        Error: creating DMS Replication Subnet Group (tf-acc-test-8089863299934603961): operation error Database Migration Service: CreateReplicationSubnetGroup, https response error StatusCode: 400, RequestID: a7efd5eb-0b01-4b5d-a07d-21f40aafd9f6, AccessDeniedFault: The IAM Role arn:aws:iam::100180206982:role/dms-vpc-role is not configured properly.

          with aws_dms_replication_subnet_group.test,
          on terraform_plugin_test.tf line 67, in resource "aws_dms_replication_subnet_group" "test":
          67: resource "aws_dms_replication_subnet_group" "test" {

=== NAME  TestAccDMSReplicationTask_basic/cdc
    replication_task_test.go:41: Step 1/2 error: Error running apply: exit status 1

        Error: creating DMS Replication Subnet Group (tf-acc-test-3435961496792555726): operation error Database Migration Service: CreateReplicationSubnetGroup, https response error StatusCode: 400, RequestID: 36bf344d-aa2d-4457-9c08-b545ff2161d2, AccessDeniedFault: The IAM Role arn:aws:iam::100180206982:role/dms-vpc-role is not configured properly.

          with aws_dms_replication_subnet_group.test,
          on terraform_plugin_test.tf line 67, in resource "aws_dms_replication_subnet_group" "test":
          67: resource "aws_dms_replication_subnet_group" "test" {

--- FAIL: TestAccDMSReplicationTask_basic (0.00s)
    --- FAIL: TestAccDMSReplicationTask_basic/full-load (241.58s)
    --- FAIL: TestAccDMSReplicationTask_basic/full-load-and-cdc (241.59s)
    --- FAIL: TestAccDMSReplicationTask_basic/cdc (241.59s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/dms        241.879s
FAIL
make: *** [GNUmakefile:629: testacc] Error 1

$

Terraform Configuration Files

n/a

Steps to Reproduce

  1. Run the acceptance tests for aws_dms_replication_task as follows: make testacc TESTS=TestAccDMSReplicationTaskDataSource_basic PKG=dms

Debug Output

n/a

Panic Output

n/a

Important Factoids

I found the issues when I was working on a PR for #38867

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 week ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue