Skip to content

Commit

Permalink
Examples in README (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
plumdog authored Dec 21, 2023
1 parent 7636161 commit f82bc74
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,40 @@
Docs: https://isotoma.github.io/datadog-ecs-cdk/

NPM: https://www.npmjs.com/package/datadog-ecs-cdk

## EC2 example

```typescript
import { EcsDatadogDaemonService } from 'datadog-ecs-cdk';

// ...

new EcsDatadogDaemonService(this, 'EcsDatadog', {
ecsCluster: myCluster,
datadogApiKeySecret: mySecret,
});
```

## Fargate example
```typescript
import { addDatadogToFargateTask } from 'datadog-ecs-cdk';

// ...

const myTaskDef = ...

addDatadogToFargateTask(myTaskDef, {
datadogApiKeySecret: ecs.Secret.fromSecretsManager(mySecret),
agent: {
enabled: true,
statsd: {
enabled: true,
},
},
fireLensLogging: {
enabled: true,
service: 'myservice',
source: 'myservice',
},
});
```

0 comments on commit f82bc74

Please sign in to comment.