hashicorp / terraform-cdk

Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform
https://www.terraform.io/cdktf
Mozilla Public License 2.0
4.79k stars 443 forks source link

`aws` provider: RDS cluster doesn't have an option to add serverlessv2_scaling_configuration as a parameter to rds cluster #2854

Closed suvhotta closed 1 year ago

suvhotta commented 1 year ago

Community Note

cdktf & Language Versions

Cdktf version: 0.15.5 aws_provider: hashicorp/aws@~>3.0

Affected Provider / Resource(s)

RdsCluster

Expected Behavior

The RDSCluster should have a parameter for serverlessv2_scaling_configuration, like its present in the terraform: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster#rds-serverless-v2-cluster

Actual Behavior

The RDSCluster class doesn't take the serverlessv2_scaling_configuration as a parameter. So that's why it isn't possible to implement serverless v2 through cdktf.

Steps to Reproduce

Try creating an RDSCluster using engine mode as provisioned Something like this: rds_cluster = RdsCluster(self, "test", cluster_identifier="test", db_subnet_group_name=db_subnet_group_name, engine="aurora-postgresql", engine_mode="provisioned", master_password=master_password, master_username=username, scaling_configuration={ "auto_pause": True, "max_capacity": 4, "min_capacity": 2, "seconds_until_auto_pause": 300, "timeout_action": "ForceApplyCapacityChange" }, skip_final_snapshot=True, storage_encrypted=True, tags=tags, vpc_security_group_ids=[rds_sg_id] )

ansgarm commented 1 year ago

Hi @suvhotta ๐Ÿ‘‹

The docs you linked are for a different version of the AWS Terraform provider than the one you said you are using (hashicorp/aws@~>3.0).

Here are the docs that match your version constraint: https://registry.terraform.io/providers/hashicorp/aws/3.76.1/docs/resources/rds_cluster

They also don't include serverlessv2_scaling_configuration โ€“ it looks like you'd need to use a newer AWS provider.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.