From 6b1bee679bb832800b00d42245bc9f9514d42708 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Fri, 8 Sep 2023 15:32:18 -0400 Subject: [PATCH] ec2/spot_fleet_request: regexp --- internal/service/ec2/ec2_spot_fleet_request_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/ec2/ec2_spot_fleet_request_test.go b/internal/service/ec2/ec2_spot_fleet_request_test.go index 3d956825fb9..c62331b665e 100644 --- a/internal/service/ec2/ec2_spot_fleet_request_test.go +++ b/internal/service/ec2/ec2_spot_fleet_request_test.go @@ -1911,7 +1911,7 @@ func testAccCheckSpotFleetRequest_IAMInstanceProfileARN(sfr *ec2.SpotFleetReques return fmt.Errorf("Expected IamInstanceProfile to be set, got nil") } //Validate the string whether it is ARN - re := regexache.MustCompile(fmt.Sprintf(`arn:%s:iam::\d{12}:instance-profile/?[0-9A-Za-z_+=,.@-].*`, acctest.Partition())) + re := regexache.MustCompile(fmt.Sprintf(`arn:%s:iam::\d{12}:instance-profile/?[0-9A-Za-z@-_+=,.].*`, acctest.Partition())) // regex seems suspicious, @-_ is a range if !re.MatchString(*profile.Arn) { return fmt.Errorf("Expected IamInstanceProfile input as ARN, got %s", *profile.Arn) }