Files
vault/ui/app/models/sync/destinations/gcp-sm.js
claire bontempo dd62f9fa28 Sync UI: Add granularity to sync destinations (#25500)
* add granularity form field to sync destinations

* update mirage, shim in subkey response

* fix comment

* add granular updates to list view

* update mirage;

* update test

* comment for updating test

* use hds::dropdown in destinations for consistency

* move banner to popup menu

* add changelog

* remove spans from test
2024-02-20 14:17:34 -07:00

41 lines
1.2 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import SyncDestinationModel from '../destination';
import { attr } from '@ember-data/model';
import { withFormFields } from 'vault/decorators/model-form-fields';
const displayFields = [
// connection details
'name',
'credentials',
// vault sync config options
'granularity',
'secretNameTemplate',
'customTags',
];
const formFieldGroups = [
{ default: ['name', 'granularity', 'secretNameTemplate', 'customTags'] },
{ Credentials: ['credentials'] },
];
@withFormFields(displayFields, formFieldGroups)
export default class SyncDestinationsGoogleCloudSecretManagerModel extends SyncDestinationModel {
@attr('string', {
label: 'JSON credentials',
subText:
'If empty, Vault will use the GOOGLE_APPLICATION_CREDENTIALS environment variable if configured.',
editType: 'file',
docLink: '/vault/docs/secrets/gcp#authentication',
})
credentials; // obfuscated, never returned by API
@attr('object', {
subText:
'An optional set of informational key-value pairs added as additional metadata on secrets synced to this destination. Custom tags are merged with built-in tags.',
editType: 'kv',
})
customTags;
}