go-gandi / terraform-provider-gandi

Terraform provider for the Gandi Domain services
Mozilla Public License 2.0
152 stars 47 forks source link

Terraform import gandi_mailbox #115

Open flippipe opened 2 years ago

flippipe commented 2 years ago

Hi,

When importing a gandi_mailbox I've got this error

Error: failed to set address for demo.info/b01dac49-xxxx-xxxx-94ab-3bdf9c7dbfd5: Invalid address to set: []string{"address"}

In the resource definition is not missing the address information?

https://github.com/go-gandi/terraform-provider-gandi/issues/new?permalink=https%3A%2F%2Fgithub.com%2Fgo-gandi%2Fterraform-provider-gandi%2Fblob%2Ffdca6cd88d0f5fc2445ab0c137a85f50f20161c3%2Fgandi%2Fresource_mailbox.go%23L12

Answer from API

2022-04-24T17:46:34.789+0100 [INFO]  provider.terraform-provider-gandi_v2.0.1: 2022/04/24 17:46:34 Response body: {"login":"teste","quota_used":3,"mailbox_type":"standard","domain":"demo.info","aliases":[],"responder":{"message":"","enabled":false},"address":"teste@demo.info","href":"https://api.gandi.net/v5/email/mailboxes/demo.info/b01dac49-xxxx-xxxx-94ab-3bdf9c7dbfd5","id":"b01dac49-xxxx-xxxx-94ab-3bdf9c7dbfd5"}: timestamp=2022-04-24T17:46:34.788+0100
nlewo commented 2 years ago

@flippipe yes, the address is missing from the schema :/ There are also other missing fields and the implementation of this resource looks quite fragile.

strboul commented 1 year ago

Is there any update on this one?