variable "passphrase" {
  type = string
  default = "26281afb-83f1-47ec-9b2d-2aebf6417167"
  sensitive = true
}

locals {
  key_length = sensitive(32)
}

terraform {
  encryption {
    key_provider "pbkdf2" "basic" {
      passphrase    = var.passphrase
      key_length    = local.key_length
      iterations    = 200000
      hash_function = "sha512"
      salt_length   = 12
    }
    method "aes_gcm" "example" {
      keys = key_provider.pbkdf2.basic
    }
    state {
      method = method.aes_gcm.example
    }
    plan {
      method = method.aes_gcm.example
    }
  }
}
