Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: localstack - add local config -> centralbucket #34

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions VISION.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Root
- [ ] Security Hub
- [ ] GuardDuty
- [ ] Macie
- [ ] Config
- [x] Config
- [ ] Access Analyzer
- [ ] Access Logs
- [ ] DNS Logs
Expand All @@ -61,23 +61,23 @@ Root
- [x] Org CloudTrail
- [x] CLI:
- [x] Start Logging
- Stack 2: Source of Truth
- Security Hub
- Inspector
- Artifact
- Audit Manager
- Config Aggregator
- Event Bridge
- Firewall Manager
- Lambda (response)
- Detective
- Private CA
- [ ]Stack 2: Source of Truth
- [ ] Security Hub
- [ ] Inspector
- [ ] Artifact
- [ ] Audit Manager
- [ ] Config Aggregator
- [ ] Event Bridge
- [ ] Firewall Manager
- [ ] Lambda (response)
- [ ] Detective
- [ ] Private CA
- Stack 3: Local
- Security Hub
- GuardDuty
- Macie
- Config
- Access Analyzer
- [ ] Security Hub
- [ ] GuardDuty
- [ ] Macie
- [x] Config
- [ ] Access Analyzer

- Network Account
- Stack 1:
Expand All @@ -93,23 +93,23 @@ Root
- Resolver DNS
- Network Access Analyzer
- Stack 2: Local
- Security Hub
- GuardDuty
- Macie
- Config
- Access Analyzer
- [ ] Security Hub
- [ ] GuardDuty
- [ ] Macie
- [x] Config
- [ ] Access Analyzer

- Shared Account
- Stack 1:
- [x] Set IAM Account Alias
- Identity Center
- Systems Manager
- Stack 2: Local
- Security Hub
- GuardDuty
- Macie
- Config
- Access Analyzer
- [ ] Security Hub
- [ ] GuardDuty
- [ ] Macie
- [x] Config
- [ ] Access Analyzer

- Forensics Account
- Stack 1:
Expand All @@ -124,11 +124,11 @@ Root

- Management Account:
- Stack 3: Local
- Security Hub
- GuardDuty
- Macie
- Config
- Access Analyzer
- [ ] Security Hub
- [ ] GuardDuty
- [ ] Macie
- [x] Config
- [ ] Access Analyzer

### Setup PIPELINE

Expand Down
6 changes: 6 additions & 0 deletions src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ new LogarchiveAccountStack2(app, 'p6-lz-logarchive-2', {
account: logarchiveAccountId,
region: env.region,
},
principals,
centralBucketArn: organizationStack.centralBucketArn,
})

// Audit Account
Expand Down Expand Up @@ -111,6 +113,8 @@ new NetworkAccountStack2(app, 'p6-lz-network-2', {
account: networkAccountId,
region: env.region,
},
principals,
centralBucketArn: organizationStack.centralBucketArn,
})

// Shared Account
Expand All @@ -128,6 +132,8 @@ new SharedAccountStack2(app, 'p6-lz-shared-2', {
account: sharedAccountId,
region: env.region,
},
principals,
centralBucketArn: organizationStack.centralBucketArn,
})

// Management Account
Expand Down
2 changes: 1 addition & 1 deletion src/stacks/audit-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class AuditAccountStack1 extends cdk.Stack {
})

const cw = new P6LzSraCloudWatch(this, 'P6LzSraCloudWatch', {
accountAlias: 'p6m7g8-audit',
accountAlias: props.accountAlias,
})

const bucket = s3.Bucket.fromBucketArn(this, 'CentralBucket', props.centralBucketArn.toString())
Expand Down
12 changes: 11 additions & 1 deletion src/stacks/logarchive-2.ts
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,
})
}
}
12 changes: 11 additions & 1 deletion src/stacks/network-2.ts
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,
})
}
}
12 changes: 11 additions & 1 deletion src/stacks/shared-2.ts
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,
})
}
}