Constellix / terraform-provider-constellix

Terraform Constellix provider
https://www.terraform.io/docs/providers/constellix/
Mozilla Public License 2.0
7 stars 21 forks source link

Fix parsing of geo_location field in record resources (proposal uses TypeSet) #14

Open coxjonc opened 3 years ago

coxjonc commented 3 years ago

Similar to #11, but uses TypeSet instead of TypeMap. This is correct for schemas that require predefined keys. It will break existing HCL configuration that sets geolocation using the old map syntax. Note the missing = below.

geo_location = {
    geo_ip_proximity = xxxxx
    geo_ip_failover  = xxxx
  }

would need to be converted to

geo_location {
    geo_ip_proximity = xxxxx
    geo_ip_failover  = xxxx
  }

The provider will also break if it attempts to import state that has stored geolocation as a Map rather than a Set. State will need to be removed and re-imported.

The changes have only been applied to a records and cname records because these are the records we use. I think the same problem is present in other record types - not sure, haven't checked. May be worth fixing those later.