Skip to content

Commit

Permalink
s3: use previous variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
bschaatsbergen committed Nov 27, 2024
1 parent 3ea8774 commit e43bf6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/backend/remote-state/s3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ func (c *RemoteClient) Lock(info *statemgr.LockInfo) (string, error) {
// exist, the operation will succeed, acquiring the lock. If the lock file already exists, the operation
// will fail due to a conditional write, indicating that the lock is already held by another Terraform client.
func (c *RemoteClient) lockWithFile(ctx context.Context, info *statemgr.LockInfo, log hclog.Logger) error {
data, err := json.Marshal(info)
lockFileJson, err := json.Marshal(info)
if err != nil {
return err
}

input := &s3.PutObjectInput{
ContentType: aws.String("application/json"),
Body: bytes.NewReader(data),
Body: bytes.NewReader(lockFileJson),
Bucket: aws.String(c.bucketName),
Key: aws.String(c.lockFilePath),
IfNoneMatch: aws.String("*"),
Expand Down

0 comments on commit e43bf6e

Please sign in to comment.