diff --git a/internal/service/route53/record.go b/internal/service/route53/record.go index ae4179cf4de..804d43ea28b 100644 --- a/internal/service/route53/record.go +++ b/internal/service/route53/record.go @@ -187,7 +187,7 @@ func ResourceRecord() *schema.Resource { Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "awsregion": { + "aws_region": { Type: schema.TypeString, Optional: true, }, @@ -212,7 +212,7 @@ func ResourceRecord() *schema.Resource { }, Optional: true, }, - "localzonegroup": { + "local_zone_group": { Type: schema.TypeString, Optional: true, }, @@ -466,10 +466,10 @@ func resourceRecordRead(ctx context.Context, d *schema.ResourceData, meta interf if record.GeoProximityLocation != nil { v := []map[string]interface{}{{ - "awsregion": aws.StringValue(record.GeoProximityLocation.AWSRegion), - "bias": aws.Int64Value((record.GeoProximityLocation.Bias)), - "coordinates": flattenCoordinate(record.GeoProximityLocation.Coordinates), - "localzonegroup": aws.StringValue(record.GeoProximityLocation.LocalZoneGroup), + "aws_region": aws.StringValue(record.GeoProximityLocation.AWSRegion), + "bias": aws.Int64Value((record.GeoProximityLocation.Bias)), + "coordinates": flattenCoordinate(record.GeoProximityLocation.Coordinates), + "local_zone_group": aws.StringValue(record.GeoProximityLocation.LocalZoneGroup), }} if err := d.Set("geoproximity_routing_policy", v); err != nil { return sdkdiag.AppendErrorf(diags, "setting geoproximity_routing_policy: %s", err) @@ -588,10 +588,10 @@ func resourceRecordUpdate(ctx context.Context, d *schema.ResourceData, meta inte if len(o) == 1 { if v, ok := o[0].(map[string]interface{}); ok { oldRec.GeoProximityLocation = &route53.GeoProximityLocation{ - AWSRegion: nilString(v["awsregion"].(string)), + AWSRegion: nilString(v["aws_region"].(string)), Bias: aws.Int64(int64(v["bias"].(int))), Coordinates: ExpandCoordinatesValue(v["coordinates"].(*schema.Set).List()), - LocalZoneGroup: nilString(v["localzonegroup"].(string)), + LocalZoneGroup: nilString(v["local_zone_group"].(string)), } } } @@ -937,10 +937,10 @@ func expandResourceRecordSet(d *schema.ResourceData, zoneName string) *route53.R geoproximity := geoproximityvalues[0].(map[string]interface{}) rec.GeoProximityLocation = &route53.GeoProximityLocation{ - AWSRegion: nilString(geoproximity["awsregion"].(string)), + AWSRegion: nilString(geoproximity["aws_region"].(string)), Bias: aws.Int64(int64(geoproximity["bias"].(int))), Coordinates: ExpandCoordinatesValue(geoproximity["coordinates"].(*schema.Set).List()), - LocalZoneGroup: nilString(geoproximity["localzonegroup"].(string)), + LocalZoneGroup: nilString(geoproximity["local_zone_group"].(string)), } } diff --git a/internal/service/route53/record_test.go b/internal/service/route53/record_test.go index 8585b00ba6a..89108b9a487 100644 --- a/internal/service/route53/record_test.go +++ b/internal/service/route53/record_test.go @@ -2236,8 +2236,8 @@ resource "aws_route53_record" "awsregion" { ttl = "5" geoproximity_routing_policy { - awsregion = %[1]q - bias = 40 + aws_region = %[1]q + bias = 40 } records = ["dev.domain.test"] set_identifier = "awsregion" @@ -2250,7 +2250,7 @@ resource "aws_route53_record" "localzonegroup" { ttl = "5" geoproximity_routing_policy { - localzonegroup = %[2]q + local_zone_group = %[2]q } records = ["dev.domain.test"] set_identifier = "localzonegroup" @@ -2949,7 +2949,7 @@ resource "aws_route53_record" "set_identifier_rename_geoproximity" { ttl = "5" geoproximity_routing_policy { - awsregion = %[1]q + aws_region = %[1]q } records = ["dev.example.com"] @@ -2971,7 +2971,7 @@ resource "aws_route53_record" "set_identifier_rename_geoproximity" { ttl = "5" geoproximity_routing_policy { - localzonegroup = %[1]q + local_zone_group = %[1]q } records = ["dev.example.com"] diff --git a/website/docs/r/route53_record.html.markdown b/website/docs/r/route53_record.html.markdown index 36b9f3ee0e2..6b239af0aed 100644 --- a/website/docs/r/route53_record.html.markdown +++ b/website/docs/r/route53_record.html.markdown @@ -193,10 +193,10 @@ Geolocation routing policies support the following: Geoproximity routing policies support the following: -* `awsregion` - A AWS region where the resource is present. +* `aws_region` - A AWS region where the resource is present. * `bias` - Route more traffic or less traffic to the resource by specifying a value ranges between -90 to 90. See https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-geoproximity.html for bias details. * `coordinates` - Specify `latitude` and `longitude` for routing traffic to non-AWS resources. -* `localzonegroup` - A AWS local zone group where the resource is present. See https://docs.aws.amazon.com/local-zones/latest/ug/available-local-zones.html for local zone group list. +* `local_zone_group` - A AWS local zone group where the resource is present. See https://docs.aws.amazon.com/local-zones/latest/ug/available-local-zones.html for local zone group list. ### Latency Routing Policy