-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ReplayerRetries
- Loading branch information
Showing
11 changed files
with
144 additions
and
81 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
DocumentsFromSnapshotMigration/src/test/resources/log4j2.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
deployment/cdk/opensearch-service-migration/lib/components/shared-log-file-system.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { MountPoint, Volume } from 'aws-cdk-lib/aws-ecs'; | ||
import { Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam'; | ||
import { MigrationSSMParameter, getMigrationStringParameterValue } from '../common-utilities'; | ||
import { MigrationServiceCore } from '../service-stacks'; | ||
|
||
|
||
export class SharedLogFileSystem { | ||
|
||
readonly volumeId: string; | ||
readonly volumeName = "sharedLogsVolume"; | ||
public readonly mountPointPath = "/shared-logs-output"; | ||
constructor(private stack: MigrationServiceCore, stage: string, defaultDeployId: string) { | ||
this.volumeId = getMigrationStringParameterValue(stack, { | ||
stage, | ||
defaultDeployId, | ||
parameter: MigrationSSMParameter.SHARED_LOGS_EFS_ID, | ||
}) | ||
} | ||
|
||
asVolume(): Volume { | ||
return { | ||
name: this.volumeName, | ||
efsVolumeConfiguration: { | ||
fileSystemId: this.volumeId, | ||
transitEncryption: "ENABLED" | ||
} | ||
}; | ||
} | ||
|
||
asMountPoint(): MountPoint { | ||
return { | ||
containerPath: this.mountPointPath, | ||
readOnly: false, | ||
sourceVolume: this.volumeName | ||
}; | ||
} | ||
|
||
asPolicyStatement(): PolicyStatement { | ||
const sharedLogFileSystemArn = `arn:${this.stack.partition}:elasticfilesystem:${this.stack.region}:${this.stack.account}:file-system/${this.volumeId}` | ||
return new PolicyStatement({ | ||
effect: Effect.ALLOW, | ||
resources: [sharedLogFileSystemArn], | ||
actions: [ | ||
"elasticfilesystem:ClientMount", | ||
"elasticfilesystem:ClientWrite" | ||
] | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.