ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
35 stars 24 forks source link

Incorrect parameter name in error message for ionoscloud_volume #29

Closed larsen0815 closed 3 years ago

larsen0815 commented 3 years ago

Description

I have a second volume defined as a ionoscloud_volume:

resource "ionoscloud_volume" "swap" {
  datacenter_id = "${ionoscloud_datacenter.example.id}"
  server_id     = "${ionoscloud_server.JetBlue.id}"
  name           = "JetBlue Swap"
  size           = 4
  disk_type      = "HDD"
}

On apply, I get this:

ionoscloud_volume.swap: Creating...
?
¦ Error: either 'image_name', or 'licenceType' must be set
¦
¦   with ionoscloud_volume.swap,
¦   on main.tf line 55, in resource "ionoscloud_volume" "swap":
¦   55: resource "ionoscloud_volume" "swap" {
¦
?

The error is correct in general as I didn't add licence_type there. Problem is that terraform complains about "licenceType" when it should be "licence_type". Added "licenceType" to test this and got:

¦ An argument named "licenceType" is not expected here. Did you mean "licence_type"?

Environment

Terraform v1.0.0
on linux_amd64
+ provider registry.terraform.io/ionos-cloud/ionoscloud v5.2.0
Debian GNU/Linux 10 (buster)
mflorin commented 3 years ago

@larsen0815 please check v5.2.1

larsen0815 commented 3 years ago

Confirmed fixed.