Skip to content

Commit

Permalink
docs: fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
tmokmss committed Mar 27, 2024
1 parent bcd34ec commit 606d55b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ Then you can create OpenSearch resources using [`Domain`](https://docs.aws.amazo

```ts
import { IVpc } from 'aws-cdk-lib/aws-ec2';
import { IRole } from 'aws-cdk-lib/aws-iam';
import { Domain } from 'aws-cdk-lib/aws-opensearchservice';
import { OpenSearchRole, OpenSearchRoleMapping } from 'opensearch-rest-resources';

declare const vpc: IVpc;
declare const role: IRole;
declare const backendRole: IRole;
declare const domain: Domain;

const role = new OpenSearchRole(this, 'Role1', {
Expand All @@ -50,7 +51,7 @@ const roleMapping = new OpenSearchRoleMapping(this, 'RoleMapping1', {
domain,
roleName: 'Role1',
payload: {
backendRoles: [role.roleArn],
backendRoles: [backendRole.roleArn],
},
removalPolicy: RemovalPolicy.RETAIN,
});
Expand Down

0 comments on commit 606d55b

Please sign in to comment.