Skip to content

How to use? #2

@cfredericksen

Description

@cfredericksen

What am I doing wrong?

terraform init

Error from terraform init

╷
│ Error: Error acquiring the state lock
│ 
│ Error message: Unexpected HTTP response code 404
│ 
│ OpenTofu acquires a state lock to protect the state from being written
│ by multiple users at the same time. Please resolve the issue above and try
│ again. For most commands, you can disable locking with the "-lock=false"
│ flag, but this is not recommended.

config (docker-compose)

  tofu-http-backend:
    container_name: air
    image: bencejob/terraform-state-http-backend:latest
    ports:
      - "8085:8080"
    working_dir: /storage
    volumes:
      - /srv/mg03-docker/containers/tofu-http-backend/:/storage

config (providiers.tf)

terraform {
  backend "http" {
    address = "http://192.168.1.9:8085/cerfnet/vm-template"
    update_method   = "POST"
    lock_address = "http://192.168.1.9:8085/cerfnet/vm-template"
    lock_method     = "PUT"
    unlock_address = "http://192.168.1.9:8085/cerfnet/vm-template"
    unlock_method   = "DELETE"
  }
}

When I visit http://192.168.1.9:8085/cerfnet/vm-template

{"error":"Status not found"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions