Skip to content

Commit c50e823

Browse files
authored
Merge pull request #4 from terraform-providers/deprecate-non-compliant-fields
d/ovh_publiccloud_region: Deprecate non compliant fields
2 parents 9db6860 + fd23e55 commit c50e823

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

ovh/data_source_ovh_publiccloud_region.go

+16-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,21 @@ func dataSourcePublicCloudRegion() *schema.Resource {
4343
},
4444

4545
"continentCode": &schema.Schema{
46+
Type: schema.TypeString,
47+
Computed: true,
48+
Deprecated: "Deprecated, use continent_code instead.",
49+
},
50+
"datacenterLocation": &schema.Schema{
51+
Type: schema.TypeString,
52+
Computed: true,
53+
Deprecated: "Deprecated, use datacenter_location instead.",
54+
},
55+
56+
"continent_code": &schema.Schema{
4657
Type: schema.TypeString,
4758
Computed: true,
4859
},
49-
50-
"datacenterLocation": &schema.Schema{
60+
"datacenter_location": &schema.Schema{
5161
Type: schema.TypeString,
5262
Computed: true,
5363
},
@@ -71,9 +81,13 @@ func dataSourcePublicCloudRegionRead(d *schema.ResourceData, meta interface{}) e
7181
return fmt.Errorf("Error calling %s:\n\t %q", endpoint, err)
7282
}
7383

84+
// TODO: Deprecated - remove in next major release
7485
d.Set("datacenterLocation", response.DatacenterLocation)
7586
d.Set("continentCode", response.ContinentCode)
7687

88+
d.Set("datacenter_location", response.DatacenterLocation)
89+
d.Set("continent_code", response.ContinentCode)
90+
7791
services := &schema.Set{
7892
F: publicCloudServiceHash,
7993
}

0 commit comments

Comments
 (0)