cloudamqp / terraform-provider-cloudamqp

Terraform Provider for CloudAMQP
https://registry.terraform.io/providers/cloudamqp/cloudamqp
Mozilla Public License 2.0
35 stars 38 forks source link

Azure: cloudamqp_extra_disk_size sizing inconsistencies #301

Open Bouke opened 3 weeks ago

Bouke commented 3 weeks ago

According to pricing - extras:

Extra disk space Supported tiers are 25, 50, 100, 250, 500, 1000, 2000 (GB) Azure: 0, 32, 64, 128, 256, 512, 1024, 2048 (GB)

So when I specified:

resource "cloudamqp_instance" "production" {
  ...
  region              = "azure-arm::westeurope"
}
resource "cloudamqp_extra_disk_size" "production" {
  instance_id    = cloudamqp_instance.production.id
  extra_disk_size = 128
}

Imagine my surprise:

cloudamqp_extra_disk_size.production: Creating... ╷ │ Error: resize disk failed: Incorrect disk size value. Available disk sizes are: 0, 25, 50, 100, 250, 500, 1000, 2000 │ │ with cloudamqp_extra_disk_size.production, │ on main.tf line 1034, in resource "cloudamqp_extra_disk_size" "production": │ 1034: resource "cloudamqp_extra_disk_size" "production" { │ ╵

So I thought; maybe an inconsistency in the API and a mapping applies?

resource "cloudamqp_instance" "production" {
  ...
  region              = "azure-arm::westeurope"
}
resource "cloudamqp_extra_disk_size" "production" {
  instance_id    = cloudamqp_instance.production.id
  extra_disk_size = 100
}

Which got applied... however...

image
image

What state did this get our cluster into?

tbroden84 commented 3 weeks ago

@Bouke saw you got an reply by our support about this issue too.

Correct, there is an inconsistency between our UI and API. We made a simplified enforcement for extra disk on Azure in the API to follow our other Cloud providers. The increments can be found here: https://registry.terraform.io/providers/cloudamqp/cloudamqp/latest/docs/resources/extra_disk_size#argument-reference

We have a task in our backlog to address this, but it's not current prioritized.