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.63k stars 9.01k forks source link

[Bug]: Error when enabling S3Import and S3Export features while Aurora cluster is being provisioned. #36881

Open anacronxinetd opened 3 months ago

anacronxinetd commented 3 months ago

Terraform Core Version

1.2.9

AWS Provider Version

5.42.0

Affected Resource(s)

aws_rds_cluster

Expected Behavior

Enable S3Import and S3Export featues while Aurora cluster is being provisioned

Actual Behavior

Terraform is unbale to enable both features and an error is reported. One of the features can be enabled, but an error is reported when Terraform attempts to enable the second one. This can be in any order. If S3Import is enabled first, Terraform reports an error when trying to enable S3Export. This only occurs when the trying to enable the features while a cluster is being provisioned. It can be enabled afterwards with no issues.

Relevant Error/Panic Output Snippet

Error: waiting for RDS DB Cluster (test4) IAM Role  Association to create: unexpected state 'INVALID', wanted target 'ACTIVE'. last error: %!s(<nil>)

Terraform Configuration Files

terraform-aws-dba-aurora-postgresql.zip

Steps to Reproduce

  1. Deploy Aurora PostgreSQL cluster with features enabled
module "apg" {
  source                   = "./terraform-aws-dba-aurora-postgresql"
  db_cluster_identifier    = "test4"
  kms_key                  = var.kms_key.af.general
  vpc_id                   = var.vpc_id.af
  permissions_boundary_arn = var.tfe_dev_create_role_boundary_arn
  deletion_protection      = false
  skip_final_snapshot      = true
  enable_s3_integration    = true
}

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 3 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue