Skip to content

Commit 95adca6

Browse files
committed
ci/semgrep/ce: Remove exclusion
1 parent 1644f01 commit 95adca6

File tree

6 files changed

+23
-25
lines changed

6 files changed

+23
-25
lines changed

.semgrep-configs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ rules:
1010
exclude:
1111
- internal/service/apigateway
1212
- internal/service/appautoscaling
13-
- internal/service/ce
1413
- internal/service/cloudtrail
1514
- internal/service/cloudwatch
1615
- internal/service/cognitoidp

internal/generate/servicesemgrep/configs.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ rules:
1010
exclude:
1111
- internal/service/apigateway
1212
- internal/service/appautoscaling
13-
- internal/service/ce
1413
- internal/service/cloudtrail
1514
- internal/service/cloudwatch
1615
- internal/service/cognitoidp

internal/service/ce/anomaly_monitor_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func TestAccCEAnomalyMonitor_tags(t *testing.T) {
118118
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
119119
Steps: []resource.TestStep{
120120
{
121-
Config: testAccAnomalyMonitorConfig_Tags1(rName, "key1", "value1"),
121+
Config: testAccAnomalyMonitorConfig_tags1(rName, "key1", "value1"),
122122
Check: resource.ComposeAggregateTestCheckFunc(
123123
testAccCheckAnomalyMonitorExists(resourceName, &monitor),
124124
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
@@ -131,7 +131,7 @@ func TestAccCEAnomalyMonitor_tags(t *testing.T) {
131131
ImportStateVerify: true,
132132
},
133133
{
134-
Config: testAccAnomalyMonitorConfig_Tags2(rName, "key1", "value1updated", "key2", "value2"),
134+
Config: testAccAnomalyMonitorConfig_tags2(rName, "key1", "value1updated", "key2", "value2"),
135135
Check: resource.ComposeAggregateTestCheckFunc(
136136
testAccCheckAnomalyMonitorExists(resourceName, &monitor),
137137
resource.TestCheckResourceAttr(resourceName, "tags.%", "2"),
@@ -140,7 +140,7 @@ func TestAccCEAnomalyMonitor_tags(t *testing.T) {
140140
),
141141
},
142142
{
143-
Config: testAccAnomalyMonitorConfig_Tags1(rName, "key2", "value2"),
143+
Config: testAccAnomalyMonitorConfig_tags1(rName, "key2", "value2"),
144144
Check: resource.ComposeTestCheckFunc(
145145
testAccCheckAnomalyMonitorExists(resourceName, &monitor),
146146
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
@@ -166,7 +166,7 @@ func TestAccCEAnomalyMonitor_Dimensional(t *testing.T) {
166166
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
167167
Steps: []resource.TestStep{
168168
{
169-
Config: testAccAnomalyMonitorConfig_Dimensional(rName),
169+
Config: testAccAnomalyMonitorConfig_dimensional(rName),
170170
Check: resource.ComposeTestCheckFunc(
171171
testAccCheckAnomalyMonitorExists(resourceName, &monitor),
172172
resource.TestCheckResourceAttr(resourceName, "name", rName),
@@ -264,7 +264,7 @@ JSON
264264
`, rName)
265265
}
266266

267-
func testAccAnomalyMonitorConfig_Tags1(rName string, tagKey1, tagValue1 string) string {
267+
func testAccAnomalyMonitorConfig_tags1(rName string, tagKey1, tagValue1 string) string {
268268
return fmt.Sprintf(`
269269
resource "aws_ce_anomaly_monitor" "test" {
270270
name = %[1]q
@@ -294,7 +294,7 @@ JSON
294294
`, rName, tagKey1, tagValue1)
295295
}
296296

297-
func testAccAnomalyMonitorConfig_Tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string {
297+
func testAccAnomalyMonitorConfig_tags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string {
298298
return fmt.Sprintf(`
299299
resource "aws_ce_anomaly_monitor" "test" {
300300
name = %[1]q
@@ -325,7 +325,7 @@ JSON
325325
`, rName, tagKey1, tagValue1, tagKey2, tagValue2)
326326
}
327327

328-
func testAccAnomalyMonitorConfig_Dimensional(rName string) string {
328+
func testAccAnomalyMonitorConfig_dimensional(rName string) string {
329329
return fmt.Sprintf(`
330330
resource "aws_ce_anomaly_monitor" "test" {
331331
name = %[1]q

internal/service/ce/cost_category_data_source_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestAccCECostCategoryDataSource_basic(t *testing.T) {
2121
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
2222
Steps: []resource.TestStep{
2323
{
24-
Config: testAccCostCategoryDataSourceConfig(rName),
24+
Config: testAccCostCategoryDataSourceConfig_basic(rName),
2525
Check: resource.ComposeTestCheckFunc(
2626
testAccCheckCostCategoryExists(resourceName, &output),
2727
resource.TestCheckResourceAttrPair(dataSourceName, "cost_category_arn", resourceName, "arn"),
@@ -34,9 +34,9 @@ func TestAccCECostCategoryDataSource_basic(t *testing.T) {
3434
})
3535
}
3636

37-
func testAccCostCategoryDataSourceConfig(rName string) string {
37+
func testAccCostCategoryDataSourceConfig_basic(rName string) string {
3838
return acctest.ConfigCompose(
39-
testAccCostCategoryConfig(rName),
39+
testAccCostCategoryConfig_basic(rName),
4040
`
4141
data "aws_ce_cost_category" "test" {
4242
cost_category_arn = aws_ce_cost_category.test.arn

internal/service/ce/cost_category_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestAccCECostCategory_basic(t *testing.T) {
2929
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
3030
Steps: []resource.TestStep{
3131
{
32-
Config: testAccCostCategoryConfig(rName),
32+
Config: testAccCostCategoryConfig_basic(rName),
3333
Check: resource.ComposeTestCheckFunc(
3434
testAccCheckCostCategoryExists(resourceName, &output),
3535
resource.TestCheckResourceAttr(resourceName, "name", rName),
@@ -56,14 +56,14 @@ func TestAccCECostCategory_complete(t *testing.T) {
5656
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
5757
Steps: []resource.TestStep{
5858
{
59-
Config: testAccCostCategoryConfig(rName),
59+
Config: testAccCostCategoryConfig_basic(rName),
6060
Check: resource.ComposeTestCheckFunc(
6161
testAccCheckCostCategoryExists(resourceName, &output),
6262
resource.TestCheckResourceAttr(resourceName, "name", rName),
6363
),
6464
},
6565
{
66-
Config: testAccCostCategoryOperandAndConfig(rName),
66+
Config: testAccCostCategoryConfig_operandAnd(rName),
6767
Check: resource.ComposeTestCheckFunc(
6868
testAccCheckCostCategoryExists(resourceName, &output),
6969
resource.TestCheckResourceAttr(resourceName, "name", rName),
@@ -90,14 +90,14 @@ func TestAccCECostCategory_splitCharge(t *testing.T) {
9090
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
9191
Steps: []resource.TestStep{
9292
{
93-
Config: testAccCostCategorySplitChargesConfig(rName, "PROPORTIONAL"),
93+
Config: testAccCostCategoryConfig_splitCharges(rName, "PROPORTIONAL"),
9494
Check: resource.ComposeTestCheckFunc(
9595
testAccCheckCostCategoryExists(resourceName, &output),
9696
resource.TestCheckResourceAttr(resourceName, "name", rName),
9797
),
9898
},
9999
{
100-
Config: testAccCostCategorySplitChargesConfig(rName, "EVEN"),
100+
Config: testAccCostCategoryConfig_splitCharges(rName, "EVEN"),
101101
Check: resource.ComposeTestCheckFunc(
102102
testAccCheckCostCategoryExists(resourceName, &output),
103103
resource.TestCheckResourceAttr(resourceName, "name", rName),
@@ -124,7 +124,7 @@ func TestAccCECostCategory_disappears(t *testing.T) {
124124
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
125125
Steps: []resource.TestStep{
126126
{
127-
Config: testAccCostCategoryConfig(rName),
127+
Config: testAccCostCategoryConfig_basic(rName),
128128
Check: resource.ComposeTestCheckFunc(
129129
testAccCheckCostCategoryExists(resourceName, &output),
130130
acctest.CheckResourceDisappears(acctest.Provider, tfce.ResourceCostCategory(), resourceName),
@@ -186,7 +186,7 @@ func testAccCheckCostCategoryDestroy(s *terraform.State) error {
186186

187187
}
188188

189-
func testAccCostCategoryConfig(rName string) string {
189+
func testAccCostCategoryConfig_basic(rName string) string {
190190
return fmt.Sprintf(`
191191
resource "aws_ce_cost_category" "test" {
192192
name = %[1]q
@@ -228,7 +228,7 @@ resource "aws_ce_cost_category" "test" {
228228
`, rName)
229229
}
230230

231-
func testAccCostCategoryOperandAndConfig(rName string) string {
231+
func testAccCostCategoryConfig_operandAnd(rName string) string {
232232
return fmt.Sprintf(`
233233
resource "aws_ce_cost_category" "test" {
234234
name = %[1]q
@@ -264,7 +264,7 @@ resource "aws_ce_cost_category" "test" {
264264
`, rName)
265265
}
266266

267-
func testAccCostCategorySplitChargesConfig(rName, method string) string {
267+
func testAccCostCategoryConfig_splitCharges(rName, method string) string {
268268
return fmt.Sprintf(`
269269
resource "aws_ce_cost_category" "test1" {
270270
name = "%[1]s-1"

internal/service/ce/tags_data_source_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestAccCETagsDataSource_basic(t *testing.T) {
2929
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
3030
Steps: []resource.TestStep{
3131
{
32-
Config: testAccTagsSourceConfig(rName, startDate, endDate),
32+
Config: testAccTagsDataSourceConfig_basic(rName, startDate, endDate),
3333
Check: resource.ComposeTestCheckFunc(
3434
testAccCheckCostCategoryExists(resourceName, &output),
3535
resource.TestCheckResourceAttr(dataSourceName, "tags.#", "1"),
@@ -57,7 +57,7 @@ func TestAccCETagsDataSource_filter(t *testing.T) {
5757
ErrorCheck: acctest.ErrorCheck(t, costexplorer.EndpointsID),
5858
Steps: []resource.TestStep{
5959
{
60-
Config: testAccTagsSourceFilterConfig(rName, startDate, endDate),
60+
Config: testAccTagsDataSourceConfig_filter(rName, startDate, endDate),
6161
Check: resource.ComposeTestCheckFunc(
6262
testAccCheckCostCategoryExists(resourceName, &output),
6363
resource.TestCheckResourceAttr(dataSourceName, "tags.#", "1"),
@@ -67,7 +67,7 @@ func TestAccCETagsDataSource_filter(t *testing.T) {
6767
})
6868
}
6969

70-
func testAccTagsSourceConfig(rName, start, end string) string {
70+
func testAccTagsDataSourceConfig_basic(rName, start, end string) string {
7171
return fmt.Sprintf(`
7272
resource "aws_ce_cost_category" "test" {
7373
name = %[1]q
@@ -94,7 +94,7 @@ data "aws_ce_tags" "test" {
9494
`, rName, start, end)
9595
}
9696

97-
func testAccTagsSourceFilterConfig(rName, start, end string) string {
97+
func testAccTagsDataSourceConfig_filter(rName, start, end string) string {
9898
return fmt.Sprintf(`
9999
data "aws_region" "current" {}
100100

0 commit comments

Comments
 (0)