Unable to create multiple instances
zulh-civo opened this issue · 2 comments
zulh-civo commented
$ tf apply --auto-approve
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# civo_instance.instance-1 will be created
+ resource "civo_instance" "instance-1" {
+ cpu_cores = (known after apply)
+ created_at = (known after apply)
+ disk_gb = (known after apply)
+ firewall_id = (known after apply)
+ hostname = "instance-1"
+ id = (known after apply)
+ initial_password = (sensitive value)
+ initial_user = "civo"
+ network_id = (known after apply)
+ private_ip = (known after apply)
+ pseudo_ip = (known after apply)
+ public_ip = (known after apply)
+ public_ip_required = "create"
+ ram_mb = (known after apply)
+ size = "g3.xsmall"
+ source_id = (known after apply)
+ source_type = (known after apply)
+ status = (known after apply)
+ template = "8eb48e20-e5db-49fe-9cdf-cc8f381c61c6"
}
# civo_instance.instance-2 will be created
+ resource "civo_instance" "instance-2" {
+ cpu_cores = (known after apply)
+ created_at = (known after apply)
+ disk_gb = (known after apply)
+ firewall_id = (known after apply)
+ hostname = "instance-2"
+ id = (known after apply)
+ initial_password = (sensitive value)
+ initial_user = "civo"
+ network_id = (known after apply)
+ private_ip = (known after apply)
+ pseudo_ip = (known after apply)
+ public_ip = (known after apply)
+ public_ip_required = "create"
+ ram_mb = (known after apply)
+ size = "g3.xsmall"
+ source_id = (known after apply)
+ source_type = (known after apply)
+ status = (known after apply)
+ template = "8eb48e20-e5db-49fe-9cdf-cc8f381c61c6"
}
Plan: 2 to add, 0 to change, 0 to destroy.
civo_instance.instance-2: Creating...
civo_instance.instance-1: Creating...
civo_instance.instance-2: Still creating... [10s elapsed]
civo_instance.instance-2: Still creating... [20s elapsed]
civo_instance.instance-2: Still creating... [30s elapsed]
civo_instance.instance-2: Still creating... [40s elapsed]
civo_instance.instance-2: Still creating... [50s elapsed]
civo_instance.instance-2: Still creating... [1m0s elapsed]
civo_instance.instance-2: Creation complete after 1m6s [id=3f194bc8-ab5f-450b-be5c-7338c5a0bc6d]
╷
│ Error: [ERR] failed to create instance: DatabaseQuotaLockFailedError: Failed to lock the account's quota for updating, are you in the middle of creating another resource
│
│ with civo_instance.instance-1,
│ on main.tf line 42, in resource "civo_instance" "instance-1":
│ 42: resource "civo_instance" "instance-1" {
│
╵
zulh-civo commented
Strange. Creating multiple Kubernetes clusters went OK.
$ tf apply --auto-approve
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# civo_kubernetes_cluster.cluster-1 will be created
+ resource "civo_kubernetes_cluster" "cluster-1" {
+ api_endpoint = (known after apply)
+ created_at = (known after apply)
+ dns_entry = (known after apply)
+ id = (known after apply)
+ installed_applications = (known after apply)
+ instances = (known after apply)
+ kubeconfig = (sensitive value)
+ kubernetes_version = (known after apply)
+ master_ip = (known after apply)
+ name = "cluster-1"
+ network_id = (known after apply)
+ num_target_nodes = 1
+ pools = (known after apply)
+ ready = (known after apply)
+ region = (known after apply)
+ status = (known after apply)
+ target_nodes_size = "g3.k3s.xsmall"
}
# civo_kubernetes_cluster.cluster-2 will be created
+ resource "civo_kubernetes_cluster" "cluster-2" {
+ api_endpoint = (known after apply)
+ created_at = (known after apply)
+ dns_entry = (known after apply)
+ id = (known after apply)
+ installed_applications = (known after apply)
+ instances = (known after apply)
+ kubeconfig = (sensitive value)
+ kubernetes_version = (known after apply)
+ master_ip = (known after apply)
+ name = "cluster-2"
+ network_id = (known after apply)
+ num_target_nodes = 1
+ pools = (known after apply)
+ ready = (known after apply)
+ region = (known after apply)
+ status = (known after apply)
+ target_nodes_size = "g3.k3s.xsmall"
}
Plan: 2 to add, 0 to change, 0 to destroy.
civo_kubernetes_cluster.cluster-1: Creating...
civo_kubernetes_cluster.cluster-2: Creating...
civo_kubernetes_cluster.cluster-2: Still creating... [10s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [10s elapsed]
civo_kubernetes_cluster.cluster-2: Still creating... [20s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [20s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [30s elapsed]
civo_kubernetes_cluster.cluster-2: Still creating... [30s elapsed]
civo_kubernetes_cluster.cluster-2: Still creating... [40s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [40s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [50s elapsed]
civo_kubernetes_cluster.cluster-2: Still creating... [50s elapsed]
civo_kubernetes_cluster.cluster-2: Still creating... [1m0s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [1m0s elapsed]
civo_kubernetes_cluster.cluster-1: Still creating... [1m10s elapsed]
civo_kubernetes_cluster.cluster-2: Still creating... [1m10s elapsed]
civo_kubernetes_cluster.cluster-2: Creation complete after 1m15s [id=baec9f22-064d-4871-b864-511d830bff33]
civo_kubernetes_cluster.cluster-1: Creation complete after 1m17s [id=dd3bfbbb-e501-41ff-bceb-4aaf46505443]
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
andyjeffries commented
Our new API shouldn't exhibit the same problem. Quotas are part of running a cloud provider, but the new API codebase handles this in a different way. We may need to back port the same style fix to the old codebase if this is a common issue.