go-gandi / terraform-provider-gandi

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

Invalid Schema: Failed to set href #66

Closed taoufik07 closed 2 years ago

taoufik07 commented 2 years ago

I think the new changes "break" the provider, well it puts the light on a schema mismatch.

The defined schema doesn't have a href and the code tries to set an href which now raises an error thanks to the added error checks

The error example.com/subdomain/A: Invalid address to set: []string{"href"}

https://github.com/go-gandi/terraform-provider-gandi/blob/2d998de00fa4e42270e1557f4ff328dd49e9c5f5/gandi/resource_livedns_record.go#L22-L52

https://github.com/go-gandi/terraform-provider-gandi/blob/2d998de00fa4e42270e1557f4ff328dd49e9c5f5/gandi/resource_livedns_record.go#L113-L116

Before https://github.com/go-gandi/terraform-provider-gandi/blame/bb7d1edd4a9d323b16c9f96f3a951b4cdf65bc27/gandi/resource_livedns_record.go

Screenshot 2021-10-21 at 10 28 15

Steps to reproduce:

First make sure to clean the providers cache,

rm -rf ~/.terraform.d/plugins/
rm -rf .terraform/providers/
rm .terraform.lock.hcl # Locking gandi master, raises mismatch on every commit

Install the latest gandi

git clone git@gihub.com:go-gandi/terraform-provider-gandi
make 
make install

Then try to provision a new domain name

terraform apply
taoufik07 commented 2 years ago

I would like to work on it, if it's possible

tiramiseb commented 2 years ago

Yep! Do not hesitate to make a PR!