New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend/swift docs appear to be incorrect about object versioning #19005

Open
cardoe opened this Issue Oct 4, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@cardoe

cardoe commented Oct 4, 2018

I believe the wording on the object versioning warning in the backend/swift section of the documentation is incorrect. The link points to archive_path (which is deprecated for archive_container) but the wording says expire_after which is visible when you click the link so the error isn't necessarily obvious.

Imagine you have a backend configured something like:

terraform {
  backend "swift" {
    container    = "terraform-state"
    expire_after = "7d"
  }
}

This will cause your tfstate.tf file to be deleted 7 days after it was created. Which is certainly not what's desired. I believe the intended file is:

terraform {
  backend "swift" {
    container         = "terraform-state"
    archive_container = "terraform-state-archive"
  }
}

This appeared in af5467b#r30776677

@cardoe

This comment has been minimized.

Show comment
Hide comment
@cardoe

cardoe Oct 4, 2018

I've confirmed that expire_after sets the X-Delete-At header per https://docs.openstack.org/swift/latest/overview_expiring_objects.html which will delete your state.

cardoe commented Oct 4, 2018

I've confirmed that expire_after sets the X-Delete-At header per https://docs.openstack.org/swift/latest/overview_expiring_objects.html which will delete your state.

cardoe added a commit to cardoe/terraform that referenced this issue Oct 4, 2018

website: backend/swift fix bad link for object versioning
The displayed link said `expire_after` but really is a link to
`archive_container` so update the link to read the right data.
fixes hashicorp#19005

@cardoe cardoe referenced a pull request that will close this issue Oct 4, 2018

Open

Fix backend/swift docs #19007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment