Skip to content

Commit

Permalink
awsregion' -> 'aws_region' and 'localzonegroup' -> 'local_zone_group'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Feb 15, 2024
1 parent 18c2a93 commit 051cca9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions internal/service/route53/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -212,7 +212,7 @@ func ResourceRecord() *schema.Resource {
},
Optional: true,
},
"localzonegroup": {
"local_zone_group": {
Type: schema.TypeString,
Optional: true,
},
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)),
}
}
}
Expand Down Expand Up @@ -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)),
}
}

Expand Down
10 changes: 5 additions & 5 deletions internal/service/route53/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"]
Expand All @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/route53_record.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 051cca9

Please sign in to comment.