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

unexpected behavior when creating multiple alicloud_db_readonly_instance #7235

Open
lukmanlab opened this issue May 12, 2024 · 0 comments
Open

Comments

@lukmanlab
Copy link

Terraform Version

v1.8.1

Affected Resource(s)

  • alicloud_db_readonly_instance

Terraform Configuration Files

resource "alicloud_db_readonly_instance" "read_only" {
  count                 = local.instance_read_count
  master_db_instance_id = module.mysql.this_db_instance_id
  engine_version        = module.mysql.this_db_instance_engine_version
  instance_storage      = module.mysql.this_db_instance_storage
  instance_type         = local.instance_type_read_only
  instance_name         = "${module.mysql.this_db_instance_name}-read-${count.index}"
  vswitch_id            = module.mysql.this_db_instance_vswitch_id

  timeouts {
    create = local.timeout_create
  }

  depends_on = [module.mysql]
}

Debug Output

│ Error: [ERROR] terraform-provider-alicloud/alicloud/resource_alicloud_db_readonly_instance.go:316: Resource  CreateReadOnlyDBInstance Failed!!! [SDK alibaba-cloud-sdk-go ERROR]:
│ SDKError:
│    StatusCode: 403
│    Code: LockTimeout
│    Message: code: 403, The request processing has failed due to lock timeout. request id: 14756C78-5FB4-3B74-939B-2F858DFC7794
│    Data: {"Code":"LockTimeout","HostId":"rds.ap-southeast-5.aliyuncs.com","Message":"The request processing has failed due to lock timeout.","Recommend":"https://api.alibabacloud.com/troubleshoot?intl_lang=EN_US&q=LockTimeout&product=Rds&requestId=14756C78-5FB4-3B74-939B-2F858DFC7794","RequestId":"14756C78-5FB4-3B74-939B-2F858DFC7794"}
│ 
│ 
│   with alicloud_db_readonly_instance.read_only[0],
│   on main.tf line 45, in resource "alicloud_db_readonly_instance" "read_only":
│   45: resource "alicloud_db_readonly_instance" "read_only" {

Panic Output

Expected Behavior

  • The creation time should be synced with the terraform creation time.
  • The requested instance count, should sync with the amount of read-only instances when it is checked in the console.

Actual Behavior

  • If creation time only needs 10 mins, the terraform creation time does not need to wait until 15 mins then lock timeout.
  • The requested instance count doesn't sync with the number of read-only instances when it is checked in the console.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant