Skip to content

Commit e43bf6e

Browse files
s3: use previous variable name
1 parent 3ea8774 commit e43bf6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/backend/remote-state/s3/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,14 @@ func (c *RemoteClient) Lock(info *statemgr.LockInfo) (string, error) {
346346
// exist, the operation will succeed, acquiring the lock. If the lock file already exists, the operation
347347
// will fail due to a conditional write, indicating that the lock is already held by another Terraform client.
348348
func (c *RemoteClient) lockWithFile(ctx context.Context, info *statemgr.LockInfo, log hclog.Logger) error {
349-
data, err := json.Marshal(info)
349+
lockFileJson, err := json.Marshal(info)
350350
if err != nil {
351351
return err
352352
}
353353

354354
input := &s3.PutObjectInput{
355355
ContentType: aws.String("application/json"),
356-
Body: bytes.NewReader(data),
356+
Body: bytes.NewReader(lockFileJson),
357357
Bucket: aws.String(c.bucketName),
358358
Key: aws.String(c.lockFilePath),
359359
IfNoneMatch: aws.String("*"),

0 commit comments

Comments
 (0)