Using terraform/opentofu with versitygw

Using terraform/opentofu with versitygw

November 18, 2025

To use terraform or opentofu with versitygw, you need to enable the skip credentials validation via the STS API.


    terraform {
      backend "s3" {
        bucket = "your-s3-bucket-name"
        key    = "path/to/your/terraform.tfstate" # e.g., "environment/terraform.tfstate"
        region = "us-east-1"             # default in versitygw
        
        # this is specific to versitygw
        endpoints = {
            s3 = "your-versitygw-uri"
        }
        skip_credentials_validation = true      # Skip credentials validation via the STS API.
        # if you don't use virtual host style bucket access, enable use_path_style
        use_path_style = true                   # (https://<HOST>/<BUCKET> instead of https://<BUCKET>.<HOST>)
      }
    }

It is strongly suggested to use versioning for your state file.

Last updated on