• Sarah French's avatar
    Add customer-managed encryption key (KMS) support to GCS backend (#31786) · d43ec0f3
    Sarah French authored
    
    
    * Add ability to use customer-managed KMS key to encrypt state, add acceptance tests
    
    * Change test names for different encrpytion methods
    
    * Commit files updated by `go mod tidy`
    
    * Add guard against missing ENVs to `setupKmsKey` func
    
    * Update KMS setup function to get credentials from ENVs
    
    * Update tests to not include zero-values in config
    
    This means that default values are supplied later by TF instead of supplied as config from the user
    
    This also avoids issues related to making field conflicts explicit with `ConflictsWith`
    
    * Make `encryption_key` & `kms_encryption_key` conflicting fields
    
    Removing the Default from `encryption_key` does not appear to be a breaking change when tested manually
    
    * Add ability to set `kms_encryption_key` via ENV
    
    * Refactor `encryption_key` to use `DefaultFunc` to access ENV, if set
    
    * Remove comments
    
    * Update `gcs` backend docs & descriptions in schema
    
    * Update `gcs` backend docs to include information on encryption methods
    
    * Apply technical writing suggestions from code review
    Co-authored-by: default avatarMatthew Garrell <69917312+mgarrell777@users.noreply.github.com>
    
    * Update documentation to remove passive voice
    
    * Change use of context in tests, add inline comment, update logs
    
    * Remove use of `ReadPathOrContents` for new field
    Co-authored-by: default avatarMatthew Garrell <69917312+mgarrell777@users.noreply.github.com>
    d43ec0f3
Analyzing file…