Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 38 additions & 21 deletions content/Concepts/config-store.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,43 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="Json File"
type="json-file"
interfaces={['CLI', 'Node.js', 'Python']}
docs="https://configu.com/docs/"
configs="https://configu.com/docs/"
docs="https://configu.com/docs/json-file"
configs="https://configu.com/docs/json-file#initialization"
/>

<StoreInfo
category="file"
name="Ini File"
type="ini-file"
interfaces={['Node.js']}
docs="https://configu.com/docs/"
configs="https://configu.com/docs/"
docs="https://configu.com/docs/ini-file"
configs="https://configu.com/docs/ini-file#initialization"
/>

<StoreInfo
category="feature flag"
name="Launch Darkly"
type="launch-darkly"
interfaces={['CLI', 'Node.js']}
docs="https://apidocs.launchdarkly.com/tag/Feature-flags"
configs="https://github.com/launchdarkly-labs/ldc"
docs="https://configu.com/docs/launch-darkly"
configs="https://configu.com/docs/launch-darkly#initialization"
/>

<StoreInfo
category="feature flag"
name="CloudBees"
type="cloud-bees"
interfaces={['CLI', 'Node.js']}
docs="https://configu.com/docs/cloud-bees"
configs="https://configu.com/docs/cloud-bees#initialization"
/>

<StoreInfo
category="secret manager"
name="HashiCorp Vault"
type="hashicorp-vault"
interfaces={['CLI', 'Node.js', 'Python']}
docs="https://developer.hashicorp.com/vault/docs"
docs="https://configu.com/docs/hashicorp-vault"
configs="https://developer.hashicorp.com/vault/docs/configuration"
/>

Expand All @@ -78,7 +87,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="AWS Secrets Manager"
type="aws-secrets-manager"
interfaces={['CLI', 'Node.js', 'Python']}
docs="https://docs.aws.amazon.com/secretsmanager/"
docs="https://configu.com/docs/aws-secrets-manager"
configs="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-secrets-manager/interfaces/secretsmanagerclientconfig.html"
/>

Expand All @@ -87,7 +96,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="Azure Key Vault"
type="azure-key-vault"
interfaces={['CLI', 'Node.js', 'Python']}
docs="https://learn.microsoft.com/en-us/azure/key-vault/"
docs="https://configu.com/docs/azure-key-vault"
configs="https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-secrets/secretclient"
/>

Expand All @@ -96,7 +105,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="GCP Secret Manager"
type="gcp-secret-manager"
interfaces={['CLI', 'Node.js', 'Python']}
docs="https://cloud.google.com/secret-manager/docs"
docs="https://configu.com/docs/gcp-secret-manager"
configs="https://cloud.google.com/secret-manager/docs/reference/libraries#client-libraries-install-nodejs"
/>

Expand All @@ -105,17 +114,17 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="Kubernetes Secret"
type="kubernetes-secret"
interfaces={['CLI', 'Node.js', 'Python']}
docs="https://kubernetes.io/docs/concepts/configuration/secret/"
configs="https://github.com/kubernetes-client/javascript"
docs="https://configu.com/docs/kubernetes-secret"
configs="https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig"
/>

<StoreInfo
category="key value"
name="AWS Parameter Store"
type="aws-parameter-store"
interfaces={['CLI', 'Node.js']}
docs="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ssm/"
configs="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/SSMClientConfig/"
docs="https://configu.com/docs/aws-parameter-store"
configs="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/SSMClientConfig"
/>

<StoreInfo
Expand All @@ -126,13 +135,21 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
docs="https://github.com/jaredwray/keyv"
configs="https://github.com/jaredwray/keyv"
/>
<StoreInfo
category="key value"
name="Etcd"
type="etcd"
interfaces={['Node.js']}
docs="https://www.npmjs.com/package/etcd3"
configs="https://www.npmjs.com/package/etcd3"
/>

<StoreInfo
category="database"
name="SQLite"
type="sqlite"
interfaces={['CLI', 'Node.js']}
docs="https://www.sqlite.org/docs.html"
docs="https://configu.com/docs/sqlite"
configs="https://typeorm.io/data-source-options#sqlite-data-source-options"
/>

Expand All @@ -141,7 +158,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="MySQL"
type="mysql"
interfaces={['CLI', 'Node.js']}
docs="https://dev.mysql.com/doc/"
docs="https://configu.com/docs/mysql"
configs="https://typeorm.io/data-source-options#mysql--mariadb-data-source-options"
/>

Expand All @@ -150,7 +167,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="MariaDB"
type="mariadb"
interfaces={['CLI', 'Node.js']}
docs="https://dev.mysql.com/doc/"
docs="https://configu.com/docs/mariadb"
configs="https://typeorm.io/data-source-options#mysql--mariadb-data-source-options"
/>

Expand All @@ -159,7 +176,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="PostgreSQL"
type="postgres"
interfaces={['CLI', 'Node.js']}
docs="https://www.postgresql.org/docs/"
docs="https://configu.com/docs/postgres"
configs="https://typeorm.io/data-source-options#postgres--cockroachdb-data-source-options"
/>

Expand All @@ -168,7 +185,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="CockroachDB"
type="cockroachdb"
interfaces={['CLI', 'Node.js']}
docs="https://www.cockroachlabs.com/docs/"
docs="https://configu.com/docs/cockroachdb"
configs="https://typeorm.io/data-source-options#postgres--cockroachdb-data-source-options"
/>

Expand All @@ -177,7 +194,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="Microsoft SQL Server"
type="mssql"
interfaces={['CLI', 'Node.js']}
docs="https://learn.microsoft.com/en-us/sql/sql-server/"
docs="https://configu.com/docs/mssql"
configs="https://typeorm.io/data-source-options#mssql-data-source-options"
/>

Expand All @@ -186,7 +203,7 @@ You can choose the appropriate `ConfigStore` based on your specific use case, an
name="LocalForage"
type="localforage"
interfaces={['Browser']}
docs="https://localforage.github.io/localForage/"
docs="https://configu.com/docs/localforage"
configs="https://localforage.github.io/localForage/#settings-api-config"
/>

Expand Down
154 changes: 154 additions & 0 deletions content/Stores/aws-parameter-store.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
id: aws-parameter-store
slug: aws-parameter-store
title: AWS Parameter store
---

Integrates the Configu Orchestrator with [AWS Parameter Store](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ssm).

## Initialization

Configu's needs to be authorized to access your AWS Secrets Manager account. By default, Configu uses the standard authentication methods that the AWS SDKs use, if you have the right IAM access credentials, there's no special action to take. Otherwise, you need to supply the credentials according to the interface that you use:

- [Node.js SDK & CLI configuration options](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ssm/Interface/SSMClientConfig)

Example [.configu file](../cli-config) file store configuration for CLI usage:

```json
{
"stores": {
"aws-secrets-manager-store": {
"type": "aws-secrets-manager",
"configuration": {
"credentials": {
"accessKeyId": "accessKeyId",
"secretAccessKey": "secretAccessKey"
},
"region": "us-east-1"
}
}
}
}
```

## SDK Usage

<CodeTabs labels={["Node SDK", "Python SDK","Go SDK"]}>

```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 absolutePath = path.resolve(path.join(__dirname, 'get-started.cfgu.json'));
const fileContent = await fs.readFile(absolutePath, { encoding: 'utf8' });
const schemaContents = JSON.parse(fileContent);
const schema = new ConfigSchema('get-started', schemaContents);

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
```

```GO
coming soon
```

</CodeTabs>

## CLI Usage

### 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)
Loading