-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: localstack - add local config -> centralbucket
- Loading branch information
Showing
6 changed files
with
72 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import type { Construct } from 'constructs' | ||
import type { LogarchiveBucketArn, ShareWithOrg } from '../types' | ||
import * as cdk from 'aws-cdk-lib' | ||
import * as s3 from 'aws-cdk-lib/aws-s3' | ||
import { P6LzSraConfig } from '../constructs/p6-lz-sra-config' | ||
|
||
interface LogarchiveAccountStack2Props extends cdk.StackProps {} | ||
interface LogarchiveAccountStack2Props extends cdk.StackProps, LogarchiveBucketArn, ShareWithOrg {} | ||
|
||
export class LogarchiveAccountStack2 extends cdk.Stack { | ||
constructor(scope: Construct, id: string, props: LogarchiveAccountStack2Props) { | ||
super(scope, id, props) | ||
|
||
const bucket = s3.Bucket.fromBucketArn(this, 'CentralBucket', props.centralBucketArn.toString()) | ||
|
||
new P6LzSraConfig(this, 'P6LzSraConfig', { | ||
principals: props.principals, | ||
centralBucket: bucket, | ||
}) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import type { Construct } from 'constructs' | ||
import type { LogarchiveBucketArn, ShareWithOrg } from './../types' | ||
import * as cdk from 'aws-cdk-lib' | ||
import * as s3 from 'aws-cdk-lib/aws-s3' | ||
import { P6LzSraConfig } from '../constructs/p6-lz-sra-config' | ||
|
||
interface NetworkAccountStack2Props extends cdk.StackProps {} | ||
interface NetworkAccountStack2Props extends cdk.StackProps, LogarchiveBucketArn, ShareWithOrg {} | ||
|
||
export class NetworkAccountStack2 extends cdk.Stack { | ||
constructor(scope: Construct, id: string, props: NetworkAccountStack2Props) { | ||
super(scope, id, props) | ||
|
||
const bucket = s3.Bucket.fromBucketArn(this, 'CentralBucket', props.centralBucketArn.toString()) | ||
|
||
new P6LzSraConfig(this, 'P6LzSraConfig', { | ||
principals: props.principals, | ||
centralBucket: bucket, | ||
}) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import type { Construct } from 'constructs' | ||
import type { LogarchiveBucketArn, ShareWithOrg } from '../types' | ||
import * as cdk from 'aws-cdk-lib' | ||
import * as s3 from 'aws-cdk-lib/aws-s3' | ||
import { P6LzSraConfig } from '../constructs/p6-lz-sra-config' | ||
|
||
interface SharedAccountStack2Props extends cdk.StackProps {} | ||
interface SharedAccountStack2Props extends cdk.StackProps, LogarchiveBucketArn, ShareWithOrg {} | ||
|
||
export class SharedAccountStack2 extends cdk.Stack { | ||
constructor(scope: Construct, id: string, props: SharedAccountStack2Props) { | ||
super(scope, id, props) | ||
|
||
const bucket = s3.Bucket.fromBucketArn(this, 'CentralBucket', props.centralBucketArn.toString()) | ||
|
||
new P6LzSraConfig(this, 'P6LzSraConfig', { | ||
principals: props.principals, | ||
centralBucket: bucket, | ||
}) | ||
} | ||
} |