Changes showing as 8 random character strings

Last updated: November 7, 2024

When reviewing changes in Spacelift, you may notice that certain values appear as a random string of 8 characters instead of the expected text. This is due to Spacelift's default sanitization process, which aims to protect sensitive information. However, this can sometimes make it difficult to interpret changes, especially for tags and other non-sensitive data.

What is Smart Sanitization?

Smart Sanitization is a feature in Spacelift that allows for more granular control over which values are sanitized in your change reviews. When enabled, it helps to display non-sensitive information clearly while still protecting sensitive data.

Enabling Smart Sanitization

To enable Smart Sanitization and see more readable output in your change reviews:

  1. Navigate to your stack settings in Spacelift.

  2. Click on Vendor.

  3. Toggle on the Smart Sanitization feature .

Benefits of Smart Sanitization

  • Improved readability of change reviews

  • Clear display of non-sensitive information like tags

  • Maintained protection of sensitive data

Example

Without Smart Sanitization, you might see output like this:

{
  …
  "terraform": {
    "resource_changes": [
      {
        "address": "aws_db_instance.example",
        "change": {
          "actions": ["create"],
          "after": {
            "allocated_storage": 10,
            "db_name": "59832d41",
            "engine": "eae35047",
            "engine_version": "fc40d152",
            "instance_class": "4f8189cd",
            "parameter_group_name": "bead1390",
            "password": "c1707d9d",
            "skip_final_snapshot": true,
            "username": "6266e7ae",
            …
          },
          …
        },
        …
      }
    ]
  }
  …
}

With Smart Sanitization enabled, you'll see more meaningful output:

{
  …
  "terraform": {
    "resource_changes": [
      {
        "address": "aws_db_instance.example",
        "change": {
          "actions": ["create"],
          "after": {
            "allocated_storage": 10,
            "db_name": "exampledb",
            "engine": "mysql",
            "engine_version": "5.7",
            "instance_class": "db.t3.micro",
            "parameter_group_name": "default.mysql5.7",
            "password": "c1707d9d",
            "skip_final_snapshot": true,
            "username": "6266e7ae",
            …
          },
          …
        },
        …
      }
    ]
  }
  …
}

For more detailed information on resource sanitization in Spacelift, please refer to our official documentation.