Open ghost opened 4 years ago
Seems like it is issue with terraform providers if i was disabling auto scaling by passing value as "0" for "io1" I am seeing same terrform error as above ^^ mentioned
Test with only giving IOPS variable in my terraform code and removing max_allocated_storage to check this error is only a combination of max_storage and iops, looks like terraform -provider-aws had a issue with passing iops value in modify statement check modify log run by terraform it's not including iops value
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: 2020/01/05 14:48:30 [INFO] DB Instance (testing-pgsql-terraform-io1-v1-east-replica-1) configuration requires ModifyDBInstance: {
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: AllocatedStorage: 100,
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: ApplyImmediately: true,
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: DBInstanceIdentifier: "testing-pgsql-terraform-io1-v1-east-replica-1",
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: DBParameterGroupName: "pg-nonprod-east-rds-test-v1",
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: PreferredMaintenanceWindow: "tue:14:00-tue:15:00"
2020-01-05T14:48:30.700-0500 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: }
I am not using max_storage
, however i've got similar behavior on my env.
My scenario is:
1 - Provisioned a fresh pgsql replica with gp2 storage type 2 - Change storage type from gp2 to io1 + set iops to xxx
Result: nothing happens, read replica is still using gp2
I ran into the same issue today. We specifically set max_allocated_storage to 0 to disable. I tried removing the same too, still same. We use AWS - v2.33 ;
I believe I have run into the same issue. I am not able to create an RDS read replica via Terraform and the RDS module. I am adding to this issue here, as my error logs point to the AWS provider's construction of the POST
call's parameters in the subsequent ModifyDBInstance
action that follows the CreateDBInstance
action. Both storage and iops are specified in my inputs to the resource, but only AllocatedStorage
is included in the parameters:
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: 2020/07/27 13:33:27 [DEBUG] DB Instance status for instance rds-replica: available
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: 2020/07/27 13:33:27 [INFO] DB Instance (rds-replica) configuration requires ModifyDBInstance: {
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: AllocatedStorage: 100,
20-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: ApplyImmediately: true,
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: CACertificateIdentifier: "rds-ca-2019",
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: DBInstanceIdentifier: "rds-replica",
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: DBParameterGroupName: "rds-replica-20200723152822693400000004",
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: PreferredBackupWindow: "03:00-06:00",
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: PreferredMaintenanceWindow: "sat:06:00-sat:06:30"
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: }
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: 2020/07/27 13:33:27 [DEBUG] [aws-sdk-go] DEBUG: Request rds/ModifyDBInstance Details:
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: ---[ REQUEST POST-SIGN ]-----------------------------
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: POST / HTTP/1.1
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Host: rds.us-west-2.amazonaws.com
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: User-Agent: aws-sdk-go/1.32.12 (go1.13.7; darwin; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.25 (+https://www.terraform.io)
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Content-Length: 327
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Authorization: AWS4-HMAC-SHA256 Credential=key/20200727/us-west-2/rds/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=signature
Type: application/x-www-form-urlencoded; charset=utf-8
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: X-Amz-Date: 20200727T173327Z
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Accept-Encoding: gzip
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4:
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Action=ModifyDBInstance&AllocatedStorage=100&ApplyImmediately=true&CACertificateIdentifier=rds-ca-2019&DBInstanceIdentifier=rds-replica&DBParameterGroupName=rds-replica-20200723152822693400000004&PreferredBackupWindow=03%3A00-06%3A00&PreferredMaintenanceWindow=sat%3A06%3A00-sat%3A06%3A30&Version=2014-10-31
2020-07-27T13:33:27.065-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: -----------------------------------------------------
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: 2020/07/27 13:33:27 [DEBUG] [aws-sdk-go] DEBUG: Response rds/ModifyDBInstance Details:
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: ---[ RESPONSE ]--------------------------------------
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: HTTP/1.1 400 Bad Request
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Connection: close
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Content-Length: 377
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Content-Type: text/xml
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: Date: Mon, 27 Jul 2020 17:33:27 GMT
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: X-Amzn-Requestid: request-id
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4:
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4:
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: -----------------------------------------------------
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: 2020/07/27 13:33:27 [DEBUG] [aws-sdk-go] <ErrorResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/">
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: <Error>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: <Type>Sender</Type>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: <Code>InvalidParameterCombination</Code>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: <Message>You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops.</Message>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: </Error>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: <RequestId>request-id</RequestId>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: </ErrorResponse>
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: 2020/07/27 13:33:27 [DEBUG] [aws-sdk-go] DEBUG: Validate Response rds/ModifyDBInstance failed, attempt 0/25, error InvalidParameterCombination: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops.
2020-07-27T13:33:27.604-0400 [DEBUG] plugin.terraform-provider-aws_v2.70.0_x4: status code: 400, request id: request-id
2020/07/27 13:33:27 [DEBUG] module.db.module.db_instance.aws_db_instance.this[0]: apply errored, but we're indicating that via the Error pointer rather than returning it: error modifying DB Instance (analyzer-prod-replica): InvalidParameterCombination: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops.
status code: 400, request id: c346463d-0c15-41fb-ab08-3975fe5c11eb
2020/07/27 13:33:27 [ERROR] module.db.module.db_instance: eval: *terraform.EvalApplyPost, err: error modifying DB Instance (analyzer-prod-replica): InvalidParameterCombination: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops.
status code: 400, request id: c346463d-0c15-41fb-ab08-3975fe5c11eb
2020/07/27 13:33:27 [ERROR] module.db.module.db_instance: eval: *terraform.EvalSequence, err: error modifying DB Instance (analyzer-prod-replica): InvalidParameterCombination: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops.
status code: 400, request id: request-id
Please let me know if this should instead be filed separately with the Terraform RDS module. I found, though, that the module just uses these provider calls, so this seemed most appropriate. I could not, however, find confirmation that the AWS RDS API requires both storage size and iops to always be included in the ModifyDBInstance
API call.
Hey y'all 👋 Thank you for taking the time to file this issue, and for the discussion around it! Given that there's been a number of AWS provider releases since the last update, can anyone confirm whether you're still experiencing this behavior?
I have received this error with provider version 4.57.1
, with a snapshot_identifier, setting gp3
and iops
, and using max_storage_allocation = 0
In my case, not setting gp3
fixed the issue (I was creating from a snapshot with gp3
already set). It seems unfortunate that explicitly setting this parameter when it won't change the storage type will trigger this issue.
This issue was originally opened by @sravankurra as hashicorp/terraform#23764. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Debug Output
Form my debug out put log I observed terraform plugin action not able to pass Iops value. that causing error in terrafor out put and not able to enable auto scaling in RDS rerplicas in AWS
-->
Crash Output
Expected Behavior
We should able to create auto scaling in storage for replicas as well, even in log describe instances is showing IOPS value but terraform in not picking IOPS vaulue during modification
Actual Behavior
Steps to Reproduce
Please list the full steps required to reproduce the issue, for example:
terraform init
terraform apply
Additional Context
Not sure why the modify action command is not picking IOPS vaule, is that related providers or logic bug?
References