Skip to content

Terraform remote state push -force fails lineage check #24916

@carbonrobot

Description

@carbonrobot

Terraform Version

v0.12.20

Expected Behavior

The state should be pushed to the remote and forced over any existing state

Actual Behavior

$ tf state push -force 1.tfstate
Failed to persist state: Error uploading state: Conflict

The lineage provided in the state file does not match the value   
currently known by Terraform Enterprise. This means that the provided
state is most likely not related to the target workspace. Check that
the backend configuration is correct and try again.

Additional Context

terraform {
  backend "remote" {
    hostname = "hostname"
    organization = "org"

    workspaces {
      name = "workspace_name"
    }
  }
}

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions