Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaycer committed Sep 4, 2024
1 parent bdb585d commit 513a33b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions internal/service/lambda/recursion_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (r *resourceRecursionConfig) Metadata(_ context.Context, req resource.Metad
func (r *resourceRecursionConfig) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"id": framework.IDAttribute(),
names.AttrID: framework.IDAttribute(),
"function_name": schema.StringAttribute{
Description: "The name of the Lambda function.",
Required: true,
Expand All @@ -80,7 +80,7 @@ func (r *resourceRecursionConfig) Schema(ctx context.Context, req resource.Schem
},
},
Blocks: map[string]schema.Block{
"timeouts": timeouts.Block(ctx, timeouts.Opts{
names.AttrTimeouts: timeouts.Block(ctx, timeouts.Opts{
Create: true,
Update: true,
Delete: true,
Expand Down Expand Up @@ -190,7 +190,6 @@ func (r *resourceRecursionConfig) Update(ctx context.Context, req resource.Updat
planFunctionName := plan.FunctionName.ValueString()

if !plan.RecursiveLoop.Equal(state.RecursiveLoop) {

in := &lambda.PutFunctionRecursionConfigInput{
FunctionName: flex.StringFromFramework(ctx, plan.ID),
}
Expand Down Expand Up @@ -231,7 +230,6 @@ func (r *resourceRecursionConfig) Update(ctx context.Context, req resource.Updat
if resp.Diagnostics.HasError() {
return
}

}

resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...)
Expand Down
4 changes: 2 additions & 2 deletions internal/service/lambda/recursion_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func testAccRecursionConfigConfig_basic(rName string) string {
testAccRecursionConfigConfigBase(rName),
`
resource "aws_lambda_recursion_config" "test" {
function_name = aws_lambda_function.test.function_name
function_name = aws_lambda_function.test.function_name
recursive_loop = "Terminate"
}
`)
Expand All @@ -271,7 +271,7 @@ func testAccRecursionConfigConfig_updateRecursiveLoop(rName, resRecursiveLoopVal
testAccRecursionConfigConfigBase(rName),
fmt.Sprintf(`
resource "aws_lambda_recursion_config" "test" {
function_name = aws_lambda_function.test.function_name
function_name = aws_lambda_function.test.function_name
recursive_loop = %[1]q
}
`, resRecursiveLoopValue))
Expand Down

0 comments on commit 513a33b

Please sign in to comment.