Skip to content

Commit

Permalink
refactor: not use "AppRunner" in var name inside apprunner package
Browse files Browse the repository at this point in the history
  • Loading branch information
Mussin Benarbia committed Mar 11, 2024
1 parent 3c124a4 commit bec7cec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/service/apprunner/hosted_zone_id_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

// See https://docs.aws.amazon.com/general/latest/gr/apprunner.html

var HostedZoneIdPerRegionApprunnerMap = map[string]string{
var HostedZoneIdPerRegionMap = map[string]string{
endpoints.UsEast2RegionID: "Z0224347AD7KVHMLOX31",
endpoints.UsEast1RegionID: "Z01915732ZBZKC8D32TPT",
endpoints.UsWest2RegionID: "Z02243383FTQ64HJ5772Q",
Expand Down Expand Up @@ -76,7 +76,7 @@ func (d *dataSourceHostedZoneID) Read(ctx context.Context, req datasource.ReadRe
region = data.Region.ValueString()
}

if zoneId, ok := HostedZoneIdPerRegionApprunnerMap[region]; ok {
if zoneId, ok := HostedZoneIdPerRegionMap[region]; ok {
data.ID = types.StringValue(zoneId)
data.Region = types.StringValue(region)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestAccAppRunnerHostedZoneIDDataSource_basic(t *testing.T) {
{
Config: testAccHostedZoneIDDataSourceConfig_basic,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("data.aws_apprunner_hosted_zone_id.main", "id", apprunner.HostedZoneIdPerRegionApprunnerMap[acctest.Region()]),
resource.TestCheckResourceAttr("data.aws_apprunner_hosted_zone_id.main", "id", apprunner.HostedZoneIdPerRegionMap[acctest.Region()]),
),
},
{
Expand Down

0 comments on commit bec7cec

Please sign in to comment.