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

Resource awscc_rds_db_instance cannot create DB instance due to forced promotion_tier #1812

Closed
michemache opened this issue Jun 13, 2024 · 2 comments
Assignees
Labels
bug service/rds upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.

Comments

@michemache
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "awscc_rds_db_instance" "this" {
  allocated_storage       = 10
  engine                  = "postgres"
  engine_version          = "16.3"
  db_instance_class       = "db.t3.micro"
  master_username         = "foo"
  master_user_password    = "foobarbaz"
  db_parameter_group_name = "default.postgres16"
  db_subnet_group_name    = awscc_rds_db_subnet_group.this.id
}

Debug Output

╷
│ Error: AWS SDK Go Service Operation Incomplete
│
│   with awscc_rds_db_instance.this,
│   on alasco-app.tf line 59, in resource "awscc_rds_db_instance" "this":
│   59: resource "awscc_rds_db_instance" "this" {
│
│ Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: You cannot set the promotion tier for a DB instance that is not
│ part of an DB Cluster. (Service: Rds, Status Code: 400, Request ID: 6c8480b8-d26f-420d-9d34-74b17aa36319). ErrorCode: InvalidRequest
╵

Panic Output

Expected Behavior

Don't set promotion_tier if engine is set to a non-Aurora engine such as mysql or postgres.

Actual Behavior

Terraform will perform the following actions:

  # awscc_rds_db_instance.this will be created
  + resource "awscc_rds_db_instance" "this" {
...
      + engine                                   = "postgres"
...
      + promotion_tier                           = 1
...
    }

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@quixoticmonk
Copy link
Collaborator

quixoticmonk commented Jun 13, 2024

Thank you for reporting the issue @michemache . I can reproduce this. I have opened an internal service ticket to review the schema and default value for the property.

@quixoticmonk quixoticmonk added bug upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency. service/rds and removed needs-triage labels Jun 13, 2024
@quixoticmonk quixoticmonk self-assigned this Aug 30, 2024
@quixoticmonk
Copy link
Collaborator

The schema refresh on this has removed the default value for PromotionTier. Retested with the original configuration to create a DB instance. Closing the issue. Please re-open if the issue persists on your end.

  # awscc_rds_db_instance.this will be created
  + resource "awscc_rds_db_instance" "this" {
      + allocated_storage                        = "10"
      + allow_major_version_upgrade              = (known after apply)
      + associated_roles                         = (known after apply)
      + auto_minor_version_upgrade               = (known after apply)
      + automatic_backup_replication_kms_key_id  = (known after apply)
      + automatic_backup_replication_region      = (known after apply)
      + availability_zone                        = (known after apply)
      + backup_retention_period                  = (known after apply)
      + ca_certificate_identifier                = (known after apply)
      + certificate_details                      = (known after apply)
      + certificate_rotation_restart             = (known after apply)
      + character_set_name                       = (known after apply)
      + copy_tags_to_snapshot                    = (known after apply)
      + custom_iam_instance_profile              = (known after apply)
      + db_cluster_identifier                    = (known after apply)
      + db_cluster_snapshot_identifier           = (known after apply)
      + db_instance_arn                          = (known after apply)
      + db_instance_class                        = "db.t3.micro"
      + db_instance_identifier                   = (known after apply)
      + db_name                                  = (known after apply)
      + db_parameter_group_name                  = "default.postgres16"
      + db_security_groups                       = (known after apply)
      + db_snapshot_identifier                   = (known after apply)
      + db_subnet_group_name                     = (known after apply)
      + db_system_id                             = (known after apply)
      + dbi_resource_id                          = (known after apply)
      + dedicated_log_volume                     = (known after apply)
      + delete_automated_backups                 = (known after apply)
      + deletion_protection                      = (known after apply)
      + domain                                   = (known after apply)
      + domain_auth_secret_arn                   = (known after apply)
      + domain_dns_ips                           = (known after apply)
      + domain_fqdn                              = (known after apply)
      + domain_iam_role_name                     = (known after apply)
      + domain_ou                                = (known after apply)
      + enable_cloudwatch_logs_exports           = (known after apply)
      + enable_iam_database_authentication       = (known after apply)
      + enable_performance_insights              = (known after apply)
      + endpoint                                 = (known after apply)
      + engine                                   = "postgres"
      + engine_lifecycle_support                 = (known after apply)
      + engine_version                           = "16.3"
      + id                                       = (known after apply)
      + iops                                     = (known after apply)
      + kms_key_id                               = (known after apply)
      + license_model                            = (known after apply)
      + manage_master_user_password              = (known after apply)
      + master_user_password                     = "foobarbaz"
      + master_user_secret                       = (known after apply)
      + master_username                          = "foo"
      + max_allocated_storage                    = (known after apply)
      + monitoring_interval                      = (known after apply)
      + monitoring_role_arn                      = (known after apply)
      + multi_az                                 = (known after apply)
      + nchar_character_set_name                 = (known after apply)
      + network_type                             = (known after apply)
      + option_group_name                        = (known after apply)
      + performance_insights_kms_key_id          = (known after apply)
      + performance_insights_retention_period    = (known after apply)
      + port                                     = (known after apply)
      + preferred_backup_window                  = (known after apply)
      + preferred_maintenance_window             = (known after apply)
      + processor_features                       = (known after apply)
      + promotion_tier                           = (known after apply)
      + publicly_accessible                      = (known after apply)
      + replica_mode                             = (known after apply)
      + restore_time                             = (known after apply)
      + source_db_cluster_identifier             = (known after apply)
      + source_db_instance_automated_backups_arn = (known after apply)
      + source_db_instance_identifier            = (known after apply)
      + source_dbi_resource_id                   = (known after apply)
      + source_region                            = (known after apply)
      + storage_encrypted                        = (known after apply)
      + storage_throughput                       = (known after apply)
      + storage_type                             = (known after apply)
      + tags                                     = (known after apply)
      + tde_credential_arn                       = (known after apply)
      + tde_credential_password                  = (known after apply)
      + timezone                                 = (known after apply)
      + use_default_processor_features           = (known after apply)
      + use_latest_restorable_time               = (known after apply)
      + vpc_security_groups                      = (known after apply)
    }
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug service/rds upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.
Projects
None yet
Development

No branches or pull requests

2 participants