Skip to content

Commit

Permalink
Updated documentation about the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
upparekh committed Jul 8, 2021
1 parent fd5cbb3 commit 168bb9b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/@aws-cdk/aws-ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,22 @@ taskDefinition.addContainer('TheContainer', {
});
```

When providing the Splunk token in the `token` field it gets resolved to the secret value on deploying. Hence it is encouraged to use the `secretToken` field for specifying the Splunk token as a `Secret` which will be populated in the Log Driver `SecretOptions`. Below is an example task definition with both fields specified:

```ts
// Create a Task Definition for the container to start
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
taskDefinition.addContainer('TheContainer', {
image: ecs.ContainerImage.fromRegistry('example-image'),
memoryLimitMiB: 256,
logging: ecs.LogDrivers.splunk({
token: cdk.SecretValue.secretsManager('my-splunk-token'),
secretToken: ecs.Secret.fromSecretsManager(secret),
url: 'my-splunk-url'
})
});
```

### syslog Log Driver

```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export enum SplunkLogFormat {
export interface SplunkLogDriverProps extends BaseLogDriverProps {
/**
* Splunk HTTP Event Collector token.
* @deprecated Use `secretToken` instead.
* @deprecated Use {@link SplunkLogDriverProps.secretToken} instead.
*/
readonly token: SecretValue;

Expand Down

0 comments on commit 168bb9b

Please sign in to comment.