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.71k stars 9.07k forks source link

[Bug]: Timeout in aws_rds_cluster_role_association is insufficient #35895

Open twbecker opened 6 months ago

twbecker commented 6 months ago

Terraform Core Version

1.7.1

AWS Provider Version

5.34.0

Affected Resource(s)

Expected Behavior

The role should be associated with the cluster.

Actual Behavior

The association times out. This was increased to 10m (hardcoded) in #30868 but it seems that is not enough. My team still sees this regularly.

Relevant Error/Panic Output Snippet

Error: waiting for RDS DB Cluster (REDACTED) IAM Role (arn:aws:iam::REDACTED:role/env/REDACTED/REDACTED-s3-import) Association to create: timeout while waiting for state to become 'ACTIVE' (last state: 'PENDING', timeout: 10m0s)

Terraform Configuration Files

resource "aws_rds_cluster_role_association" "s3_import" {
  db_cluster_identifier = aws_rds_cluster.this.id
  feature_name          = "s3Import"
  role_arn              = aws_iam_role.s3_import.arn
}

resource "aws_rds_cluster" "this" {
  cluster_identifier      = "mydb"
  availability_zones      = var.vpc_availability_zones
  engine                  = "aurora-postgresql"
  engine_version          = "15.4"
  db_subnet_group_name    = aws_db_subnet_group.this.name
  master_username         = local.admin_username
  master_password         = random_password.admin.result
  preferred_backup_window = "03:00-06:00"
  skip_final_snapshot     = true
  storage_encrypted       = true
  vpc_security_group_ids = [
    aws_security_group.db.id,
  ]

  serverlessv2_scaling_configuration {
    min_capacity = 0.5
    max_capacity = 8.0
  }
}

Steps to Reproduce

Apply the above configuration from scratch.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue