diff --git a/content/Stores/aws-parameter-store.mdx b/content/Stores/aws-parameter-store.mdx new file mode 100644 index 0000000..7ee65ea --- /dev/null +++ b/content/Stores/aws-parameter-store.mdx @@ -0,0 +1,146 @@ +--- +id: aws-parameter-store +slug: aws-parameter-store +title: AWS Parameter store +--- + +Integrates the Configu Orchestrator with AWS Parameter Store. + +## SDK Usage + + + +```js +import path from 'path'; +import { + AWSParameterStoreConfigStore, + ConfigSet, + ConfigSchema, + UpsertCommand, + EvalCommand, + ExportCommand, + TestCommand, + DeleteCommand, +} from '@configu/node'; + +(async () => { + try { + const store = new AWSParameterStoreConfigStore({ + credentials: { + accessKeyId: 'accessKeyId', + secretAccessKey: 'secretAccessKey', + }, + region: 'us-east-1', + }); + const set = new ConfigSet('test'); + const schema = new ConfigSchema(path.join(__dirname, 'get-started.cfgu.json')); + + await new TestCommand({ store, clean: true }).run(); + + await new UpsertCommand({ + store, + set, + schema, + configs: { + GREETING: 'hey', + SUBJECT: 'configu node.js sdk', + }, + }).run(); + + const data = await new EvalCommand({ + store, + set, + schema, + }).run(); + + const configurationData = await new ExportCommand({ + data, + }).run(); + + console.log(configurationData); + + await new DeleteCommand({ store, set, schema }).run(); + } catch (error) { + console.error(error); + } +})(); +``` + +```python +coming soon +``` + + + +## CLI Usage + +Configu's CLI needs to be authorized to access your AWS Parameter Store account. This can be done two ways + +- By default, Configu's CLI uses the standard authentication method AWS uses, if your CLI has the right IAM access credentials, there's no special action to take. +- via the [.configu file](../cli-config). + +example .configu file: + +```json +{ + "stores": { + "aws-param-store": { + "type": "aws-parameter-store", + "configuration": { + "credentials": { + "accessKeyId": "accessKeyId", + "secretAccessKey": "secretAccessKey" + }, + "region": "us-east-1" + } + } + } +} +``` + +### Test command + +```bash +configu test --store "aws-param-store" --clean +``` + +### Upsert command + +```bash +configu upsert --store "aws-param-store" --set "test" --schema "./get-started.cfgu.json" \ + -c "GREETING=hey" \ + -c "SUBJECT=configu node.js sdk" +``` + +### Eval and export commands + +```bash +configu eval --store "aws-param-store" --set "test" --schema "./get-started.cfgu.json" \ + | configu export +``` + +Export result: + +```json +{ + "GREETING": "hey", + "SUBJECT": "configu node.js sdk", + "MESSAGE": "hey, configu node.js sdk!" +} +``` + +### Delete command + +Clean up the previous upsert by using: + +```bash +configu delete --store "aws-param-store" --set "test" --schema "./get-started.cfgu.json" +``` + +## Examples + +Secrets list: +![image](./img/aws-parameter-store-upsert-result.png) + +Upserted values to the `test` config set: +![image](./img/aws-parameter-store-param-list.png) diff --git a/content/Stores/aws-secrets-manager.mdx b/content/Stores/aws-secrets-manager.mdx new file mode 100644 index 0000000..3e8f7ff --- /dev/null +++ b/content/Stores/aws-secrets-manager.mdx @@ -0,0 +1,153 @@ +--- +id: aws-secrets-manager +slug: aws-secrets-manager +title: AWS Secrets Manager +--- + +Integrates the Configu Orchestrator with AWS Secrets Manager. + +## Limitations + + + - A secret scheduled for deletion cannot be changed by the Configu Orchestrator. You will need to + manually cancel the secret deletion. + + +## SDK Usage + + + +```js +import path from 'path'; +import { + AWSSecretsManagerConfigStore, + ConfigSet, + ConfigSchema, + UpsertCommand, + EvalCommand, + ExportCommand, + TestCommand, + DeleteCommand, +} from '@configu/node'; + +(async () => { + try { + const store = new AWSSecretsManagerConfigStore({ + credentials: { + accessKeyId: 'accessKeyId', + secretAccessKey: 'secretAccessKey', + }, + region: 'us-east-1', + }); + const set = new ConfigSet('test'); + const schema = new ConfigSchema(path.join(__dirname, 'get-started.cfgu.json')); + + await new TestCommand({ store, clean: true }).run(); + + await new UpsertCommand({ + store, + set, + schema, + configs: { + GREETING: 'hey', + SUBJECT: 'configu node.js sdk', + }, + }).run(); + + const data = await new EvalCommand({ + store, + set, + schema, + }).run(); + + const configurationData = await new ExportCommand({ + data, + }).run(); + + console.log(configurationData); + + await new DeleteCommand({ store, set, schema }).run(); + } catch (error) { + console.error(error); + } +})(); +``` + +```python +coming soon +``` + + + +## CLI Usage + +Configu's CLI needs to be authorized to access your AWS Secrets Manager account. This can be done two ways + +- By default, Configu's CLI uses the standard authentication method AWS uses, if your CLI has the right IAM access credentials, there's no special action to take. +- via the [.configu file](../cli-config). + +example .configu file: + +```json +{ + "stores": { + "aws-secrets-manager-store": { + "type": "aws-secrets-manager", + "configuration": { + "credentials": { + "accessKeyId": "accessKeyId", + "secretAccessKey": "secretAccessKey" + }, + "region": "us-east-1" + } + } + } +} +``` + +### Test command + +```bash +configu test --store "aws-secrets-manager-store" --clean +``` + +### Upsert command + +```bash +configu upsert --store "aws-secrets-manager-store" --set "test" --schema "./get-started.cfgu.json" \ + -c "GREETING=hey" \ + -c "SUBJECT=configu node.js sdk" +``` + +### Eval and export commands + +```bash +configu eval --store "aws-secrets-manager-store" --set "test" --schema "./get-started.cfgu.json" \ + | configu export +``` + +Export result: + +```json +{ + "GREETING": "hey", + "SUBJECT": "configu node.js sdk", + "MESSAGE": "hey, configu node.js sdk!" +} +``` + +### Delete command + +Clean up the previous upsert by using: + +```bash +configu delete --store "aws-secrets-manager-store" --set "test" --schema "./get-started.cfgu.json" +``` + +## Examples + +Secrets list: +![image](./img/aws-secrets-manager-upsert-result.png) + +Upserted values to the `test` config set: +![image](./img/aws-secrets-manager-secrets-list.png) diff --git a/content/Stores/img/aws-parameter-store-param-list.png b/content/Stores/img/aws-parameter-store-param-list.png new file mode 100644 index 0000000..df39514 Binary files /dev/null and b/content/Stores/img/aws-parameter-store-param-list.png differ diff --git a/content/Stores/img/aws-parameter-store-upsert-result.png b/content/Stores/img/aws-parameter-store-upsert-result.png new file mode 100644 index 0000000..c936023 Binary files /dev/null and b/content/Stores/img/aws-parameter-store-upsert-result.png differ diff --git a/content/Stores/img/aws-secrets-manager-secrets-list.png b/content/Stores/img/aws-secrets-manager-secrets-list.png new file mode 100644 index 0000000..85fe07f Binary files /dev/null and b/content/Stores/img/aws-secrets-manager-secrets-list.png differ diff --git a/content/Stores/img/aws-secrets-manager-upsert-result.png b/content/Stores/img/aws-secrets-manager-upsert-result.png new file mode 100644 index 0000000..5f78199 Binary files /dev/null and b/content/Stores/img/aws-secrets-manager-upsert-result.png differ diff --git a/content/sidebar.json b/content/sidebar.json index 61ed6c8..6f12d94 100644 --- a/content/sidebar.json +++ b/content/sidebar.json @@ -159,6 +159,20 @@ } ] }, + { + "title": "Stores", + "isOpenByDefault": false, + "items": [ + { + "title": "AWS Secrets Manager", + "slug": "aws-secrets-manager" + }, + { + "title": "AWS Parameter Store", + "slug": "aws-parameter-store" + } + ] + }, { "title": "IDE Plugins", "isOpenByDefault": false,